-
-
Notifications
You must be signed in to change notification settings - Fork 613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SCons warning message with custom variables #1334
Comments
I have been testing a bunch with customizing the Extension build and have noticed several usability quirks as well as some "bugs"?.
Yet, I do like the fact that current setup allows the extension's SConstruct to skip "reading" the variables/profile since the godot-cpp one already deals with it (and add such data into the environment). Locally I have changed the godot-cpp SConstruct to deal with the
try:
customs += Import("customs")
except:
pass Regardless if we
|
Thanks! Hm. Since we do expect the |
I did indeed consider if the if Dir("#").abspath == Dir(".").abspath:
# this is top-level script I did see if there was any other option, but all of them seemed unreliable because of current directory being changed and all. I don't believe Dir(".") will have unreliable results, but then, I have very little experience with SCons (and Python), so I'm unsure of the reliability here. I have quickly tested that code and it seemed to be working. |
I have been experimenting with the
As an example, if I use At this point I just gave up on using the Unknown variables thingy within my extension's SConstruct. PS: should I submit a PR as a draft (or something of the like) or more discussion is required? Or someone else with more knowledge adds the changes/fixes to the SConstruct (and tools/godocpp.py)? |
If you have a proposal for how this could be fixed, then please make a draft PR! |
Godot version
4.2
godot-cpp version
4.2
System information
Windows 10 and Linux Mint
Issue description
SCons provides means for us to add custom variables and easily parse them within the build script. I started to explore this to give users options to disable certain parts of addon. While the build did work, I got the
WARNING: Unknown SCons variables were passed and will be ignored
message. Because I'm learning SCons this made me extremely confused, specially because I couldn't find any help regarding this error.Upon digging up I did find this in the godot-cpp SConstruct script:
Ahhh, that's where the message is coming from! Since I still can deal with the extra variables and generate the expected binary I'm aware that I can safely ignore that warning message. However I think anyone attempting to perform a custom build will be greeted by the message and most likely be very confused by that.
I did a (rather small) local change to this script that allows me to create custom variables. So in my extension's SConstruct I can either
or
Then desirable custom variables won't generate the warning message. Is this a good solution or there something better? Also, if this is good enough I can PR the change.
Steps to reproduce
Somewhat in the description of the "bug"
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: