aboutsummaryrefslogtreecommitdiff
path: root/src/test/sandbox/startup.bat
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/sandbox/startup.bat')
-rw-r--r--src/test/sandbox/startup.bat57
1 files changed, 29 insertions, 28 deletions
diff --git a/src/test/sandbox/startup.bat b/src/test/sandbox/startup.bat
index 7b9b603f..8feaddd1 100644
--- a/src/test/sandbox/startup.bat
+++ b/src/test/sandbox/startup.bat
@@ -12,44 +12,45 @@ goto ERROR_NO_CONFIG
12 12
13:ZIP 13:ZIP
14mkdir "%ProgramFiles%\dotnet" 14mkdir "%ProgramFiles%\dotnet"
15if exist %SANDBOX_FILES%\dotnet-sdk.zip ( 15if exist %SANDBOX_FILES%\assets\dotnet-sdk-64.zip (
16 tar -oxzf "%SANDBOX_FILES%\dotnet-sdk.zip" -C "%ProgramFiles%\dotnet" 16 tar -oxzf "%SANDBOX_FILES%\assets\dotnet-sdk-64.zip" -C "%ProgramFiles%\dotnet"
17) else ( 17) else (
18 if %PROCESSOR_ARCHITECTURE%=="ARM64" ( 18 goto ERROR_NO_DOTNET
19 curl -L https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-arm64.zip --output dotnet-sdk.zip 19)
20 ) else ( 20if exist %SANDBOX_FILES%\assets\windowsdesktop-runtime-64.zip (
21 curl -L https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-x64.zip --output dotnet-sdk.zip 21 tar -oxzf "%SANDBOX_FILES%\assets\windowsdesktop-runtime-64.zip" -C "%ProgramFiles%\dotnet"
22 ) 22) else (
23 if %errorlevel% NEQ 0 ( 23 goto ERROR_NO_DOTNET
24 echo "No pre-provided dotnet sdk, and failed to download. Confirm networking is available." 24)
25 goto ERROR_NO_DOTNET 25if exist %SANDBOX_FILES%\assets\dotnet-runtime-x86.zip (
26 ) 26 mkdir "%ProgramFiles(x86)%\dotnet"
27 tar -oxzf dotnet-sdk.zip -C "%ProgramFiles%\dotnet" 27 tar -oxzf "%SANDBOX_FILES%\assets\dotnet-runtime-x86.zip" -C "%ProgramFiles(x86)%\dotnet"
28 del dotnet-sdk.zip 28)
29if exist %SANDBOX_FILES%\assets\windowsdesktop-runtime-x86.zip (
30 tar -oxzf "%SANDBOX_FILES%\assets\windowsdesktop-runtime-x86.zip" -C "%ProgramFiles(x86)%\dotnet"
29) 31)
30goto PROCEED 32goto PROCEED
31 33
32:EXE 34:EXE
33if exist %SANDBOX_FILES%\dotnet-sdk.exe ( 35if exist %SANDBOX_FILES%\assets\dotnet-sdk-64.exe (
34 "%SANDBOX_FILES%\dotnet-sdk.exe" /install /quiet /norestart 36 "%SANDBOX_FILES%\assets\dotnet-sdk-64.exe" /install /quiet /norestart
35) else ( 37) else (
36 if %PROCESSOR_ARCHITECTURE%=="ARM64" ( 38 goto ERROR_NO_DOTNET
37 curl -L https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-arm64.exe --output dotnet-sdk.exe 39)
38 ) else ( 40if exist %SANDBOX_FILES%\assets\windowsdesktop-runtime-64.exe (
39 curl -L https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-x64.exe --output dotnet-sdk.exe 41 "%SANDBOX_FILES%\assets\windowsdesktop-runtime-64.exe" /install /quiet /norestart
40 ) 42) else (
41 if %errorlevel% NEQ 0 ( 43 goto ERROR_NO_DOTNET
42 echo "No pre-provided dotnet sdk, and failed to download. Confirm networking is available." 44)
43 goto ERROR_NO_DOTNET 45if exist %SANDBOX_FILES%\assets\windowsdesktop-runtime-x86.exe (
44 ) 46 "%SANDBOX_FILES%\assets\windowsdesktop-runtime-x86.exe" /install /quiet /norestart
45 dotnet-sdk.exe /install /quiet /norestart
46) 47)
47goto PROCEED 48goto PROCEED
48 49
49:PROCEED 50:PROCEED
50endlocal 51endlocal
51SETX PATH "%PATH%;%ProgramFiles%\dotnet" /M 52SETX PATH "%PATH%;%ProgramFiles%\dotnet;%ProgramFiles(x86)%\dotnet" /M
52SET PATH=%PATH%;%ProgramFiles%\dotnet 53SET PATH=%PATH%;%ProgramFiles%\dotnet;%ProgramFiles(x86)%\dotnet
53 54
54dotnet nuget locals all --clear 55dotnet nuget locals all --clear
55dotnet help 56dotnet help
@@ -65,6 +66,6 @@ goto END
65 66
66 67
67:ERROR_NO_DOTNET 68:ERROR_NO_DOTNET
68start "ERROR" CMD /c echo ERROR: Failed to find dotnet install, and download failed. Run setup_sandbox.bat again ^& pause 69start "ERROR" CMD /c echo ERROR: Failed to find dotnet install files. Run setup_sandbox.bat again ^& pause
69 70
70:END 71:END