diff options
author | nicholasbuckner <nicholas.buckner@balliol.ox.ac.uk> | 2017-10-29 21:10:44 +0000 |
---|---|---|
committer | nicholasbuckner <nicholas.buckner@balliol.ox.ac.uk> | 2017-10-29 21:10:44 +0000 |
commit | ad8d8491cdd191ea8a35d8cd893e7fa151b2db4b (patch) | |
tree | 718cc33789ff397e978a40032ab4658a03945e3a | |
parent | cb5f2b258e7740943593486eff6b63d0550eee68 (diff) |
added support for paths with spaces for VSBUILDS
There was a problem with MSBuild in that windows file paths
end with a backslash, which was escaping the last of the double quotes which
surround the $(ProjectDir) directive. This was fixed by removing the
last backslash through changing it to $(ProjectDir.TrimEnd('\')).
-rw-r--r-- | methods.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/methods.py b/methods.py index 0ae831f942..b62dfc6544 100644 --- a/methods.py +++ b/methods.py @@ -1710,9 +1710,13 @@ def generate_vs_project(env, num_jobs): env.AddToVSProject(env.servers_sources) env.AddToVSProject(env.editor_sources) - env['MSVSBUILDCOM'] = build_commandline('scons --directory="$(ProjectDir)" platform=windows target=$(Configuration) tools=!tools! -j' + str(num_jobs)) - env['MSVSREBUILDCOM'] = build_commandline('scons --directory="$(ProjectDir)" platform=windows target=$(Configuration) tools=!tools! vsproj=yes -j' + str(num_jobs)) - env['MSVSCLEANCOM'] = build_commandline('scons --directory="$(ProjectDir)" --clean platform=windows target=$(Configuration) tools=!tools! -j' + str(num_jobs)) + # windows allows us to have spaces in paths, so we need + # to double quote off the directory. However, the path ends + # in a backslash, so we need to remove this, lest it escape the + # last double quote off, confusing MSBuild + env['MSVSBUILDCOM'] = build_commandline('scons --directory="$(ProjectDir.TrimEnd(\'\\\'))" platform=windows target=$(Configuration) tools=!tools! -j' + str(num_jobs)) + env['MSVSREBUILDCOM'] = build_commandline('scons --directory="$(ProjectDir.TrimEnd(\'\\\'))" platform=windows target=$(Configuration) tools=!tools! vsproj=yes -j' + str(num_jobs)) + env['MSVSCLEANCOM'] = build_commandline('scons --directory="$(ProjectDir.TrimEnd(\'\\\'))" --clean platform=windows target=$(Configuration) tools=!tools! -j' + str(num_jobs)) # This version information (Win32, x64, Debug, Release, Release_Debug seems to be # required for Visual Studio to understand that it needs to generate an NMAKE |