blob: 52f550eee21719c1016c432a99ad03921c0f8894 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
@setlocal
@echo off
SET DOTNET_VERSION=8.0
SET SANDBOX_FILES=C:\sandbox
set /p InstallMethod=<%SANDBOX_FILES%\dotnet.cfg
pushd "%TEMP%"
if "%InstallMethod%"=="EXE" goto EXE
if "%InstallMethod%"=="ZIP" goto ZIP
goto ERROR_NO_CONFIG
:ZIP
mkdir "%ProgramFiles%\dotnet"
if exist %SANDBOX_FILES%\assets\dotnet-sdk-64.zip (
tar -oxzf "%SANDBOX_FILES%\assets\dotnet-sdk-64.zip" -C "%ProgramFiles%\dotnet"
) else (
goto ERROR_NO_DOTNET
)
if exist %SANDBOX_FILES%\assets\windowsdesktop-runtime-64.zip (
tar -oxzf "%SANDBOX_FILES%\assets\windowsdesktop-runtime-64.zip" -C "%ProgramFiles%\dotnet"
) else (
goto ERROR_NO_DOTNET
)
if exist %SANDBOX_FILES%\assets\dotnet-runtime-x86.zip (
mkdir "%ProgramFiles(x86)%\dotnet"
tar -oxzf "%SANDBOX_FILES%\assets\dotnet-runtime-x86.zip" -C "%ProgramFiles(x86)%\dotnet"
)
if exist %SANDBOX_FILES%\assets\windowsdesktop-runtime-x86.zip (
tar -oxzf "%SANDBOX_FILES%\assets\windowsdesktop-runtime-x86.zip" -C "%ProgramFiles(x86)%\dotnet"
)
goto PROCEED
:EXE
if exist %SANDBOX_FILES%\assets\dotnet-sdk-64.exe (
"%SANDBOX_FILES%\assets\dotnet-sdk-64.exe" /install /quiet /norestart
) else (
goto ERROR_NO_DOTNET
)
if exist %SANDBOX_FILES%\assets\windowsdesktop-runtime-64.exe (
"%SANDBOX_FILES%\assets\windowsdesktop-runtime-64.exe" /install /quiet /norestart
) else (
goto ERROR_NO_DOTNET
)
if exist %SANDBOX_FILES%\assets\windowsdesktop-runtime-x86.exe (
"%SANDBOX_FILES%\assets\windowsdesktop-runtime-x86.exe" /install /quiet /norestart
)
goto PROCEED
:PROCEED
regedit /s "%SANDBOX_FILES%\sandbox_registry"
endlocal
SETX PATH "%PATH%;%ProgramFiles%\dotnet;%ProgramFiles(x86)%\dotnet" /M
SET PATH=%PATH%;%ProgramFiles%\dotnet;%ProgramFiles(x86)%\dotnet
dotnet nuget locals all --clear
dotnet help
popd
cd c:\build
start "Menu" cmd /c C:\sandbox\runtest_menu.bat
goto END
:ERROR_NO_CONFIG
start "ERROR" CMD /c echo ERROR: Host configuration has not been run, run setup_sandbox.bat first ^& pause
goto END
:ERROR_NO_DOTNET
start "ERROR" CMD /c echo ERROR: Failed to find dotnet install files. Run setup_sandbox.bat again ^& pause
:END
|