Skip to content
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

Fixes build errors on Windows when project path contains spaces #196

Merged
merged 1 commit into from
May 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.cmd
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@call %~dp0run.cmd build %*
@call "%~dp0run.cmd" build %*
@exit /b %ERRORLEVEL%
6 changes: 3 additions & 3 deletions run.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
set DOTNET_MULTILEVEL_LOOKUP=0

:: Restore the Tools directory
call %~dp0init-tools.cmd
call "%~dp0init-tools.cmd"
if NOT [%ERRORLEVEL%]==[0] exit /b 1

set _toolRuntime=%~dp0Tools
Expand All @@ -21,8 +21,8 @@ set _json=%~dp0config.json
:: run.exe depends on running in the root directory, notably because the config.json specifies
:: a relative path to the binclash logger

pushd %~dp0
call %_dotnet% %_toolRuntime%\run.exe "%_json%" %*
pushd "%~dp0"
call "%_dotnet%" "%_toolRuntime%\run.exe" "%_json%" %*
popd

exit /b %ERRORLEVEL%
8 changes: 4 additions & 4 deletions src/Native/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ shift
goto :Arg_Loop

:ToolsVersion

if defined VisualStudioVersion goto :RunVCVars

set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
Expand All @@ -37,7 +36,8 @@ if exist %_VSWHERE% (
if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS%
if not exist "%_VSCOMNTOOLS%" goto :MissingVersion

set VSCMD_START_DIR="%__currentScriptDir%"

set "VSCMD_START_DIR=%__currentScriptDir%"
call "%_VSCOMNTOOLS%\VsDevCmd.bat"

:RunVCVars
Expand Down Expand Up @@ -92,8 +92,8 @@ if not exist "%__IntermediatesDir%" md "%__IntermediatesDir%"

:: Regenerate the VS solution

set __gen-buildsys-win-path=%__currentScriptDir%\gen-buildsys-win.bat
set __source-code-path=%__currentScriptDir%
set "__gen-buildsys-win-path=%__currentScriptDir%\gen-buildsys-win.bat"
set "__source-code-path=%__currentScriptDir%"

echo Calling "%__gen-buildsys-win-path%" "%__source-code-path%" "%__VSVersion%" %__BuildArch%
pushd "%__IntermediatesDir%"
Expand Down
2 changes: 1 addition & 1 deletion src/Native/build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

<!-- Run script that invokes Cmake to create VS files, and then calls msbuild to compile them -->
<Message Text="$(MSBuildProjectDirectory)\build.cmd $(BuildArgs)" Importance="High"/>
<Exec Command="$(MSBuildProjectDirectory)\build.cmd $(BuildArgs)" />
<Exec Command="&quot;$(MSBuildProjectDirectory)\build.cmd&quot; $(BuildArgs)" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears the unix build has the same issue. Would it be possible to fix the Unix build as well?

Copy link
Contributor Author

@tincann tincann May 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Certainly, I have some time in the end of the week. Shall I put this in a new pull request, so the Windows fix can already be put to use now?

Copy link
Member

@eerhardt eerhardt May 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is totally fine with me to create another PR for that.


</Target>

Expand Down