diff options
author | Bevan Weiss <bevan.weiss@gmail.com> | 2024-06-27 18:34:50 +1000 |
---|---|---|
committer | Bob Arnson <github@bobs.org> | 2024-07-04 19:25:49 -0400 |
commit | 596b4c4ae90b757b069a97ef40de67a7d1f9ab73 (patch) | |
tree | 18edf9a51f46ac0724180f1db5d3b0d368f4050c /src/test/sandbox/startup.bat | |
parent | 83d92ef88270a740bc96609f8d967986e4f91e99 (diff) | |
download | wix-596b4c4ae90b757b069a97ef40de67a7d1f9ab73.tar.gz wix-596b4c4ae90b757b069a97ef40de67a7d1f9ab73.tar.bz2 wix-596b4c4ae90b757b069a97ef40de67a7d1f9ab73.zip |
No longer support downloading within the Sandbox. Just error instead.
Install both the x64 AND the x86 versions of Windows Desktop Runtime.
Needed for the Burn Integration tests.
And having dotnet files in the sandbox directory was annoying, so put
them all into an assets directory
Signed-off-by: Bevan Weiss <bevan.weiss@gmail.com>
Diffstat (limited to 'src/test/sandbox/startup.bat')
-rw-r--r-- | src/test/sandbox/startup.bat | 57 |
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 |
14 | mkdir "%ProgramFiles%\dotnet" | 14 | mkdir "%ProgramFiles%\dotnet" |
15 | if exist %SANDBOX_FILES%\dotnet-sdk.zip ( | 15 | if 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 ( | 20 | if 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 | 25 | if 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 | ) |
29 | if exist %SANDBOX_FILES%\assets\windowsdesktop-runtime-x86.zip ( | ||
30 | tar -oxzf "%SANDBOX_FILES%\assets\windowsdesktop-runtime-x86.zip" -C "%ProgramFiles(x86)%\dotnet" | ||
29 | ) | 31 | ) |
30 | goto PROCEED | 32 | goto PROCEED |
31 | 33 | ||
32 | :EXE | 34 | :EXE |
33 | if exist %SANDBOX_FILES%\dotnet-sdk.exe ( | 35 | if 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 ( | 40 | if 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 | 45 | if 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 | ) |
47 | goto PROCEED | 48 | goto PROCEED |
48 | 49 | ||
49 | :PROCEED | 50 | :PROCEED |
50 | endlocal | 51 | endlocal |
51 | SETX PATH "%PATH%;%ProgramFiles%\dotnet" /M | 52 | SETX PATH "%PATH%;%ProgramFiles%\dotnet;%ProgramFiles(x86)%\dotnet" /M |
52 | SET PATH=%PATH%;%ProgramFiles%\dotnet | 53 | SET PATH=%PATH%;%ProgramFiles%\dotnet;%ProgramFiles(x86)%\dotnet |
53 | 54 | ||
54 | dotnet nuget locals all --clear | 55 | dotnet nuget locals all --clear |
55 | dotnet help | 56 | dotnet help |
@@ -65,6 +66,6 @@ goto END | |||
65 | 66 | ||
66 | 67 | ||
67 | :ERROR_NO_DOTNET | 68 | :ERROR_NO_DOTNET |
68 | start "ERROR" CMD /c echo ERROR: Failed to find dotnet install, and download failed. Run setup_sandbox.bat again ^& pause | 69 | start "ERROR" CMD /c echo ERROR: Failed to find dotnet install files. Run setup_sandbox.bat again ^& pause |
69 | 70 | ||
70 | :END | 71 | :END |