Skip to content

Commit

Permalink
Fixes build errors caused by spaces in the project path (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
tincann authored and Ivanidzo4ka committed May 23, 2018
1 parent 73d894b commit 76393f4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
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)" />

</Target>

Expand Down

0 comments on commit 76393f4

Please sign in to comment.