forked from tModLoader/tModLoader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.bat
42 lines (35 loc) · 1003 Bytes
/
setup.bat
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
@echo off
setlocal enabledelayedexpansion
where git >NUL
if !errorlevel! neq 0 (
echo git not found on PATH
pause
exit /b %errorlevel%
)
set busybox=patches\tModLoader\Terraria\release_extras\LaunchUtils\busybox64.exe
set submoduleupdatemarker=.git\tml-setup-module-init.touch
%busybox% [ .git\index -ot %submoduleupdatemarker% ]
rem a 0 exit code means true, a 1 exit code indicates false, or missing file
if !errorlevel! neq 0 (
echo Restoring git submodules
git submodule update --init --recursive
if !errorlevel! neq 0 (
pause
exit /b %errorlevel%
)
%busybox% touch %submoduleupdatemarker%
)
where dotnet >NUL
if !errorlevel! neq 0 (
echo dotnet not found on PATH. Install .NET Core!
pause
exit /b %errorlevel%
)
endlocal
echo building Setup.GUI.csproj
dotnet build setup/GUI/Setup.GUI.csproj -c Release -p:WarningLevel=0;Platform= -v q
if NOT ["%errorlevel%"]==["0"] (
pause
exit /b %errorlevel%
)
start "" "setup/GUI/bin/Release/net8.0-windows/setup-gui.exe" %*