Subversion Repositories nw_plus

Rev

Rev 13 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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