summaryrefslogtreecommitdiff
path: root/init-tools.cmd
diff options
context:
space:
mode:
authorMikhail Pilin <ww898@users.noreply.github.com>2016-04-22 11:52:07 +0200
committerJan Kotas <jkotas@microsoft.com>2016-04-22 02:52:07 -0700
commit4e769b7658f239cff2a0c80b673b91de8d686388 (patch)
tree8e9bf2035195f6eaf55e87a708e699b4cdf0843e /init-tools.cmd
parent26f12966e33a6eba09d071451b2c60e3ea44047f (diff)
downloadcoreclr-4e769b7658f239cff2a0c80b673b91de8d686388.tar.gz
coreclr-4e769b7658f239cff2a0c80b673b91de8d686388.tar.bz2
coreclr-4e769b7658f239cff2a0c80b673b91de8d686388.zip
Partly fix the build issue when path to git repository has spaces (for example "d:\z z\coreclr"). (#4388)
The same issue in "d:\z z\coreclr\Tools\versioning.targets"(288): $(IntermediateOutputPath) should be "$(IntermediateOutputPath.TrimEnd('\'))" and all other path should be quoted with &quot; in this line.
Diffstat (limited to 'init-tools.cmd')
-rw-r--r--init-tools.cmd20
1 files changed, 10 insertions, 10 deletions
diff --git a/init-tools.cmd b/init-tools.cmd
index f95f56e57e..d15c641e5a 100644
--- a/init-tools.cmd
+++ b/init-tools.cmd
@@ -7,7 +7,7 @@ set TOOLRUNTIME_DIR=%~dp0Tools
set DOTNET_PATH=%TOOLRUNTIME_DIR%\dotnetcli\
set DOTNET_CMD=%DOTNET_PATH%dotnet.exe
if [%BUILDTOOLS_SOURCE%]==[] set BUILDTOOLS_SOURCE=https://www.myget.org/F/dotnet-buildtools/
-set /P BUILDTOOLS_VERSION=< %~dp0BuildToolsVersion.txt
+set /P BUILDTOOLS_VERSION=< "%~dp0BuildToolsVersion.txt"
set BUILD_TOOLS_PATH=%PACKAGES_DIR%Microsoft.DotNet.BuildTools\%BUILDTOOLS_VERSION%\lib\
set PROJECT_JSON_PATH=%TOOLRUNTIME_DIR%\%BUILDTOOLS_VERSION%
set PROJECT_JSON_FILE=%PROJECT_JSON_PATH%\project.json
@@ -36,19 +36,19 @@ if NOT exist "%PACKAGES_DIR%NuGet.exe" (
)
if NOT exist "%PROJECT_JSON_PATH%" mkdir "%PROJECT_JSON_PATH%"
-echo %PROJECT_JSON_CONTENTS% > %PROJECT_JSON_FILE%
-echo Running %0 > %INIT_TOOLS_LOG%
+echo %PROJECT_JSON_CONTENTS% > "%PROJECT_JSON_FILE%"
+echo Running %0 > "%INIT_TOOLS_LOG%"
if exist "%DOTNET_CMD%" goto :afterdotnetrestore
echo Installing dotnet cli...
if NOT exist "%DOTNET_PATH%" mkdir "%DOTNET_PATH%"
-set /p DOTNET_VERSION=< %~dp0DotnetCLIVersion.txt
+set /p DOTNET_VERSION=< "%~dp0DotnetCLIVersion.txt"
set DOTNET_ZIP_NAME=dotnet-dev-win-x64.%DOTNET_VERSION%.zip
set DOTNET_REMOTE_PATH=https://dotnetcli.blob.core.windows.net/dotnet/beta/Binaries/%DOTNET_VERSION%/%DOTNET_ZIP_NAME%
set DOTNET_LOCAL_PATH=%DOTNET_PATH%%DOTNET_ZIP_NAME%
-echo Installing '%DOTNET_REMOTE_PATH%' to '%DOTNET_LOCAL_PATH%' >> %INIT_TOOLS_LOG%
-powershell -NoProfile -ExecutionPolicy unrestricted -Command "(New-Object Net.WebClient).DownloadFile('%DOTNET_REMOTE_PATH%', '%DOTNET_LOCAL_PATH%'); Add-Type -Assembly 'System.IO.Compression.FileSystem' -ErrorVariable AddTypeErrors; if ($AddTypeErrors.Count -eq 0) { [System.IO.Compression.ZipFile]::ExtractToDirectory('%DOTNET_LOCAL_PATH%', '%DOTNET_PATH%') } else { (New-Object -com shell.application).namespace('%DOTNET_PATH%').CopyHere((new-object -com shell.application).namespace('%DOTNET_LOCAL_PATH%').Items(),16) }" >> %INIT_TOOLS_LOG%
+echo Installing '%DOTNET_REMOTE_PATH%' to '%DOTNET_LOCAL_PATH%' >> "%INIT_TOOLS_LOG%"
+powershell -NoProfile -ExecutionPolicy unrestricted -Command "(New-Object Net.WebClient).DownloadFile('%DOTNET_REMOTE_PATH%', '%DOTNET_LOCAL_PATH%'); Add-Type -Assembly 'System.IO.Compression.FileSystem' -ErrorVariable AddTypeErrors; if ($AddTypeErrors.Count -eq 0) { [System.IO.Compression.ZipFile]::ExtractToDirectory('%DOTNET_LOCAL_PATH%', '%DOTNET_PATH%') } else { (New-Object -com shell.application).namespace('%DOTNET_PATH%').CopyHere((new-object -com shell.application).namespace('%DOTNET_LOCAL_PATH%').Items(),16) }" >> "%INIT_TOOLS_LOG%"
if NOT exist "%DOTNET_LOCAL_PATH%" (
echo ERROR: Could not install dotnet cli correctly. See '%INIT_TOOLS_LOG%' for more details.
set TOOLS_INIT_RETURN_CODE=1
@@ -59,8 +59,8 @@ if NOT exist "%DOTNET_LOCAL_PATH%" (
if exist "%BUILD_TOOLS_PATH%" goto :afterbuildtoolsrestore
echo Restoring BuildTools version %BUILDTOOLS_VERSION%...
-echo Running: "%DOTNET_CMD%" restore "%PROJECT_JSON_FILE%" --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" >> %INIT_TOOLS_LOG%
-call "%DOTNET_CMD%" restore "%PROJECT_JSON_FILE%" --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" >> %INIT_TOOLS_LOG%
+echo Running: "%DOTNET_CMD%" restore "%PROJECT_JSON_FILE%" --packages "%PACKAGES_DIR% " --source "%BUILDTOOLS_SOURCE%" >> "%INIT_TOOLS_LOG%"
+call "%DOTNET_CMD%" restore "%PROJECT_JSON_FILE%" --packages "%PACKAGES_DIR% " --source "%BUILDTOOLS_SOURCE%" >> "%INIT_TOOLS_LOG%"
if NOT exist "%BUILD_TOOLS_PATH%init-tools.cmd" (
echo ERROR: Could not restore build tools correctly. See '%INIT_TOOLS_LOG%' for more details.
set TOOLS_INIT_RETURN_CODE=1
@@ -70,8 +70,8 @@ if NOT exist "%BUILD_TOOLS_PATH%init-tools.cmd" (
:afterbuildtoolsrestore
echo Initializing BuildTools ...
-echo Running: "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> %INIT_TOOLS_LOG%
-call "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> %INIT_TOOLS_LOG%
+echo Running: "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> "%INIT_TOOLS_LOG%"
+call "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> "%INIT_TOOLS_LOG%"
:: Create sempahore file
echo Done initializing tools.