Skip to content

Commit 8b6ba62

Browse files
committed
Fixes build errors when project path contains spaces
1 parent 3f586bd commit 8b6ba62

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

build.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
@call %~dp0run.cmd build %*
1+
@call "%~dp0run.cmd" build %*
22
@exit /b %ERRORLEVEL%

run.cmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
1111
set DOTNET_MULTILEVEL_LOOKUP=0
1212

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

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

24-
pushd %~dp0
25-
call %_dotnet% %_toolRuntime%\run.exe "%_json%" %*
24+
pushd "%~dp0"
25+
call "%_dotnet%" "%_toolRuntime%\run.exe" "%_json%" %*
2626
popd
2727

2828
exit /b %ERRORLEVEL%

src/Native/build.cmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ shift
2727
goto :Arg_Loop
2828

2929
:ToolsVersion
30-
3130
if defined VisualStudioVersion goto :RunVCVars
3231

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

40-
set VSCMD_START_DIR="%__currentScriptDir%"
39+
40+
set VSCMD_START_DIR=%__currentScriptDir%
4141
call "%_VSCOMNTOOLS%\VsDevCmd.bat"
4242

4343
:RunVCVars
@@ -92,8 +92,8 @@ if not exist "%__IntermediatesDir%" md "%__IntermediatesDir%"
9292

9393
:: Regenerate the VS solution
9494

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

9898
echo Calling "%__gen-buildsys-win-path%" "%__source-code-path%" "%__VSVersion%" %__BuildArch%
9999
pushd "%__IntermediatesDir%"

src/Native/build.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

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

4949
</Target>
5050

0 commit comments

Comments
 (0)