Rev 33 | Rev 51 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 33 | Rev 34 | ||
---|---|---|---|
1 | @echo off |
1 | @echo off |
2 | color 0C |
2 | color 0C |
3 | setlocal ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION |
3 | setlocal ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION |
4 | pushd "%~dp0" |
4 | pushd "%~dp0" |
5 | set startdir=%cd% |
5 | set startdir=%cd% |
6 | 6 | ||
7 | :restart |
7 | :restart |
8 | title Duke It Out In D.C. Launcher |
8 | title Duke It Out In D.C. Launcher |
9 | if "%editor%"=="1" title Duke It Out In D.C. Editor Launcher |
9 | if "%editor%"=="1" title Duke It Out In D.C. Editor Launcher |
10 | 10 | ||
11 | set exedir=%startdir% |
11 | set exedir=%startdir% |
12 | 12 | ||
13 | set exename=eduke32 |
13 | set exename=eduke32 |
14 | set exeproper=EDuke32 |
14 | set exeproper=EDuke32 |
15 | set action=playing |
15 | set action=playing |
16 | 16 | ||
17 | if "%editor%"=="1" ( |
17 | if "%editor%"=="1" ( |
18 | set exename=mapster32 |
18 | set exename=mapster32 |
19 | set exeproper=Mapster32 |
19 | set exeproper=Mapster32 |
20 | set action=editing |
20 | set action=editing |
21 | ) |
21 | ) |
22 | 22 | ||
23 | :title |
23 | :title |
24 | echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» |
24 | echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» |
25 | echo º Duke It Out In D.C. º |
25 | echo º Duke It Out In D.C. º |
26 | echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ |
26 | echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ |
27 | echo. |
27 | echo. |
28 | echo. |
28 | echo. |
29 | echo. |
29 | echo. |
30 | echo You are %action% Sunstorm Interactive's Duke It Out In D.C. |
30 | echo You are %action% Sunstorm Interactive's Duke It Out In D.C. |
31 | echo. |
31 | echo. |
32 | 32 | ||
33 | if "%xxx%"=="1" echo Using XXX mode. |
33 | if "%xxx%"=="1" echo Using XXX mode. |
34 | if "%dp%"=="1" echo Using Duke Plus by DeeperThought. |
34 | if "%dp%"=="1" echo Using Duke Plus by DeeperThought. |
35 | if "%debug%"=="1" echo Using debug mode. |
35 | if "%debug%"=="1" echo Using debug mode. |
36 | 36 | ||
37 | if "%debug%"=="1" echo DEBUG: Command Line Input: %* |
37 | if "%debug%"=="1" echo DEBUG: Command Line Input: %* |
38 | 38 | ||
39 | :recheck |
39 | :recheck |
40 | if not exist %exename%.exe goto execheck |
40 | if not exist %exename%.exe goto execheck |
41 | :execheck_done |
41 | :execheck_done |
42 | set exedir=%cd% |
42 | set exedir=%cd% |
43 | if "%debug%"=="1" echo DEBUG: %exeproper% Directory: "%exedir%" |
43 | if "%debug%"=="1" echo DEBUG: %exeproper% Directory: "%exedir%" |
44 | 44 | ||
45 | :: if not exist dc_hrp\ goto nodir |
45 | :: if not exist dc_hrp\ goto nodir |
46 | if not exist duke3d.grp echo Warning: You don't have Duke3D.grp in your directory. |
46 | if not exist duke3d.grp echo Warning: You don't have Duke3D.grp in your directory. |
47 | 47 | ||
48 | set sha1sum=%startdir%\utils\windows\win32\sha1sum.exe |
48 | set sha1sum=%startdir%\utils\windows\win32\sha1sum.exe |
49 | set kextract=%startdir%\utils\windows\win32\kextract.exe |
49 | set kextract=%startdir%\utils\windows\win32\kextract.exe |
50 | if "%debug%"=="1" set kextract=%startdir%\utils\windows\win32\kextract.debug.exe |
50 | if "%debug%"=="1" set kextract=%startdir%\utils\windows\win32\kextract.debug.exe |
51 | 51 | ||
52 | if exist dukedc.grp ren dukedc.grp dukedc.grp |
52 | if exist dukedc.grp ren dukedc.grp dukedc.grp |
53 | if "%dcgrpname%"=="" set dcgrpname=dukedc.grp |
53 | if "%dcgrpname%"=="" set dcgrpname=dukedc.grp |
54 | if exist "%dcgrpname%" goto dcgrp_found |
54 | if exist "%dcgrpname%" goto dcgrp_found |
55 | if not exist dukedc.grp if exist DUKEDCPP.GRP ren DUKEDCPP.GRP dukedc.grp |
55 | if not exist dukedc.grp if exist DUKEDCPP.GRP ren DUKEDCPP.GRP dukedc.grp |
56 | if not exist dukedc.grp if exist DUKEDC13.GRP ren DUKEDC13.GRP dukedc.grp |
56 | if not exist dukedc.grp if exist DUKEDC13.GRP ren DUKEDC13.GRP dukedc.grp |
57 | if not exist dukedc.grp if exist DC.GRP ren DC.GRP dukedc.grp |
57 | if not exist dukedc.grp if exist DC.GRP ren DC.GRP dukedc.grp |
58 | if not exist dukedc.grp goto nodcgrp |
58 | if not exist dukedc.grp goto nodcgrp |
59 | 59 | ||
60 | :dcgrp_found |
60 | :dcgrp_found |
61 | call :grpchecksum |
61 | call :grpchecksum |
62 | 62 | ||
63 | :nodcgrp_return |
63 | :nodcgrp_return |
64 | chdir /d "%exedir%" |
64 | chdir /d "%exedir%" |
65 | echo. |
65 | echo. |
66 | echo. |
66 | echo. |
67 | echo. |
67 | echo. |
68 | echo. |
68 | echo. |
69 | echo. |
69 | echo. |
70 | echo. |
70 | echo. |
71 | echo. |
71 | echo. |
72 | echo. |
72 | echo. |
73 | echo. |
73 | echo. |
74 | echo. |
74 | echo. |
75 | echo. |
75 | echo. |
76 | 76 | ||
77 | 77 | ||
78 | :init |
78 | :init |
79 | pause |
79 | pause |
80 | echo. |
80 | echo. |
81 | goto check |
81 | goto check |
82 | 82 | ||
83 | :check |
83 | :check |
84 | 84 | ||
85 | echo. |
85 | echo. |
86 | echo Launching Duke Nukem 3D . . . |
86 | echo Launching Duke Nukem 3D . . . |
87 | echo Thanks for %action%! |
87 | echo Thanks for %action%! |
88 | echo. |
88 | echo. |
89 | 89 | ||
90 | if exist duke3d.def ren duke3d.def duke3d_dcbak.def |
90 | if exist duke3d.def ren duke3d.def duke3d_dcbak.def |
91 | 91 | ||
92 | if exist duke3d_dcbak.def echo duke3d.def has been renamed to duke3d_dcbak.def to allow the add-on to operate. |
92 | if exist duke3d_dcbak.def echo duke3d.def has been renamed to duke3d_dcbak.def to allow the add-on to operate. |
93 | 93 | ||
94 | :arguments |
94 | :arguments |
95 | set args= |
95 | set args= |
96 | if exist "%exedir%\HRP\" set args=%args% -jHRP |
96 | if exist "%exedir%\HRP\" set args=%args% -jHRP |
97 | if exist "%exedir%\polymer_hrp\" set args=%args% -jpolymer_hrp |
97 | if exist "%exedir%\polymer_hrp\" set args=%args% -jpolymer_hrp |
98 | if exist "%exedir%\duke3d_voxel.zip" set args=%args% -gduke3d_voxel.zip |
98 | if exist "%exedir%\duke3d_voxel.zip" set args=%args% -gduke3d_voxel.zip |
99 | if exist "%exedir%\duke3d_hrp.zip" set args=%args% -gduke3d_hrp.zip |
99 | if exist "%exedir%\duke3d_hrp.zip" set args=%args% -gduke3d_hrp.zip |
100 | if exist "%exedir%\hrp_update.zip" set args=%args% -ghrp_update.zip |
100 | if exist "%exedir%\hrp_update.zip" set args=%args% -ghrp_update.zip |
101 | if exist "%exedir%\maphacks.zip" set args=%args% -gmaphacks.zip |
101 | if exist "%exedir%\maphacks.zip" set args=%args% -gmaphacks.zip |
102 | if exist "%exedir%\eduke32_mus.zip" set args=%args% -geduke32_mus.zip |
102 | if exist "%exedir%\eduke32_mus.zip" set args=%args% -geduke32_mus.zip |
103 | set args=%args% -gdukedc.grp -mx dc_user.con |
103 | set args=%args% -gdukedc.grp -mx dc_user.con |
104 | if exist "%exedir%\dc.def" set args=%args% -hdc.def |
104 | if exist "%exedir%\dc.def" set args=%args% -hdc.def |
105 | if exist "%exedir%\dukedc.def" set args=%args% -hdukedc.def |
105 | if exist "%exedir%\dukedc.def" set args=%args% -hdukedc.def |
106 | if exist "%exedir%\dukedc_hrp.zip" set args=%args% -gdukedc_hrp.zip |
106 | if exist "%exedir%\dukedc_hrp.zip" set args=%args% -gdukedc_hrp.zip |
107 | if exist "%exedir%\dc_hrp\" set args=%args% -jdc_hrp |
107 | if exist "%exedir%\dc_hrp\" set args=%args% -jdc_hrp |
108 | if "%xxx%"=="1" if exist "%exedir%\xxx_lite.zip" set args=%args% -gxxx_lite.zip |
108 | if "%xxx%"=="1" if exist "%exedir%\xxx_lite.zip" set args=%args% -gxxx_lite.zip |
109 | if "%xxx%"=="1" if exist "%exedir%\xxx_lite\" set args=%args% -jxxx_lite |
109 | if "%xxx%"=="1" if exist "%exedir%\xxx_lite\" set args=%args% -jxxx_lite |
110 | if "%xxx%"=="1" if exist "%exedir%\xxx_pack.zip" set args=%args% -gxxx_pack.zip |
110 | if "%xxx%"=="1" if exist "%exedir%\xxx_pack.zip" set args=%args% -gxxx_pack.zip |
111 | if "%xxx%"=="1" if exist "%exedir%\xxx_pack\" set args=%args% -jxxx_pack |
111 | if "%xxx%"=="1" if exist "%exedir%\xxx_pack\" set args=%args% -jxxx_pack |
112 | set args=%args% %* |
112 | set args=%args% %* |
113 | if "%dp%"=="1" set args=%args% -jDukePlus |
113 | if "%dp%"=="1" set args=%args% -jDukePlus |
114 | 114 | ||
115 | set exe=%exename% |
115 | set exe=%exename% |
116 | if "%debug%"=="1" set exe=%exename%.debug |
116 | if "%debug%"=="1" set exe=%exename%.debug |
117 | 117 | ||
118 | if exist %exe%.bat ( |
118 | if exist %exe%.bat ( |
119 | if "%debug%"=="1" echo DEBUG: Final Command Line: call %exe%.bat %args% |
119 | if "%debug%"=="1" echo DEBUG: Final Command Line: call %exe%.bat %args% |
120 | call %exe%.bat %args% |
120 | call %exe%.bat %args% |
121 | ) else ( |
121 | ) else ( |
122 | if "%debug%"=="1" echo DEBUG: Final Command Line: start %exe%.exe %args% |
122 | if "%debug%"=="1" echo DEBUG: Final Command Line: start %exe%.exe %args% |
123 | start %exe%.exe %args% |
123 | start %exe%.exe %args% |
124 | ) |
124 | ) |
125 | 125 | ||
126 | set svnpath=0 |
126 | set svnpath=0 |
127 | if "%svnpath%"=="0" if exist "%startdir%\svn\bin\svn.exe" set svnpath=%startdir%\svn\bin |
127 | if "%svnpath%"=="0" if exist "%startdir%\svn\bin\svn.exe" set svnpath=%startdir%\svn\bin |
128 | if "%svnpath%"=="0" if exist "%exedir%\svn\bin\svn.exe" set svnpath=%exedir%\svn\bin |
128 | if "%svnpath%"=="0" if exist "%exedir%\svn\bin\svn.exe" set svnpath=%exedir%\svn\bin |
129 | if "%svnpath%"=="0" if exist "%ProgramFiles%\SlikSvn\bin\svn.exe" set svnpath=%ProgramFiles%\SlikSvn\bin |
129 | if "%svnpath%"=="0" if exist "%ProgramFiles%\SlikSvn\bin\svn.exe" set svnpath=%ProgramFiles%\SlikSvn\bin |
130 | if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\SlikSvn\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\SlikSvn\bin |
130 | if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\SlikSvn\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\SlikSvn\bin |
131 | if "%svnpath%"=="0" if exist "%ProgramFiles%\Subversion\bin\svn.exe" set svnpath=%ProgramFiles%\Subversion\bin |
131 | if "%svnpath%"=="0" if exist "%ProgramFiles%\Subversion\bin\svn.exe" set svnpath=%ProgramFiles%\Subversion\bin |
132 | if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\Subversion\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\Subversion\bin |
132 | if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\Subversion\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\Subversion\bin |
133 | if "%svnpath%"=="0" if exist "%ProgramFiles%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles%\TortoiseSVN\bin |
133 | if "%svnpath%"=="0" if exist "%ProgramFiles%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles%\TortoiseSVN\bin |
134 | if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\TortoiseSVN\bin |
134 | if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\TortoiseSVN\bin |
135 | if "%svnpath%"=="0" for %%S in (svn.exe) do if exist "%%~dp$PATH:S" set svnpath=%%~dp$PATH:S |
135 | if "%svnpath%"=="0" for %%S in (svn.exe) do if exist "%%~dp$PATH:S" set svnpath=%%~dp$PATH:S |
136 | 136 | ||
137 | if exist "%exedir%\dc_hrp\" ( |
137 | if exist "%exedir%\dc_hrp\" ( |
138 | chdir /d "%exedir%\dc_hrp\" |
138 | chdir /d "%exedir%\dc_hrp\" |
139 | if not "%svnpath%"=="0" call :svn_action |
139 | if not "%svnpath%"=="0" call :svn_action |
140 | ) |
140 | ) |
141 | 141 | ||
142 | goto end |
142 | goto end |
143 | 143 | ||
144 | :svn_action |
144 | :svn_action |
145 | set PATH=%PATH%;%svnpath% |
145 | set PATH=%PATH%;%svnpath% |
146 | for /f "delims=" %%a in ('svnversion.exe .') do @set oldrev=%%a |
146 | for /f "delims=" %%a in ('svnversion.exe .') do @set oldrev=%%a |
147 | if "%oldrev%"=="exported" goto :eof |
147 | if "%oldrev%"=="exported" goto :eof |
148 | if "%oldrev%"=="Unversioned directory" goto :eof |
148 | if "%oldrev%"=="Unversioned directory" goto :eof |
149 | "svn.exe" update |
149 | "svn.exe" update |
150 | for /f "delims=" %%a in ('svnversion.exe .') do @set rev=%%a |
150 | for /f "delims=" %%a in ('svnversion.exe .') do @set rev=%%a |
- | 151 | set oldrev=%oldrev:M=% |
|
- | 152 | set oldrev=%oldrev:S=% |
|
- | 153 | set oldrev=%oldrev:P=% |
|
- | 154 | set rev=%rev:M=% |
|
- | 155 | set rev=%rev:S=% |
|
- | 156 | set rev=%rev:P=% |
|
151 | if %rev% EQU %oldrev% goto :eof |
157 | if %rev% EQU %oldrev% goto :eof |
152 | set /a oldrev=%oldrev% + 1 |
158 | set /a oldrev=%oldrev% + 1 |
153 | echo. |
159 | echo. |
154 | "svn.exe" log -r %oldrev%:%rev% |
160 | "svn.exe" log -r %oldrev%:%rev% |
155 | echo. |
161 | echo. |
156 | pause |
162 | pause |
157 | goto :eof |
163 | goto :eof |
158 | 164 | ||
159 | :nodcgrp |
165 | :nodcgrp |
160 | set megaton=Steam\SteamApps\common\Duke Nukem 3D\gameroot\addons\dukedc.grp |
166 | set megaton=Steam\SteamApps\common\Duke Nukem 3D\gameroot\addons\dukedc.grp |
161 | if exist "%ProgramFiles%\%megaton%" copy "%ProgramFiles%\%megaton%" .\ && call :conprotect && goto nodcgrp_done |
167 | if exist "%ProgramFiles%\%megaton%" copy "%ProgramFiles%\%megaton%" .\ && call :conprotect && goto nodcgrp_done |
162 | if exist "%ProgramFiles(x86)%\%megaton%" copy "%ProgramFiles(x86)%\%megaton%" .\ && call :conprotect && goto nodcgrp_done |
168 | if exist "%ProgramFiles(x86)%\%megaton%" copy "%ProgramFiles(x86)%\%megaton%" .\ && call :conprotect && goto nodcgrp_done |
163 | title Duke It Out In D.C. for EDuke32 Installer |
169 | title Duke It Out In D.C. for EDuke32 Installer |
164 | color 0C |
170 | color 0C |
165 | 171 | ||
166 | echo. |
172 | echo. |
167 | echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» |
173 | echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» |
168 | echo º Duke It Out In D.C. for EDuke32 Installer º |
174 | echo º Duke It Out In D.C. for EDuke32 Installer º |
169 | echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍͼ |
175 | echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍͼ |
170 | echo ³ By Hendricks266 ³ |
176 | echo ³ By Hendricks266 ³ |
171 | echo ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ |
177 | echo ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ |
172 | echo. |
178 | echo. |
173 | echo This batch file extracts the contents of DUKEDCPP.SSI or DUKEDC13.SSI and makes |
179 | echo This batch file extracts the contents of DUKEDCPP.SSI or DUKEDC13.SSI and makes |
174 | echo it into a group file, DUKEDC.GRP. |
180 | echo it into a group file, DUKEDC.GRP. |
175 | echo. |
181 | echo. |
176 | 182 | ||
177 | set kgroup=%startdir%\utils\windows\win32\kgroup.exe |
183 | set kgroup=%startdir%\utils\windows\win32\kgroup.exe |
178 | if "%debug%"=="1" set kgroup=%startdir%\utils\windows\win32\kgroup.debug.exe |
184 | if "%debug%"=="1" set kgroup=%startdir%\utils\windows\win32\kgroup.debug.exe |
179 | set unpackssi=%startdir%\utils\windows\win32\unpackssi.exe |
185 | set unpackssi=%startdir%\utils\windows\win32\unpackssi.exe |
180 | if "%debug%"=="1" set unpackssi=%startdir%\utils\windows\win32\unpackssi.debug.exe |
186 | if "%debug%"=="1" set unpackssi=%startdir%\utils\windows\win32\unpackssi.debug.exe |
181 | 187 | ||
182 | pause |
188 | pause |
183 | :nodcgrp_top |
189 | :nodcgrp_top |
184 | echo. |
190 | echo. |
185 | if not exist DUKEDCPP.SSI goto check13 |
191 | if not exist DUKEDCPP.SSI goto check13 |
186 | echo Proceeding with DUKEDCPP.SSI extraction. |
192 | echo Proceeding with DUKEDCPP.SSI extraction. |
187 | mkdir dukedcpp |
193 | mkdir dukedcpp |
188 | chdir dukedcpp |
194 | chdir dukedcpp |
189 | "%unpackssi%" ..\DUKEDCPP.SSI |
195 | "%unpackssi%" ..\DUKEDCPP.SSI |
190 | if exist DUKETEAM.ANM ren DUKETEAM.ANM RADLOGO.ANM |
196 | if exist DUKETEAM.ANM ren DUKETEAM.ANM RADLOGO.ANM |
191 | if exist USER.CON ren USER.CON USER.BAK |
197 | if exist USER.CON ren USER.CON USER.BAK |
192 | "%kgroup%" dukedc.grp *.* |
198 | "%kgroup%" dukedc.grp *.* |
193 | if exist dukedc.grp move dukedc.grp ..\dukedc.grp |
199 | if exist dukedc.grp move dukedc.grp ..\dukedc.grp |
194 | echo DUKEDC.GRP has been added to your directory. |
200 | echo DUKEDC.GRP has been added to your directory. |
195 | if not exist ..\DUKEDC*.MAP move *.MAP ..\ |
201 | if not exist ..\DUKEDC*.MAP move *.MAP ..\ |
196 | chdir .. |
202 | chdir .. |
197 | rmdir /s /q dukedcpp |
203 | rmdir /s /q dukedcpp |
198 | echo. |
204 | echo. |
199 | echo. |
205 | echo. |
200 | if not exist DUKEDC13.SSI goto nodcgrp_done |
206 | if not exist DUKEDC13.SSI goto nodcgrp_done |
201 | 207 | ||
202 | :check13 |
208 | :check13 |
203 | if not exist DUKEDC13.SSI goto error |
209 | if not exist DUKEDC13.SSI goto error |
204 | echo Proceeding with DUKEDC13.SSI extraction. |
210 | echo Proceeding with DUKEDC13.SSI extraction. |
205 | mkdir dukedc13 |
211 | mkdir dukedc13 |
206 | chdir dukedc13 |
212 | chdir dukedc13 |
207 | "%unpackssi%" ..\DUKEDC13.SSI |
213 | "%unpackssi%" ..\DUKEDC13.SSI |
208 | if exist DUKETEAM.ANM ren DUKETEAM.ANM RADLOGO.ANM |
214 | if exist DUKETEAM.ANM ren DUKETEAM.ANM RADLOGO.ANM |
209 | if exist USER.CON ren USER.CON USER.BAK |
215 | if exist USER.CON ren USER.CON USER.BAK |
210 | "%kgroup%" dukedc.grp *.* |
216 | "%kgroup%" dukedc.grp *.* |
211 | if exist ..\dukedc.grp ( |
217 | if exist ..\dukedc.grp ( |
212 | if exist dukedc.grp ( |
218 | if exist dukedc.grp ( |
213 | move dukedc.grp ..\dukedc13.grp |
219 | move dukedc.grp ..\dukedc13.grp |
214 | echo DUKEDC13.GRP has been added to your directory. |
220 | echo DUKEDC13.GRP has been added to your directory. |
215 | ) ) else ( |
221 | ) ) else ( |
216 | if exist dukedc.grp ( |
222 | if exist dukedc.grp ( |
217 | move dukedc.grp ..\dukedc.grp |
223 | move dukedc.grp ..\dukedc.grp |
218 | echo DUKEDC.GRP has been added to your directory. |
224 | echo DUKEDC.GRP has been added to your directory. |
219 | ) ) |
225 | ) ) |
220 | if not exist ..\DUKEDC*.MAP move *.MAP ..\ |
226 | if not exist ..\DUKEDC*.MAP move *.MAP ..\ |
221 | chdir .. |
227 | chdir .. |
222 | rmdir /s /q dukedc13 |
228 | rmdir /s /q dukedc13 |
223 | echo. |
229 | echo. |
224 | echo. |
230 | echo. |
225 | goto nodcgrp_done |
231 | goto nodcgrp_done |
226 | 232 | ||
227 | :nodcgrp_done |
233 | :nodcgrp_done |
228 | if exist dukedc.grp ( |
234 | if exist dukedc.grp ( |
229 | type DCINTRO.TXT |
235 | type DCINTRO.TXT |
230 | echo. |
236 | echo. |
231 | echo. |
237 | echo. |
232 | echo. |
238 | echo. |
233 | echo Duke It Out In D.C. installed! |
239 | echo Duke It Out In D.C. installed! |
234 | echo. |
240 | echo. |
235 | pause |
241 | pause |
236 | call :grpchecksum |
242 | call :grpchecksum |
237 | call :grpchecksum_results |
243 | call :grpchecksum_results |
238 | goto nodcgrp_return |
244 | goto nodcgrp_return |
239 | ) |
245 | ) |
240 | if not exist dukedc.grp ( |
246 | if not exist dukedc.grp ( |
241 | echo Installation Error! |
247 | echo Installation Error! |
242 | echo Contact Hendricks266 for help. |
248 | echo Contact Hendricks266 for help. |
243 | echo. |
249 | echo. |
244 | pause |
250 | pause |
245 | goto end |
251 | goto end |
246 | ) |
252 | ) |
247 | 253 | ||
248 | :conprotect |
254 | :conprotect |
249 | pushd "%exedir%" |
255 | pushd "%exedir%" |
250 | if not exist GAME.CON "%kextract%" DUKE3D.GRP GAME.CON |
256 | if not exist GAME.CON "%kextract%" DUKE3D.GRP GAME.CON |
251 | if not exist DEFS.CON "%kextract%" DUKE3D.GRP DEFS.CON |
257 | if not exist DEFS.CON "%kextract%" DUKE3D.GRP DEFS.CON |
252 | if not exist USER.CON "%kextract%" DUKE3D.GRP USER.CON |
258 | if not exist USER.CON "%kextract%" DUKE3D.GRP USER.CON |
253 | popd |
259 | popd |
254 | goto :eof |
260 | goto :eof |
255 | 261 | ||
256 | :grpchecksum |
262 | :grpchecksum |
257 | if not exist "%sha1sum%" ( |
263 | if not exist "%sha1sum%" ( |
258 | echo "%sha1sum%" not found. |
264 | echo "%sha1sum%" not found. |
259 | goto :eof |
265 | goto :eof |
260 | ) |
266 | ) |
261 | pushd . |
267 | pushd . |
262 | if exist "%startdir%\%dcgrpname%" chdir /d %startdir% |
268 | if exist "%startdir%\%dcgrpname%" chdir /d %startdir% |
263 | if exist "%exedir%\%dcgrpname%" chdir /d %exedir% |
269 | if exist "%exedir%\%dcgrpname%" chdir /d %exedir% |
264 | echo 1b66c3ad9a65556044946dd1ca97a839fcfedc3b *%dcgrpname% | "%sha1sum%" --status --check - |
270 | echo 1b66c3ad9a65556044946dd1ca97a839fcfedc3b *%dcgrpname% | "%sha1sum%" --status --check - |
265 | if "%ERRORLEVEL%"=="0" set version=megaton && call :conprotect && popd && goto :eof |
271 | if "%ERRORLEVEL%"=="0" set version=megaton && call :conprotect && popd && goto :eof |
266 | if "%ERRORLEVEL%"=="1" set version=unknown |
272 | if "%ERRORLEVEL%"=="1" set version=unknown |
267 | popd |
273 | popd |
268 | goto :eof |
274 | goto :eof |
269 | 275 | ||
270 | :grpchecksum_results |
276 | :grpchecksum_results |
271 | if "%version%"=="megaton" echo DUKEDC.GRP (Megaton Edition) checksum verified. |
277 | if "%version%"=="megaton" echo DUKEDC.GRP (Megaton Edition) checksum verified. |
272 | :: if "%version%"=="unknown" echo DUKEDC.GRP checksum does not match any known copies because one was never distributed until the Megaton Edition. |
278 | :: if "%version%"=="unknown" echo DUKEDC.GRP checksum does not match any known copies because one was never distributed until the Megaton Edition. |
273 | echo. |
279 | echo. |
274 | goto :eof |
280 | goto :eof |
275 | 281 | ||
276 | :error |
282 | :error |
277 | echo. |
283 | echo. |
278 | echo You do not have DUKEDCPP.SSI or DUKEDC13.SSI in this directory. |
284 | echo You do not have DUKEDCPP.SSI or DUKEDC13.SSI in this directory. |
279 | :retry |
285 | :retry |
280 | echo. |
286 | echo. |
281 | set cddrive= |
287 | set cddrive= |
282 | set /p cddrive=What is the drive letter that your Duke D.C. CD is in? |
288 | set /p cddrive=What is the drive letter that your Duke D.C. CD is in? |
283 | echo. |
289 | echo. |
284 | if not '%cddrive%'=='' set cddrive=%cddrive:~0,1% |
290 | if not '%cddrive%'=='' set cddrive=%cddrive:~0,1% |
285 | if '%cddrive%'=='' goto cdno |
291 | if '%cddrive%'=='' goto cdno |
286 | if not exist %cddrive%:\ goto cdno |
292 | if not exist %cddrive%:\ goto cdno |
287 | if not exist %cddrive%:\* goto cdno |
293 | if not exist %cddrive%:\* goto cdno |
288 | if exist %cddrive%:\DUKEDC\DUKEDCPP.SSI copy %cddrive%:\DUKEDC\*.SSI .\ && goto nodcgrp_top |
294 | if exist %cddrive%:\DUKEDC\DUKEDCPP.SSI copy %cddrive%:\DUKEDC\*.SSI .\ && goto nodcgrp_top |
289 | if exist %cddrive%:\DUKEDC\DUKEDC\DUKEDCPP.SSI copy %cddrive%:\DUKEDC\DUKEDC\*.SSI .\ && goto nodcgrp_top |
295 | if exist %cddrive%:\DUKEDC\DUKEDC\DUKEDCPP.SSI copy %cddrive%:\DUKEDC\DUKEDC\*.SSI .\ && goto nodcgrp_top |
290 | if exist %cddrive%:\DC\DUKEDC\DUKEDCPP.SSI copy %cddrive%:\DC\DUKEDC\*.SSI .\ && goto nodcgrp_top |
296 | if exist %cddrive%:\DC\DUKEDC\DUKEDCPP.SSI copy %cddrive%:\DC\DUKEDC\*.SSI .\ && goto nodcgrp_top |
291 | goto cdwrong |
297 | goto cdwrong |
292 | 298 | ||
293 | :cdno |
299 | :cdno |
294 | echo '%cddrive%' is not valid. Please try again. |
300 | echo '%cddrive%' is not valid. Please try again. |
295 | goto retry |
301 | goto retry |
296 | 302 | ||
297 | :cdwrong |
303 | :cdwrong |
298 | echo '%cddrive%' is not the correct disc. Please try again. |
304 | echo '%cddrive%' is not the correct disc. Please try again. |
299 | goto retry |
305 | goto retry |
300 | 306 | ||
301 | :execheck |
307 | :execheck |
302 | if exist %exename%.bat goto execheck_done |
308 | if exist %exename%.bat goto execheck_done |
303 | if exist %exename%.exe goto recheck |
309 | if exist %exename%.exe goto recheck |
304 | set prevdir=%cd% |
310 | set prevdir=%cd% |
305 | if not "%cd%"=="%cd:~0,3%" chdir .. |
311 | if not "%cd%"=="%cd:~0,3%" chdir .. |
306 | if not "%cd%"=="%prevdir%" goto execheck |
312 | if not "%cd%"=="%prevdir%" goto execheck |
307 | echo Warning: You don't have %exeproper% in your directory. |
313 | echo Warning: You don't have %exeproper% in your directory. |
308 | chdir /d "%startdir%" |
314 | chdir /d "%startdir%" |
309 | goto execheck_done |
315 | goto execheck_done |
310 | 316 | ||
311 | :end |
317 | :end |
312 | if "%debug%"=="1" echo. |
318 | if "%debug%"=="1" echo. |
313 | if "%debug%"=="1" pause |
319 | if "%debug%"=="1" pause |
314 | echo. |
320 | echo. |
315 | popd |
321 | popd |
316 | endlocal |
322 | endlocal |
317 | title %ComSpec% |
323 | title %ComSpec% |
318 | color 07 |
324 | color 07 |
319 | 325 |