-
Notifications
You must be signed in to change notification settings - Fork 153
/
Copy pathinstall.bat
80 lines (65 loc) · 2.28 KB
/
install.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
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
73
74
75
76
77
78
79
80
@echo off
@title Server Tools Installer.
set HOME = %USERPROFILE%
call config.bat
echo This will download the game code from git and install the all the files and folders and symbolic links needed to use the server tools in to the current directory.
echo This requires git be installed.
echo Once this is done, you can safely delete this file if you wish.
echo Ready?
pause
call bin/findgit.bat
echo Downloading repo....
git clone %REPO_URL% gitrepo
IF %ERRORLEVEL% NEQ 0 (
echo git clone failed. aborting.
pause
goto ABORT
)
cd gitrepo
git checkout %REPO_BRANCH%
cd ..
echo Repo downloaded.
echo Setting up folders...
mkdir gamecode\a
mkdir gamecode\b
mkdir gamecode\override
mkdir gamedata
mkdir bot
echo Copying things around....
echo (1/3)
xcopy gitrepo\data gamedata\data /Y /X /K /R /H /I /C /V /E /Q >nul
xcopy gitrepo\config gamedata\config /Y /X /K /R /H /I /C /V /E /Q >nul
xcopy gitrepo\cfg gamedata\cfg /Y /X /K /R /H /I /C /V /E /Q >nul
xcopy gitrepo\bot bot /Y /X /K /R /H /I /C /V /E /Q >nul
echo (2/3)
xcopy gitrepo gamecode\a /Y /X /K /R /H /I /C /V /E /Q /EXCLUDE:copyexclude.txt >nul
mkdir gamecode\a\.git\logs\
copy gitrepo\.git\logs\HEAD gamecode\a\.git\logs\HEAD /D /V /Y >nul
echo (3/3)
xcopy gitrepo gamecode\b /Y /X /K /R /H /I /C /V /E /Q /EXCLUDE:copyexclude.txt >nul
mkdir gamecode\b\.git\logs >nul
copy gitrepo\.git\logs\HEAD gamecode\b\.git\logs\HEAD /D /V /Y >nul
echo done.
echo Setting up symbolic links.
mklink gamecode\a\nudge.py ..\..\bot\nudge.py
mklink gamecode\a\CORE_DATA.py ..\..\bot\CORE_DATA.py
mklink /d gamecode\a\data ..\..\gamedata\data
mklink /d gamecode\a\config ..\..\gamedata\config
mklink /d gamecode\a\cfg ..\..\gamedata\cfg
mklink gamecode\b\nudge.py ..\..\bot\nudge.py
mklink gamecode\b\CORE_DATA.py ..\..\bot\CORE_DATA.py
mklink /d gamecode\b\data ..\..\gamedata\data
mklink /d gamecode\b\config ..\..\gamedata\config
mklink /d gamecode\b\cfg ..\..\gamedata\cfg
mklink /d gamefolder gamecode\a
echo Compiling for the first time.
echo Compiling change log.
cd gamecode\a
call python tools\ss13_genchangelog.py html/changelog.html html/changelogs
cd ..\..
echo Compiling game.
call bin\build.bat
if %DM_EXIT% neq 0 echo DM compile failed.
echo Done. You may start the server using the start server program or change the game config in gamedata\config
pause
:ABORT