Compare commits

...

4 Commits

Author SHA1 Message Date
Kehom 00ca87a6eb
Merge 35905b11f3 into 36847f6af0 2024-01-22 20:16:49 +01:00
David Snopek 36847f6af0
Merge pull request #1370 from MJacred/patch-1
Update README: fix godot-cpp issue tracker url
2024-01-22 08:57:08 -06:00
MJacred 8a535d0ecc
Update README: fix godot-cpp issue tracker url 2024-01-22 10:50:27 +01:00
Kehom 35905b11f3 Merge branch 'master' of https://github.com/Kehom/godot-cpp 2024-01-12 12:15:48 -03:00
3 changed files with 24 additions and 14 deletions

View File

@ -58,7 +58,7 @@ first-party `godot-cpp` extension.
Some compatibility breakage is to be expected as GDExtension and `godot-cpp`
get more used, documented, and critical issues get resolved. See the
[Godot issue tracker](https://github.com/godotengine/godot/issues?q=is%3Aissue+is%3Aopen+label%3Atopic%3Agdextension)
and the [godot-cpp issue tracker](https://github.com/godotengine/godot/issues)
and the [godot-cpp issue tracker](https://github.com/godotengine/godot-cpp/issues)
for a list of known issues, and be sure to provide feedback on issues and PRs
which affect your use of this extension.

View File

@ -21,16 +21,15 @@ env.PrependENVPath("PATH", os.getenv("PATH"))
# Custom options and profile flags.
customs = ["custom.py"]
try:
customs += Import("customs")
except:
pass
profile = ARGUMENTS.get("profile", "")
if profile:
if os.path.isfile(profile):
customs.append(profile)
elif os.path.isfile(profile + ".py"):
customs.append(profile + ".py")
if not profile.endswith('.py'):
profile += '.py'
path = str(Entry('#' + profile))
if (os.path.isfile(path)):
customs.append(path)
opts = Variables(customs, ARGUMENTS)
cpp_tool = Tool("godotcpp", toolpath=["tools"])
cpp_tool.options(opts, env)
@ -39,11 +38,13 @@ opts.Update(env)
Help(opts.GenerateHelpText(env))
# Detect and print a warning listing unknown SCons variables to ease troubleshooting.
unknown = opts.UnknownVariables()
if unknown:
print("WARNING: Unknown SCons variables were passed and will be ignored:")
for item in unknown.items():
print(" " + item[0] + "=" + item[1])
# But only do that if this is top level SConstruct, not subsidiary
if Dir("#").abspath == Dir(".").abspath:
unknown = opts.UnknownVariables()
if unknown:
print("WARNING: Unknown SCons variables were passed and will be ignored:")
for item in unknown.items():
print(" " + item[0] + "=" + item[1])
scons_cache_path = os.environ.get("SCONS_CACHE")
if scons_cache_path is not None:

View File

@ -198,6 +198,15 @@ def options(opts, env):
)
)
opts.Add(
PathVariable(
key="profile",
help="Allow specification of customization file other than `custom.py`.",
default=env.get("profile", None),
validator=validate_file,
)
)
# Add platform options
for pl in platforms:
tool = Tool(pl, toolpath=["tools"])