mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-11-21 16:37:20 +01:00
Fix custom module paths for the editor builds.
This commit is contained in:
parent
4ed0f09f43
commit
08711274c7
@ -295,7 +295,12 @@ for path in module_search_paths:
|
||||
# from the built-in "modules" name (e.g. "custom_modules/summator/summator.h"),
|
||||
# so it can be referenced simply as `#include "summator/summator.h"`
|
||||
# independently of where a module is located on user's filesystem.
|
||||
env_base.Prepend(CPPPATH=[path, os.path.dirname(path)])
|
||||
|
||||
if not os.path.isabs(path):
|
||||
env_base.Prepend(CPPPATH=["#" + path, "#" + os.path.dirname(path)])
|
||||
else:
|
||||
env_base.Prepend(CPPPATH=[path, os.path.dirname(path)])
|
||||
|
||||
# Note: custom modules can override built-in ones.
|
||||
modules_detected.update(modules)
|
||||
|
||||
|
@ -439,7 +439,7 @@ def convert_custom_modules_path(path):
|
||||
if path == os.path.realpath("modules"):
|
||||
raise ValueError(err_msg % "be a directory other than built-in `modules` directory.")
|
||||
|
||||
current_path = os.path.realpath(".")
|
||||
current_path = os.path.realpath(".") + "/"
|
||||
|
||||
if path.startswith(current_path):
|
||||
path = path.replace(current_path, "", 1)
|
||||
|
@ -17,8 +17,12 @@ env.modules_sources = []
|
||||
env_modules.add_source_files(env.modules_sources, "register_module_types.gen.cpp")
|
||||
|
||||
for name, path in env.module_list.items():
|
||||
|
||||
if not os.path.isabs(path):
|
||||
SConscript(name + "/SCsub") # Built-in.
|
||||
if path.startswith("modules/"):
|
||||
SConscript(name + "/SCsub") # Built-in.
|
||||
else:
|
||||
SConscript("../" + path + "/SCsub") # In the engine's folder, so start from there
|
||||
else:
|
||||
SConscript(path + "/SCsub") # Custom.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user