diff options
author | Bevan Weiss <bevan.weiss@gmail.com> | 2024-06-26 18:41:08 +1000 |
---|---|---|
committer | Bob Arnson <github@bobs.org> | 2024-07-04 19:25:49 -0400 |
commit | 83d92ef88270a740bc96609f8d967986e4f91e99 (patch) | |
tree | fe41ddf912436110128ecc6fbd8d303bd7db260b /src/test/sandbox/setup_sandbox.bat | |
parent | 89dc7b47809da06a69811788a1a990e216b81a5c (diff) | |
download | wix-83d92ef88270a740bc96609f8d967986e4f91e99.tar.gz wix-83d92ef88270a740bc96609f8d967986e4f91e99.tar.bz2 wix-83d92ef88270a740bc96609f8d967986e4f91e99.zip |
Added host menu options for EXE / ZIP installation
Removed ARM64/AMD64 folders for dotnet, the Sandbox MUST match the host
here, so no point downloading the installer for the non-host platform.
Debugger could probably be reduced in the same manner, but have not in
this iteration.
Have also added a simple README, just to explain (very basic) operation.
Signed-off-by: Bevan Weiss <bevan.weiss@gmail.com>
Diffstat (limited to 'src/test/sandbox/setup_sandbox.bat')
-rw-r--r-- | src/test/sandbox/setup_sandbox.bat | 59 |
1 files changed, 43 insertions, 16 deletions
diff --git a/src/test/sandbox/setup_sandbox.bat b/src/test/sandbox/setup_sandbox.bat index c4378f52..dc462324 100644 --- a/src/test/sandbox/setup_sandbox.bat +++ b/src/test/sandbox/setup_sandbox.bat | |||
@@ -2,20 +2,41 @@ | |||
2 | @echo off | 2 | @echo off |
3 | SET DOTNET_VERSION=8.0 | 3 | SET DOTNET_VERSION=8.0 |
4 | 4 | ||
5 | if not exist AMD64 (mkdir AMD64) | 5 | :MENU |
6 | if not exist ARM64 (mkdir ARM64) | 6 | cls |
7 | REM if not exist VSTest (mkdir VSTest) | 7 | echo [0] Setup EXE install of DotNet for Sandbox |
8 | 8 | echo [1] Setup ZIP install of DotNet for Sandbox | |
9 | @echo on | 9 | echo [q] Quit |
10 | REM curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-x64.zip --output ".\AMD64\dotnet-runtime.zip" | 10 | set /P "Option=Please select install option: " |
11 | curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-x64.zip --output ".\AMD64\dotnet-sdk.zip" | 11 | if "%Option%"=="q" goto END |
12 | REM curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-runtime-win-arm64.zip --output ".\ARM64\dotnet-runtime.zip" | 12 | if "%Option%"=="0" goto EXE |
13 | curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-arm64.zip --output ".\ARM64\dotnet-sdk.zip" | 13 | if "%Option%"=="1" goto ZIP |
14 | @echo off | 14 | |
15 | :MENUERROR | ||
16 | cls | ||
17 | echo ERROR: Invalid Option Selected!! | ||
18 | pause | ||
19 | goto MENU | ||
20 | |||
21 | :EXE | ||
22 | echo EXE> dotnet.cfg | ||
23 | if %PROCESSOR_ARCHITECTURE%=="ARM64" ( | ||
24 | curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-arm64.exe --output ".\dotnet-sdk.exe" | ||
25 | ) else ( | ||
26 | curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-x64.exe --output ".\dotnet-sdk.exe" | ||
27 | ) | ||
28 | goto VSDEBUG | ||
15 | 29 | ||
16 | REM curl -L0 https://aka.ms/vs/17/release/RemoteTools.amd64ret.enu.exe --output ".\AMD64\RemoteTools.exe" | 30 | :ZIP |
17 | REM curl -L0 https://aka.ms/vs/17/release/RemoteTools.arm64ret.enu.exe --output ".\ARM64\RemoteTools.exe" | 31 | echo ZIP> dotnet.cfg |
32 | if %PROCESSOR_ARCHITECTURE%=="ARM64" ( | ||
33 | curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-arm64.zip --output ".\dotnet-sdk.zip" | ||
34 | ) else ( | ||
35 | curl -L0 https://aka.ms/dotnet/%DOTNET_VERSION%/dotnet-sdk-win-x64.zip --output ".\dotnet-sdk.zip" | ||
36 | ) | ||
37 | goto VSDEBUG | ||
18 | 38 | ||
39 | :VSDEBUG | ||
19 | for /f "usebackq tokens=*" %%i in (`"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.VisualStudio.Debugger.Remote -property installationPath`) do ( | 40 | for /f "usebackq tokens=*" %%i in (`"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.VisualStudio.Debugger.Remote -property installationPath`) do ( |
20 | set VsInstallDir=%%i | 41 | set VsInstallDir=%%i |
21 | ) | 42 | ) |
@@ -28,12 +49,18 @@ if not "!VsInstallDir!"=="" ( | |||
28 | echo. | 49 | echo. |
29 | echo Have found VisualStudio Debugger at '%VsInstallDir%' | 50 | echo Have found VisualStudio Debugger at '%VsInstallDir%' |
30 | set /P "Confirm=Do you wish to copy it for use by the Sandbox? (Y / N):" | 51 | set /P "Confirm=Do you wish to copy it for use by the Sandbox? (Y / N):" |
31 | echo Confirm = %Confirm% | 52 | if "%Confirm%"=="Y" goto VSDEBUG_COPY |
32 | @if "%Confirm%"=="Y" or "%Confirm%"="y" ( | 53 | if "%Confirm%"=="y" goto VSDEBUG_COPY |
33 | XCOPY "%VsInstallDir%\Common7\IDE\Remote Debugger\*" ".\Debugger\" /E /Y | 54 | goto END |
34 | ) | ||
35 | ) | 55 | ) |
56 | goto END | ||
57 | |||
58 | :VSDEBUG_COPY | ||
59 | if not exist Debugger (mkdir Debugger) | ||
60 | XCOPY "%VsInstallDir%\Common7\IDE\Remote Debugger\*" ".\Debugger\" /E /Y > nul | ||
61 | echo Debugger files copied | ||
36 | 62 | ||
37 | 63 | ||
64 | :END | ||
38 | pause | 65 | pause |
39 | @endlocal | 66 | @endlocal |