Rev 62 | Rev 68 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 62 | Rev 63 | ||
---|---|---|---|
Line 59... | Line 59... | ||
59 | if exist nwinter\ set addonhrpdir=%cd% |
59 | if exist nwinter\ set addonhrpdir=%cd% |
60 | if exist nw_plus\ goto addondircheck |
60 | if exist nw_plus\ goto addondircheck |
61 | if "%debug%"=="1" echo DEBUG: NW+ Directory: "%addondir%". |
61 | if "%debug%"=="1" echo DEBUG: NW+ Directory: "%addondir%". |
62 | if "%debug%"=="1" echo DEBUG: NWHRP Directory: "%addonhrpdir%". |
62 | if "%debug%"=="1" echo DEBUG: NWHRP Directory: "%addonhrpdir%". |
63 | 63 | ||
- | 64 | set kextract=%addondir%\utils\windows\win32\kextract.exe |
|
- | 65 | if "%debug%"=="1" set kextract=%addondir%\utils\windows\win32\kextract.debug.exe |
|
- | 66 | set bspatch=%addondir%\utils\windows\win32\bspatch.exe |
|
- | 67 | set sha1sum=%addondir%\utils\windows\win32\sha1sum.exe |
|
- | 68 | ||
64 | if "%nwgrpname%"=="" set nwgrpname=nwinter.grp |
69 | if "%nwgrpname%"=="" set nwgrpname=nwinter.grp |
65 | if not exist "%exedir%\%nwgrpname%" if not exist "%addondir%\%nwgrpname%" if exist "%exedir%\nwinter_demo.grp" set nwgrpname=nwinter_demo.grp |
70 | if not exist "%exedir%\%nwgrpname%" if not exist "%addondir%\%nwgrpname%" if exist "%exedir%\nwinter_demo.grp" set nwgrpname=nwinter_demo.grp |
66 | if not exist "%exedir%\%nwgrpname%" if not exist "%addondir%\%nwgrpname%" if exist "%addondir%\nwinter_demo.grp" set nwgrpname=nwinter_demo.grp |
71 | if not exist "%exedir%\%nwgrpname%" if not exist "%addondir%\%nwgrpname%" if exist "%addondir%\nwinter_demo.grp" set nwgrpname=nwinter_demo.grp |
67 | if not exist "%exedir%\%nwgrpname%" if not exist "%addondir%\%nwgrpname%" goto nonwgrp |
72 | if not exist "%exedir%\%nwgrpname%" if not exist "%addondir%\%nwgrpname%" goto nonwgrp |
68 | 73 | ||
Line 217... | Line 222... | ||
217 | pause |
222 | pause |
218 | goto end |
223 | goto end |
219 | ) |
224 | ) |
220 | 225 | ||
221 | :grpchecksum |
226 | :grpchecksum |
222 | if not exist "%addondir%\utils\windows\win32\sha1sum.exe" ( |
227 | if not exist "%sha1sum%" ( |
223 | echo "%addondir%\utils\windows\win32\sha1sum.exe" not found. |
228 | echo "%sha1sum%" not found. |
224 | goto :eof |
229 | goto :eof |
225 | ) |
230 | ) |
226 | pushd . |
231 | pushd . |
227 | if exist "%addondir%\%nwgrpname%" chdir /d %addondir% |
232 | if exist "%addondir%\%nwgrpname%" chdir /d %addondir% |
228 | if exist "%exedir%\%nwgrpname%" chdir /d %exedir% |
233 | if exist "%exedir%\%nwgrpname%" chdir /d %exedir% |
229 | echo a6728f621f121f9db02ee67c39efdbb5eea95711 *%nwgrpname% | "%addondir%\utils\windows\win32\sha1sum.exe" --status --check - |
234 | echo a6728f621f121f9db02ee67c39efdbb5eea95711 *%nwgrpname% | "%sha1sum%" --status --check - |
230 | if "%ERRORLEVEL%"=="0" set version=full && popd && goto :eof |
235 | if "%ERRORLEVEL%"=="0" set version=full && popd && goto :eof |
231 | if "%ERRORLEVEL%"=="1" echo 1b33b2cbb7101b5b18b15855392f55575413ecc3 *%nwgrpname% | "%addondir%\utils\windows\win32\sha1sum.exe" --status --check - |
236 | if "%ERRORLEVEL%"=="1" echo 1b33b2cbb7101b5b18b15855392f55575413ecc3 *%nwgrpname% | "%sha1sum%" --status --check - |
232 | if "%ERRORLEVEL%"=="0" set version=demo && popd && goto :eof |
237 | if "%ERRORLEVEL%"=="0" set version=demo && popd && goto :eof |
233 | if "%ERRORLEVEL%"=="1" set version=unknown |
238 | if "%ERRORLEVEL%"=="1" set version=unknown |
234 | popd |
239 | popd |
235 | goto :eof |
240 | goto :eof |
236 | 241 | ||
Line 274... | Line 279... | ||
274 | if not exist nwl7.patch goto nopatch |
279 | if not exist nwl7.patch goto nopatch |
275 | if not exist nwl8.patch goto nopatch |
280 | if not exist nwl8.patch goto nopatch |
276 | mkdir nw_preserve |
281 | mkdir nw_preserve |
277 | if exist nwl*.map move /y nwl*.map nw_preserve\ |
282 | if exist nwl*.map move /y nwl*.map nw_preserve\ |
278 | if exist "%exedir%\nwl*.map" move /y "%exedir%\nwl*.map" nw_preserve\ |
283 | if exist "%exedir%\nwl*.map" move /y "%exedir%\nwl*.map" nw_preserve\ |
279 | "%addondir%\utils\windows\win32\kextract.exe" nwinter.grp E2L*.MAP |
284 | "%kextract%" nwinter.grp E2L*.MAP |
280 | ren E2L1.MAP nwl1.map |
285 | ren E2L1.MAP nwl1.map |
281 | ren E2L2.MAP nwl2.map |
286 | ren E2L2.MAP nwl2.map |
282 | ren E2L3.MAP nwl3.map |
287 | ren E2L3.MAP nwl3.map |
283 | ren E2L4.MAP nwl4.map |
288 | ren E2L4.MAP nwl4.map |
284 | ren E2L5.MAP nwl5.map |
289 | ren E2L5.MAP nwl5.map |
Line 290... | Line 295... | ||
290 | echo. |
295 | echo. |
291 | echo Map patching will now begin. |
296 | echo Map patching will now begin. |
292 | echo. |
297 | echo. |
293 | pause |
298 | pause |
294 | echo |
299 | echo |
295 | "%addondir%\utils\windows\win32\bspatch.exe" nwl1.map nwl1.map nwl1.patch |
300 | "%bspatch%" nwl1.map nwl1.map nwl1.patch |
296 | "%addondir%\utils\windows\win32\bspatch.exe" nwl2.map nwl2.map nwl2.patch |
301 | "%bspatch%" nwl2.map nwl2.map nwl2.patch |
297 | "%addondir%\utils\windows\win32\bspatch.exe" nwl3.map nwl3.map nwl3.patch |
302 | "%bspatch%" nwl3.map nwl3.map nwl3.patch |
298 | "%addondir%\utils\windows\win32\bspatch.exe" nwl4.map nwl4.map nwl4.patch |
303 | "%bspatch%" nwl4.map nwl4.map nwl4.patch |
299 | "%addondir%\utils\windows\win32\bspatch.exe" nwl5.map nwl5.map nwl5.patch |
304 | "%bspatch%" nwl5.map nwl5.map nwl5.patch |
300 | "%addondir%\utils\windows\win32\bspatch.exe" nwl6.map nwl6.map nwl6.patch |
305 | "%bspatch%" nwl6.map nwl6.map nwl6.patch |
301 | "%addondir%\utils\windows\win32\bspatch.exe" nwl7.map nwl7.map nwl7.patch |
306 | "%bspatch%" nwl7.map nwl7.map nwl7.patch |
302 | "%addondir%\utils\windows\win32\bspatch.exe" nwl8.map nwl8.map nwl8.patch |
307 | "%bspatch%" nwl8.map nwl8.map nwl8.patch |
303 | if exist nwpatch*.h266 del /f /q nwpatch*.h266 |
308 | if exist nwpatch*.h266 del /f /q nwpatch*.h266 |
304 | if exist nwflag*.h266 del /f /q nwflag*.h266 |
309 | if exist nwflag*.h266 del /f /q nwflag*.h266 |
305 | echo Do not delete this file! You will be forced to reinstall NW+ and repatch the maps. >nwflag_%addonver%.h266 |
310 | echo Do not delete this file! You will be forced to reinstall NW+ and repatch the maps. >nwflag_%addonver%.h266 |
306 | attrib +r nwflag_%addonver%.h266 |
311 | attrib +r nwflag_%addonver%.h266 |
307 | echo. |
312 | echo. |
Line 345... | Line 350... | ||
345 | if exist NWEDuke.con goto confound |
350 | if exist NWEDuke.con goto confound |
346 | if exist NWSnow.con goto confound |
351 | if exist NWSnow.con goto confound |
347 | if exist NWUser.con goto confound |
352 | if exist NWUser.con goto confound |
348 | :confound_done |
353 | :confound_done |
349 | chdir /d "%exedir%" |
354 | chdir /d "%exedir%" |
350 | if not exist GAME.CON "%addondir%\utils\windows\win32\kextract.exe" DUKE3D.GRP GAME.CON |
355 | if not exist GAME.CON "%kextract%" DUKE3D.GRP GAME.CON |
351 | if not exist DEFS.CON "%addondir%\utils\windows\win32\kextract.exe" DUKE3D.GRP DEFS.CON |
356 | if not exist DEFS.CON "%kextract%" DUKE3D.GRP DEFS.CON |
352 | if not exist USER.CON "%addondir%\utils\windows\win32\kextract.exe" DUKE3D.GRP USER.CON |
357 | if not exist USER.CON "%kextract%" DUKE3D.GRP USER.CON |
353 | chdir /d "%addondir%" |
358 | chdir /d "%addondir%" |
354 | echo. |
359 | echo. |
355 | pause |
360 | pause |
356 | goto restart |
361 | goto restart |
357 | 362 | ||
358 | :checksum |
363 | :checksum |
359 | if not exist "%addondir%\utils\windows\win32\sha1sum.exe" ( |
364 | if not exist "%sha1sum%" ( |
360 | echo "%addondir%\utils\windows\win32\sha1sum.exe" not found. |
365 | echo "%sha1sum%" not found. |
361 | goto :eof |
366 | goto :eof |
362 | ) |
367 | ) |
363 | if not exist "%~2" goto :eof |
368 | if not exist "%~2" goto :eof |
364 | echo %~1 *%~2 | "%addondir%\utils\windows\win32\sha1sum.exe" --status --check - |
369 | echo %~1 *%~2 | "%sha1sum%" --status --check - |
365 | if "%ERRORLEVEL%"=="0" ( |
370 | if "%ERRORLEVEL%"=="0" ( |
366 | ren "%~2" "NWOld_%addonver%_%~nx2" |
371 | ren "%~2" "NWOld_%addonver%_%~nx2" |
367 | echo %~3 %~nx2 |
372 | echo %~3 %~nx2 |
368 | ) |
373 | ) |
369 | goto :eof |
374 | goto :eof |