Add help and verification for --project option in SConstruct
This commit is contained in:
parent
304bd86220
commit
bf33917cfd
25
SConstruct
25
SConstruct
|
@ -5,12 +5,12 @@ import sys
|
||||||
# This is SConstruct file for building GDExtension variant using SCONS build system.
|
# This is SConstruct file for building GDExtension variant using SCONS build system.
|
||||||
# For module variant, see SCsub file.
|
# For module variant, see SCsub file.
|
||||||
|
|
||||||
# For custom projects, you can customize output path for artifacts: scons --project=PATH_TO_YOUR_PROJECT
|
# Use --project=DIR to customize output path for built targets.
|
||||||
# - artifacts are placed into "addons/limboai/bin" subdirectory inside the project directory.
|
# - Built targets are placed into "DIR/addons/limboai/bin".
|
||||||
# - for example: scons --project="../my_project"
|
# - For example: scons --project="../my_project"
|
||||||
# - artifacts will be placed into "../my_project/addons/limboai/bin" relative to "limboai/" source dir.
|
# - built targets will be placed into "../my_project/addons/limboai/bin".
|
||||||
# - if not specified, the artifacts will be places in the demo/ project.
|
# - If not specified, built targets are put into the demo/ project.
|
||||||
# - For plugin to be loaded, create "addons/limboai/bin" directory in your project and copy limboai.gdextension file to it.
|
# - For plugin to be loaded, copy limboai.gdextension into "addons/limboai/bin" dir.
|
||||||
|
|
||||||
AddOption(
|
AddOption(
|
||||||
"--project",
|
"--project",
|
||||||
|
@ -20,9 +20,20 @@ AddOption(
|
||||||
action="store",
|
action="store",
|
||||||
metavar="DIR",
|
metavar="DIR",
|
||||||
default="demo",
|
default="demo",
|
||||||
help="Specify project directory.",
|
help="Specify project directory",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
help_text = """
|
||||||
|
Options:
|
||||||
|
--project=DIR Specify project directory (default: "demo");
|
||||||
|
built targets will be placed in DIR/addons/limboai/bin
|
||||||
|
"""
|
||||||
|
Help(help_text)
|
||||||
|
|
||||||
project_dir = GetOption("project")
|
project_dir = GetOption("project")
|
||||||
|
if not os.path.isdir(project_dir):
|
||||||
|
print("Project directory not found: " + project_dir)
|
||||||
|
Exit(1)
|
||||||
|
|
||||||
env = SConscript("godot-cpp/SConstruct")
|
env = SConscript("godot-cpp/SConstruct")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue