Rev 42 | Rev 48 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 42 | Rev 46 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | @echo off |
1 | @echo off |
2 | @color 0C |
2 | @color 0C |
3 | pushd . |
3 | pushd . |
4 | cd /d "%~dp0" |
4 | chdir /d "%~dp0" |
5 | 5 | ||
6 | :restart |
6 | :restart |
7 | title Duke Caribbean: Life's A Beach Plus Launcher |
7 | title Duke Caribbean: Life's A Beach Plus Launcher |
8 | if "%editor%"=="1" title Duke Caribbean: Life's A Beach Plus Editor Launcher |
8 | if "%editor%"=="1" title Duke Caribbean: Life's A Beach Plus Editor Launcher |
9 | 9 | ||
Line 49... | Line 49... | ||
49 | if not exist duke3d.grp echo Warning: You don't have Duke3D.grp in your directory. |
49 | if not exist duke3d.grp echo Warning: You don't have Duke3D.grp in your directory. |
50 | 50 | ||
51 | if exist vacation\ set addonhrpdir=%cd% |
51 | if exist vacation\ set addonhrpdir=%cd% |
52 | :addondircheck |
52 | :addondircheck |
53 | if exist VACATION.PRG ren VACATION.PRG vacation.grp |
53 | if exist VACATION.PRG ren VACATION.PRG vacation.grp |
54 | cd vaca_plus |
54 | chdir vaca_plus |
55 | set addondir=%cd% |
55 | set addondir=%cd% |
56 | if exist vacation\ set addonhrpdir=%cd% |
56 | if exist vacation\ set addonhrpdir=%cd% |
57 | if exist vaca_plus\ goto addondircheck |
57 | if exist vaca_plus\ goto addondircheck |
58 | if "%debug%"=="1" echo DEBUG: Vaca+ Directory: "%addondir%". |
58 | if "%debug%"=="1" echo DEBUG: Vaca+ Directory: "%addondir%". |
59 | if "%debug%"=="1" echo DEBUG: VacaHRP Directory: "%addonhrpdir%". |
59 | if "%debug%"=="1" echo DEBUG: VacaHRP Directory: "%addonhrpdir%". |
Line 64... | Line 64... | ||
64 | ren "%addondir%\VACATION.GRP" vacation.grp |
64 | ren "%addondir%\VACATION.GRP" vacation.grp |
65 | ) else ( |
65 | ) else ( |
66 | goto novacagrp |
66 | goto novacagrp |
67 | ) ) |
67 | ) ) |
68 | 68 | ||
- | 69 | if exist vacation.grp ren vacation.grp vacation.grp |
|
69 | call :grpchecksum |
70 | call :grpchecksum |
70 | :novacagrp_return |
71 | :novacagrp_return |
71 | if not "%version%"=="demo" ( |
72 | if not "%version%"=="demo" ( |
72 | if not exist vaca1.map goto mapextract |
73 | if not exist vaca1.map goto mapextract |
73 | if not exist vaca2.map goto mapextract |
74 | if not exist vaca2.map goto mapextract |
Line 81... | Line 82... | ||
81 | if not exist vacadm2.map goto mapextract |
82 | if not exist vacadm2.map goto mapextract |
82 | if not exist vacadm3.map goto mapextract |
83 | if not exist vacadm3.map goto mapextract |
83 | if not exist vacadm4.map goto mapextract |
84 | if not exist vacadm4.map goto mapextract |
84 | if not exist vacaflag_%addonver%.h266 goto updateextract |
85 | if not exist vacaflag_%addonver%.h266 goto updateextract |
85 | ) |
86 | ) |
86 | cd "%exedir%" |
87 | chdir /d "%exedir%" |
87 | echo. |
88 | echo. |
88 | echo. |
89 | echo. |
89 | echo. |
90 | echo. |
90 | echo. |
91 | echo. |
91 | echo. |
92 | echo. |
Line 153... | Line 154... | ||
153 | if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\Subversion\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\Subversion\bin |
154 | if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\Subversion\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\Subversion\bin |
154 | if "%svnpath%"=="0" if exist "%ProgramFiles%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles%\TortoiseSVN\bin |
155 | if "%svnpath%"=="0" if exist "%ProgramFiles%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles%\TortoiseSVN\bin |
155 | if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\TortoiseSVN\bin |
156 | if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\TortoiseSVN\bin |
156 | if "%svnpath%"=="0" for %%S in (svn.exe) do if exist "%%~dp$PATH:S" set svnpath=%%~dp$PATH:S |
157 | if "%svnpath%"=="0" for %%S in (svn.exe) do if exist "%%~dp$PATH:S" set svnpath=%%~dp$PATH:S |
157 | 158 | ||
158 | cd /d "%addondir%" |
159 | chdir /d "%addondir%" |
159 | if not "%svnpath%"=="0" if exist ".svn" svn update |
160 | if not "%svnpath%"=="0" if exist ".svn" svn update |
160 | cd /d "%addonhrpdir%" |
161 | chdir /d "%addonhrpdir%" |
161 | if not "%svnpath%"=="0" if exist ".svn" svn update |
162 | if not "%svnpath%"=="0" if exist ".svn" svn update |
162 | 163 | ||
163 | goto end |
164 | goto end |
164 | 165 | ||
165 | :novacagrp |
166 | :novacagrp |
Line 202... | Line 203... | ||
202 | :ssi1 |
203 | :ssi1 |
203 | echo You do have the Caribbean SSI file in this directory, but it has not been |
204 | echo You do have the Caribbean SSI file in this directory, but it has not been |
204 | echo extracted. It will now be unpacked. |
205 | echo extracted. It will now be unpacked. |
205 | echo. |
206 | echo. |
206 | pause |
207 | pause |
207 | md vaca15ssi |
208 | mkdir vaca15ssi |
208 | cd vaca15ssi |
209 | chdir vaca15ssi |
209 | if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%". |
210 | if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%". |
210 | "%addondir%\utils\windows\win32\unpackssi.exe" ..\VACA15.SSI |
211 | "%addondir%\utils\windows\win32\unpackssi.exe" ..\VACA15.SSI |
211 | move /y VACATION.PRG ..\vacation.grp |
212 | if exist VACATION.PRG move /y VACATION.PRG ..\vacation.grp |
212 | cd .. |
213 | chdir .. |
213 | if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%". |
214 | if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%". |
- | 215 | if exist vacation.grp ( |
|
214 | rd /s /q vaca15ssi |
216 | rmdir /s /q vaca15ssi |
215 | goto novacagrp_done |
217 | goto novacagrp_done |
- | 218 | ) |
|
- | 219 | if not exist vacation.grp ( |
|
- | 220 | echo Installation Error! |
|
- | 221 | echo Contact Hendricks266 for help. |
|
- | 222 | echo. |
|
- | 223 | pause |
|
- | 224 | goto end |
|
- | 225 | ) |
|
216 | 226 | ||
217 | :ssi2 |
227 | :ssi2 |
218 | echo You do have the Caribbean SSI file in this directory, but it has not been |
228 | echo You do have the Caribbean SSI file in this directory, but it has not been |
219 | echo extracted. It will now be unpacked. |
229 | echo extracted. It will now be unpacked. |
220 | echo. |
230 | echo. |
221 | pause |
231 | pause |
222 | md vacappssi |
232 | mkdir vacappssi |
223 | cd vacappssi |
233 | chdir vacappssi |
224 | if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%". |
234 | if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%". |
225 | "%addondir%\utils\windows\win32\unpackssi.exe" ..\VACAPP.SSI |
235 | "%addondir%\utils\windows\win32\unpackssi.exe" ..\VACAPP.SSI |
226 | move /y VACATION.PRG ..\vacation.grp |
236 | if exist VACATION.PRG move /y VACATION.PRG ..\vacation.grp |
227 | cd .. |
237 | chdir .. |
228 | if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%". |
238 | if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%". |
- | 239 | if exist vacation.grp ( |
|
229 | rd /s /q vacappssi |
240 | rmdir /s /q vacappssi |
230 | goto novacagrp_done |
241 | goto novacagrp_done |
- | 242 | ) |
|
- | 243 | if not exist vacation.grp ( |
|
- | 244 | echo Installation Error! |
|
- | 245 | echo Contact Hendricks266 for help. |
|
- | 246 | echo. |
|
- | 247 | pause |
|
- | 248 | goto end |
|
- | 249 | ) |
|
231 | 250 | ||
232 | :ssi3 |
251 | :ssi3 |
233 | echo You do have the Caribbean SSI file in this directory, but it has not been |
252 | echo You do have the Caribbean SSI file in this directory, but it has not been |
234 | echo extracted. It will now be unpacked. |
253 | echo extracted. It will now be unpacked. |
235 | echo. |
254 | echo. |
236 | pause |
255 | pause |
237 | md vaca13ssi |
256 | mkdir vaca13ssi |
238 | cd vaca13ssi |
257 | chdir vaca13ssi |
239 | if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%". |
258 | if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%". |
240 | "%addondir%\utils\windows\win32\unpackssi.exe" ..\VACA13.SSI |
259 | "%addondir%\utils\windows\win32\unpackssi.exe" ..\VACA13.SSI |
241 | ren *.TRA *.ART |
260 | ren *.TRA *.ART |
242 | ren *.PCS *.SCP |
261 | ren *.PCS *.SCP |
243 | ren VACA1.MAP vaca1.map |
262 | ren VACA1.MAP vaca1.map |
Line 259... | Line 278... | ||
259 | ren *.OMD *.DMO |
278 | ren *.OMD *.DMO |
260 | ren GAME.CON VACAGAME.CON |
279 | ren GAME.CON VACAGAME.CON |
261 | ren USER.CON VACAUSER.CON |
280 | ren USER.CON VACAUSER.CON |
262 | ren DEFS.CON VACADEFS.CON |
281 | ren DEFS.CON VACADEFS.CON |
263 | ren DUKETEAM.ANM RADLOGO.ANM |
282 | ren DUKETEAM.ANM RADLOGO.ANM |
264 | "%addondir%\utils\windows\win32\kgroup.exe" VACATION.GRP *.ART *.SCP *.map *.MID *.ANM *.VOC *.DMO CARIB.EXE |
283 | "%addondir%\utils\windows\win32\kgroup.exe" vacation.grp *.ART *.SCP *.map *.MID *.ANM *.VOC *.DMO CARIB.EXE |
265 | move /y VACATION.GRP ..\vacation.grp |
284 | if exist vacation.grp move /y vacation.grp ..\vacation.grp |
266 | move /y *.map ..\ |
285 | move /y *.map ..\ |
267 | cd .. |
286 | chdir .. |
268 | if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%". |
287 | if "%debug%"=="1" echo DEBUG: Changing directory to "%cd%". |
- | 288 | if exist vacation.grp ( |
|
269 | rd /s /q vaca13ssi |
289 | rmdir /s /q vaca13ssi |
270 | goto novacagrp_done |
290 | goto novacagrp_done |
- | 291 | ) |
|
- | 292 | if not exist vacation.grp ( |
|
- | 293 | echo Installation Error! |
|
- | 294 | echo Contact Hendricks266 for help. |
|
- | 295 | echo. |
|
- | 296 | pause |
|
- | 297 | goto end |
|
- | 298 | ) |
|
271 | 299 | ||
272 | :novacagrp_done |
300 | :novacagrp_done |
273 | call :grpchecksum |
301 | call :grpchecksum |
274 | call :grpchecksum_results |
302 | call :grpchecksum_results |
275 | goto novacagrp_return |
303 | goto novacagrp_return |
Line 317... | Line 345... | ||
317 | if not exist vacasl.patch goto nopatch |
345 | if not exist vacasl.patch goto nopatch |
318 | if not exist vacadm1.patch goto nopatch |
346 | if not exist vacadm1.patch goto nopatch |
319 | if not exist vacadm2.patch goto nopatch |
347 | if not exist vacadm2.patch goto nopatch |
320 | if not exist vacadm3.patch goto nopatch |
348 | if not exist vacadm3.patch goto nopatch |
321 | if not exist vacadm4.patch goto nopatch |
349 | if not exist vacadm4.patch goto nopatch |
322 | md vaca_preserve |
350 | mkdir vaca_preserve |
323 | if exist vaca*.map move /y vaca*.map vaca_preserve\ |
351 | if exist vaca*.map move /y vaca*.map vaca_preserve\ |
324 | if exist "%exedir%\vaca*.map" move /y "%exedir%\vaca*.map" vaca_preserve\ |
352 | if exist "%exedir%\vaca*.map" move /y "%exedir%\vaca*.map" vaca_preserve\ |
325 | "%addondir%\utils\windows\win32\kextract.exe" VACATION.GRP VACA*.MAP |
353 | "%addondir%\utils\windows\win32\kextract.exe" vacation.grp VACA*.MAP |
326 | ren VACA1.MAP vaca1.map |
354 | ren VACA1.MAP vaca1.map |
327 | ren VACA2.MAP vaca2.map |
355 | ren VACA2.MAP vaca2.map |
328 | ren VACA3.MAP vaca3.map |
356 | ren VACA3.MAP vaca3.map |
329 | ren VACA4.MAP vaca4.map |
357 | ren VACA4.MAP vaca4.map |
330 | ren VACA5.MAP vaca5.map |
358 | ren VACA5.MAP vaca5.map |
Line 359... | Line 387... | ||
359 | echo Do not delete this file^! You will be forced to reinstall Vaca+ and repatch the maps. >vacaflag_%addonver%.h266 |
387 | echo Do not delete this file^! You will be forced to reinstall Vaca+ and repatch the maps. >vacaflag_%addonver%.h266 |
360 | attrib +r vacaflag_%addonver%.h266 |
388 | attrib +r vacaflag_%addonver%.h266 |
361 | echo. |
389 | echo. |
362 | echo Patching complete^! |
390 | echo Patching complete^! |
363 | :scanning |
391 | :scanning |
364 | cd "%exedir%" |
392 | chdir "%exedir%" |
365 | echo. |
393 | echo. |
366 | echo Scanning directory for potential problems. |
394 | echo Scanning directory for potential problems. |
367 | if exist vaca1.mhk goto mhkfound |
395 | if exist vaca1.mhk goto mhkfound |
368 | if exist vaca2.mhk goto mhkfound |
396 | if exist vaca2.mhk goto mhkfound |
369 | if exist vaca3.mhk goto mhkfound |
397 | if exist vaca3.mhk goto mhkfound |
Line 422... | Line 450... | ||
422 | if exist VBeachBall.con goto confound |
450 | if exist VBeachBall.con goto confound |
423 | if exist VBeachBather.con goto confound |
451 | if exist VBeachBather.con goto confound |
424 | if exist VDragon.con goto confound |
452 | if exist VDragon.con goto confound |
425 | if exist VSeagull.con goto confound |
453 | if exist VSeagull.con goto confound |
426 | :confound_done |
454 | :confound_done |
427 | cd /d "%exedir%" |
455 | chdir /d "%exedir%" |
428 | if not exist GAME.CON "%addondir%\utils\windows\win32\kextract.exe" DUKE3D.GRP GAME.CON |
456 | if not exist GAME.CON "%addondir%\utils\windows\win32\kextract.exe" DUKE3D.GRP GAME.CON |
429 | if not exist DEFS.CON "%addondir%\utils\windows\win32\kextract.exe" DUKE3D.GRP DEFS.CON |
457 | if not exist DEFS.CON "%addondir%\utils\windows\win32\kextract.exe" DUKE3D.GRP DEFS.CON |
430 | if not exist USER.CON "%addondir%\utils\windows\win32\kextract.exe" DUKE3D.GRP USER.CON |
458 | if not exist USER.CON "%addondir%\utils\windows\win32\kextract.exe" DUKE3D.GRP USER.CON |
431 | cd /d "%addondir%" |
459 | chdir /d "%addondir%" |
432 | echo. |
460 | echo. |
433 | pause |
461 | pause |
434 | goto restart |
462 | goto restart |
435 | 463 | ||
436 | :checksum |
464 | :checksum |
Line 527... | Line 555... | ||
527 | echo Vaca+ will have major errors if the included .con files are not used. |
555 | echo Vaca+ will have major errors if the included .con files are not used. |
528 | goto confound_done |
556 | goto confound_done |
529 | 557 | ||
530 | :execheck |
558 | :execheck |
531 | if exist %exename%.bat goto execheck_done |
559 | if exist %exename%.bat goto execheck_done |
532 | if exist ..\%exename%.exe ( |
560 | if exist %exename%.exe goto recheck |
533 | cd .. |
- | |
534 | goto recheck |
- | |
535 | ) |
- | |
536 | if exist ..\..\%exename%.exe ( |
- | |
537 | cd ..\.. |
- | |
538 | goto recheck |
561 | set prevdir=%cd% |
539 | ) |
- | |
540 | if exist ..\..\..\%exename%.exe ( |
562 | if not "%cd%"=="%cd:~0,3%" cd .. |
541 | cd ..\..\.. |
- | |
542 | goto recheck |
- | |
543 | ) |
- | |
544 | if exist ..\%exename%.bat ( |
- | |
545 | cd .. |
- | |
546 | goto execheck_done |
- | |
547 | ) |
- | |
548 | if exist ..\..\%exename%.bat ( |
- | |
549 | cd ..\.. |
- | |
550 | goto execheck_done |
- | |
551 | ) |
- | |
552 | if exist ..\..\..\%exename%.bat ( |
563 | if not "%cd%"=="%prevdir%" goto execheck |
553 | cd ..\..\.. |
- | |
554 | goto execheck_done |
- | |
555 | ) |
- | |
556 | echo Warning: You don't have %exeproper% in your directory. |
564 | echo Warning: You don't have %exeproper% in your directory. |
- | 565 | chdir /d "%~dp0" |
|
557 | goto execheck_done |
566 | goto execheck_done |
558 | 567 | ||
559 | :nodir |
568 | :nodir |
560 | echo. |
569 | echo. |
561 | echo Error: "vaca_plus" data directory not found. |
570 | echo Error: "vaca_plus" data directory not found. |