-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Generate project files for VS2017 #10727
Conversation
This looks fine, but I wonder if we could move this logic out of SConstruct and put it instead in |
7ee3a66
to
0d327df
Compare
No problem, pushed an updated version. |
Actually I was thinking more to move everything after |
Ah, I see. I didn't want to change too much of the existing build file but I can try to see how it would work out. |
515ca16
to
c0f20d4
Compare
OK, everything (except for an old comment) is in |
SConstruct
Outdated
AddToVSProject(env.scene_sources) | ||
AddToVSProject(env.servers_sources) | ||
AddToVSProject(env.editor_sources) | ||
|
||
# this env flag won't work, it needs to be set in env_base=Environment(MSVC_VERSION='9.0') |
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 can safely go away.
530fccf
to
db0e9c6
Compare
Removed the comment, as requested in the review. |
- Cherry picked godotengine#10662 and fixed merge conflicts. - Manualy merged the change from godotengine#11904. - Did not merge godotengine#12236 since I'm not sure whether the issue affects Godot 2.1 and I don't have VS2013 to test. - Did not merge godotengine#11843 since it doesn't seem relevant (the code is only needed for creating DONORS.md, etc.). - Did not merge godotengine#10727 and godotengine#11752 since they seem to be already included in godotengine#11742. - The Windows and Linux builds have been tested with Scons 3.0 using Python 3. - OSX and iOS should hopefully work but are not tested since I don't have a Mac. - Builds using SCons 2.5 and Python 2 should not be impacted.
This patch generates VS project files for the default version of Visual Studio that is installed on the build machine. It uses SCons functions to determine what the default version of VS/VC is. This means that SCons 2.5.* will not detect a VS2017 installation and fall back to VS2015. SCons 3.0 alpha generates projects for VS2017 if it is installed. (More precisely, if VS2017 is installed in such a way that it is recognized as the default, which should typically be the case even if both VS2015 and VS2017 are available).
Whereas previously the value of the
-j
flag was hardcoded to 2, the VS build now uses the same number of threads as the SCons run that generated the solution files.Another change to the previous behavior is that the path to the batch file that sets up the VS environment is now generated when the
SConstruct
file is run; previously it queried the value of the environment variableVCInstallDir
when building Godot. I don't think this change matters, but it might impact people who have strange VS2015 setups.I've also refactored the code a bit to avoid the extremely long and repetitive strings in the source and fixed (what I believe was) a minor bug: one of the command lines used
&
instead of^&
in one place, and I could see no real reason for this difference.