-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Fix build options configuration for Visual Studio projects #79238
Fix build options configuration for Visual Studio projects #79238
Conversation
2d29d4b
to
33765fd
Compare
This needs a rebase! Also, I think special care needs to be had when using |
I recently dug into this while looking into #81144, and that made me look into build options more carefully, and I'm not sure that we fully need all the options to be passed in. For example, I also wonder whether there aren't options that really shouldn't be passed in 🤔 Are there any other options that we would really want passed in? Maybe things like disabling certain modules, or is that already in? |
33765fd
to
6158578
Compare
I don't have a lot of knowledge of Godot and its build system, so I don't know about any specific flags that should be ignored specifically in Visual Studio projects, except those that I've filtered out in this PR. As I understand, Visual Studio just triggers SCons on build. If so, than I think we should pass as much user input as possible to VS projects, so Visual Studio Godot builds would be the same if we built them from terminal. Of course, there are exceptions. For instance, the In the end, I think it's better to exclude invalid options from user input for VS projects, than to just manually add a check for every new supported option to this VS specific script. This approach will make every new option available for VS projects by default, which is useful since there are a lot of contributors who don't use Visual Studio and who probably don't know that they should be adding their new options to this VS specific method. And as a result, it'll minimize the number of situations when contributors will get different builds using VS project compared to builds from terminal. |
# The "platform" option is ignored because only the Windows platform is currently supported for VS projects | ||
filtered_args.pop("platform", None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine for now, but we might want to look into supporting generating a VS project for other platforms.
Notably we should have a GDK port for Windows eventually, and console ports also typically require using Visual Studio.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I was just ranting about why nobody was doing something like this, and why the vsproj
option was still so limited with a list of hardcoded options being passed.
The So while specifying |
Makes a lot of sense! Just for future documentation purposes, |
Thanks! |
Cherry-picked for 4.1.2. |
Fixes #79127