Go to most recent revision | 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 nwdir=%~dp0 |
||
5 | set nwhrpdir=%~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 | |||
16 | h266 | 13 | if exist nwinter\ set nwhrpdir=%cd% |
13 | h266 | 14 | :nwdircheck |
15 | cd nw_plus |
||
16 | set nwdir=%cd% |
||
16 | h266 | 17 | if exist nwinter\ set nwhrpdir=%cd% |
18 | if exist nw_plus\ goto nwdircheck |
||
13 | h266 | 19 | if "%debug%"=="1" echo DEBUG: NW+ Directory: "%nwdir%". |
20 | if "%debug%"=="1" echo DEBUG: NWHRP Directory: "%nwhrpdir%". |
||
21 | |||
22 | cd "%mapster32dir%" |
||
23 | |||
24 | if exist duke3d_hrp.zip set hrp=-gduke3d_hrp.zip |
||
25 | if exist hrp_update.zip set hrpu=-ghrp_update.zip |
||
26 | |||
16 | h266 | 27 | type "%mapster32dir%\names.h" > "%mapster32dir%\NWNames.h" |
28 | echo. >> "%mapster32dir%\NWNames.h" |
||
29 | type "%nwdir%\NWNames.def" >> "%mapster32dir%\NWNames.h" |
||
30 | |||
31 | set args= |
||
32 | if exist "%nwdir%" set args=%args% -j"%nwdir:\=/%" |
||
33 | if exist "%nwhrpdir%" set args=%args% -j"%nwhrpdir:\=/%" |
||
34 | set args=%args% -namesfile NWNames.h -hnwinter.def -gnwinter.grp %hrp% %hrpu% %* |
||
35 | |||
13 | h266 | 36 | set exe=mapster32 |
37 | if "%debug%"=="1" set exe=mapster32.debug |
||
38 | |||
39 | if exist %exe%.bat ( |
||
40 | call %exe%.bat %args% |
||
41 | ) else ( |
||
42 | %exe%.exe %args% |
||
43 | ) |
||
44 | |||
1 | h266 | 45 | goto end |
46 | |||
47 | :mapster32check |
||
48 | if exist mapster32.bat goto mapster32check_done |
||
49 | if exist ..\mapster32.exe ( |
||
50 | cd .. |
||
51 | goto recheck |
||
52 | ) |
||
53 | if exist ..\..\mapster32.exe ( |
||
54 | cd ..\.. |
||
55 | goto recheck |
||
56 | ) |
||
57 | if exist ..\..\..\mapster32.exe ( |
||
58 | cd ..\..\.. |
||
59 | goto recheck |
||
60 | ) |
||
61 | if exist ..\mapster32.bat ( |
||
62 | cd .. |
||
63 | goto mapster32check_done |
||
64 | ) |
||
65 | if exist ..\..\mapster32.bat ( |
||
66 | cd ..\.. |
||
67 | goto mapster32check_done |
||
68 | ) |
||
69 | if exist ..\..\..\mapster32.bat ( |
||
70 | cd ..\..\.. |
||
71 | goto mapster32check_done |
||
72 | ) |
||
73 | echo Warning: You don't have Mapster32 in your directory. |
||
74 | goto mapster32check_done |
||
75 | |||
13 | h266 | 76 | :end |