-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLAUNCH propperall.cmd
91 lines (61 loc) · 1.67 KB
/
LAUNCH propperall.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
@rem Store current folder
@set CMD_LC_ROOT=%~dp0
@cd /d "%CMD_LC_ROOT%"
@call common.cmd
@cd /d "%CMD_LC_ROOT%"
@title Propper Batch Compiler
@set QC_STORAGE=%mapfolder%\propper
@mkdir "%QC_STORAGE%" >nul 2>nul
@set VBSPNAME=%CMD_LC_ROOT%\extras\propper\bin\vbsp_propper.exe
@set PROPPER_TARGET=%mapdata%
@call common.cmd
@cd /d "%CMD_LC_ROOT%"
@set GameDir=%CMD_LC_ROOT%\game_compiling\garrysmod
@set GameExeDir=%CMD_LC_ROOT%\game_compiling
@set sourcesdk=%CMD_LC_ROOT%\game_compiling
@set PATH=%CMD_LC_ROOT%\extras\propper\bin;%PATH%
@"%VBSPNAME%" >nul 2>nul
@if ERRORLEVEL 9009 goto nofound
@goto found
:nofound
@echo ERROR: %VBSPNAME% could not be found.
@pause > nul
@exit 1
:found
@cd /d "%mapfolder%\propper"
@echo Directory: %cd%
@echo.
@bash --help > nul
@if ERRORLEVEL 1 @goto nobash
@echo running propperall.sh
@bash propperall.sh
@if ERRORLEVEL 1 @goto failed
@goto :proppered
:nobash
@echo bash not found, running vanilla (slow, no error detection)
@for /r %%i in (*.vmf) do @(
@echo Processing "%%i" Log: "%%i.log"
"%VBSPNAME%" "%%i" 1>"%%i.log"
@if ERRORLEVEL 1 goto failed
)
:proppered
@for /r %%i in (*.tmp) do @(
attrib +h "%%i"
)
@echo ====== Copying files also for hammer usage =======
ROBOCOPY "%GameDir%\materials\models\mspropp" "%PROPPER_TARGET%\materials\models\mspropp" /MOV /s /NFL /NDL /NJS /NJH /NP /is /it
ROBOCOPY "%GameDir%\models\props\metastruct" "%PROPPER_TARGET%\models\props\metastruct" /MOV /s /NFL /NDL /NJS /NJH /NP /is /it
@goto win
:failed
@echo COMPILE FAILURE!
@pause > nul
@goto gtfo
:win
@echo =======================
@echo ====== FINISHED =======
@echo =======================
@pause > nul
@goto gtfo
:gtfo
@echo.
exit 0