Subversion Repositories vaca_plus

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 h266 1
@echo off
13 h266 2
 
3
set mapster32dir=%~dp0
4
set vacadir=%~dp0
5
set vacahrpdir=%~dp0
6
 
1 h266 7
:recheck
8
if not exist mapster32.exe goto mapster32check
9
:mapster32check_done
13 h266 10
set mapster32dir=%cd%
11
if "%debug%"=="1" echo DEBUG: Mapster32 Directory: "%mapster32dir%"
12
 
15 h266 13
if exist vacation\ set vacahrpdir=%cd%
13 h266 14
:vacadircheck
15
if exist VACATION.PRG ren VACATION.PRG vacation.grp
16
cd vaca_plus
17
set vacadir=%cd%
15 h266 18
if exist vacation\ set vacahrpdir=%cd%
19
if exist vaca_plus\ goto vacadircheck
13 h266 20
if "%debug%"=="1" echo DEBUG: Vaca+ Directory: "%vacadir%".
21
if "%debug%"=="1" echo DEBUG: VacaHRP Directory: "%vacahrpdir%".
22
 
23
cd "%mapster32dir%"
24
 
25
if exist duke3d_hrp.zip set hrp=-gduke3d_hrp.zip
26
if exist hrp_update.zip set hrpu=-ghrp_update.zip
27
 
15 h266 28
type "%mapster32dir%\names.h" > "%mapster32dir%\VacaNames.h"
29
echo. >> "%mapster32dir%\VacaNames.h"
30
type "%vacadir%\VacaNames.def" >> "%mapster32dir%\VacaNames.h"
31
 
32
set args=
33
if exist "%vacadir%" set args=%args% -j"%vacadir:\=/%"
34
if exist "%vacahrpdir%" set args=%args% -j"%vacahrpdir:\=/%"
35
set args=%args% -namesfile VacaNames.h -hvacation.def -gvacation.grp %hrp% %hrpu% %*
36
 
13 h266 37
set exe=mapster32
38
if "%debug%"=="1" set exe=mapster32.debug
39
 
40
if exist %exe%.bat (
41
call %exe%.bat %args%
42
) else (
43
%exe%.exe %args%
44
)
45
 
46
 
1 h266 47
goto end
48
 
49
:mapster32check
50
if exist mapster32.bat goto mapster32check_done
51
if exist ..\mapster32.exe (
52
cd ..
53
goto recheck
54
)
55
if exist ..\..\mapster32.exe (
56
cd ..\..
57
goto recheck
58
)
59
if exist ..\..\..\mapster32.exe (
60
cd ..\..\..
61
goto recheck
62
)
63
if exist ..\mapster32.bat (
64
cd ..
65
goto mapster32check_done
66
)
67
if exist ..\..\mapster32.bat (
68
cd ..\..
69
goto mapster32check_done
70
)
71
if exist ..\..\..\mapster32.bat (
72
cd ..\..\..
73
goto mapster32check_done
74
)
75
echo Warning: You don't have Mapster32 in your directory.
76
goto mapster32check_done
77
 
13 h266 78
:end