-
Notifications
You must be signed in to change notification settings - Fork 1
/
common.cmd
155 lines (105 loc) · 3.33 KB
/
common.cmd
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
@rem DO NOT EDIT THIS FILE
@rem CREATE user_config.cmd file according to the example
@rem FILL THAT INSTEAD!!
@set SteamAppUser=dummy
@set HammerParams=-nop4
@set NOLDR=0
@set NOHDR=0
@set TRIGGER_STRIPPING_HACK_ENABLE=0
@set DONT_PUBLISH_NAV=0
@set ENABLE_BSPREZIP=0
@set prompt=[32m$P$G[0m
@call user_config.cmd
@set SteamUser=%SteamAppUser%
@rem Actual steam path
@set SteamPath=C:\Program Files (x86)\Steam
@call user_config.cmd
@rem Could be library folder or just above
@set SteamPathAlt=%SteamPath%
@call user_config.cmd
@rem ====== MAP CONFIG =========
@rem map vmf and such
@set mapfolder=C:\metastruct\mapfiles
@call user_config.cmd
@set version_file=%mapfolder%\ver_meta3.txt
@call user_config.cmd
@call "%~d0%~p0\build_version.cmd"
@rem input vmf
@set mapfile=metastruct_3
@rem output bsp name
@set mapname=gm_construct_m_%BUILD_VERSION%
@rem map content
@set mapdata=C:\metastruct\mapdata
@rem workshop map id
@set mapwsid=0
@rem no addons on gmodcommander by default
@set GCNOADDONS=-noaddons
@rem Should the compiler bundle missing materials
@set NO_MISSING_BUNDLING=0
@rem ===========================
@call user_config.cmd
@set sourcesdk=%SteamPath%\steamapps\common\Source SDK Base 2013 Multiplayer
@call user_config.cmd
@rem FGDs for vmfii, otherwise breakage possibly
@set FGDS=%sourcesdk%\bin\base.fgd,%sourcesdk%\bin\halflife2.fgd,%mapfolder%\metastruct.fgd
@rem REQUIRED configuration folder, needs gameinfo.txt at least
@set toolkit_root=%~d0%~p0
@set VProject_Hammer=%toolkit_root%game_hammer\garrysmod
@set VProject=%toolkit_root%game_compiling\garrysmod
@set compilers_dir=%toolkit_root%game_compiling\bin\win64
@IF EXIST "%VProject_Hammer%\gameinfo.txt" @GOTO VProject_Hammer_fixskip
@set VProject_Hammer=%VProject%
@echo Missing %VProject_Hammer%\gameinfo.txt
:VProject_Hammer_fixskip
@call user_config.cmd
@rem Where garrysmod locates
@set GameDir=%SteamPath%\steamapps\common\GarrysMod\garrysmod
@set GameExeDir=%SteamPath%\steamapps\common\GarrysMod
@set ValvePlatformMutex=%SteamPath%\steam.exe
@call user_config.cmd
@set PATH=%~d0%~p0;%sourcesdk%\bin;%SteamPath%\;%PATH%
@set SteamAppId=4000
@set SteamAppVersionId=45
@set SteamGameId=211
@set SteamGame=garrysmod
@call user_config.cmd
@title Source SDK Environment
:testing
@set TESTPATH=%sourcesdk%
@IF NOT EXIST "%TESTPATH%" @GOTO fail
@set TESTPATH=%GameExeDir%
@IF NOT EXIST "%TESTPATH%" @GOTO fail
@set TESTPATH=%GameExeDir%\bin
@IF NOT EXIST "%TESTPATH%" @GOTO fail
@set TESTPATH=%GameDir%\addons
@IF NOT EXIST "%TESTPATH%" @GOTO fail
@set TESTPATH=%GameDir%\maps
@IF NOT EXIST "%TESTPATH%" @GOTO fail
@set TESTPATH=%mapdata%
@IF NOT EXIST "%TESTPATH%" @GOTO fail
@set TESTPATH=%sourcesdk%\bin
@IF NOT EXIST "%TESTPATH%" @GOTO fail
@set TESTPATH=%sourcesdk%\bin\hammer.exe
@IF NOT EXIST "%TESTPATH%" @GOTO fail
@set TESTPATH=%VProject%\gameinfo.txt
@IF NOT EXIST "%TESTPATH%" @GOTO fail
@set TESTPATH=%VProject%
@IF NOT EXIST "%TESTPATH%" @GOTO fail
@set TESTPATH=%version_file%
@IF NOT EXIST "%TESTPATH%" @GOTO fail
@set TESTPATH=%SteamPath%
@IF NOT EXIST "%TESTPATH%" @GOTO fail
@rem @java.exe -version >nul 2>nul
@rem @IF %ERRORLEVEL% NEQ 0 @GOTO failjava
@goto end
:fail
@echo "FATAL: Path does not exist: %TESTPATH%"
@pause > nul
@exit 1
@goto :end
:failjava
@echo "java.exe not found from PATH (needed by pakrat.jar)"
@pause > nul
@exit 2
@goto :end
:end