61,6 → 61,11 |
if "%debug%"=="1" echo DEBUG: NW+ Directory: "%addondir%". |
if "%debug%"=="1" echo DEBUG: NWHRP Directory: "%addonhrpdir%". |
|
set kextract=%addondir%\utils\windows\win32\kextract.exe |
if "%debug%"=="1" set kextract=%addondir%\utils\windows\win32\kextract.debug.exe |
set bspatch=%addondir%\utils\windows\win32\bspatch.exe |
set sha1sum=%addondir%\utils\windows\win32\sha1sum.exe |
|
if "%nwgrpname%"=="" set nwgrpname=nwinter.grp |
if not exist "%exedir%\%nwgrpname%" if not exist "%addondir%\%nwgrpname%" if exist "%exedir%\nwinter_demo.grp" set nwgrpname=nwinter_demo.grp |
if not exist "%exedir%\%nwgrpname%" if not exist "%addondir%\%nwgrpname%" if exist "%addondir%\nwinter_demo.grp" set nwgrpname=nwinter_demo.grp |
219,16 → 224,16 |
) |
|
:grpchecksum |
if not exist "%addondir%\utils\windows\win32\sha1sum.exe" ( |
echo "%addondir%\utils\windows\win32\sha1sum.exe" not found. |
if not exist "%sha1sum%" ( |
echo "%sha1sum%" not found. |
goto :eof |
) |
pushd . |
if exist "%addondir%\%nwgrpname%" chdir /d %addondir% |
if exist "%exedir%\%nwgrpname%" chdir /d %exedir% |
echo a6728f621f121f9db02ee67c39efdbb5eea95711 *%nwgrpname% | "%addondir%\utils\windows\win32\sha1sum.exe" --status --check - |
echo a6728f621f121f9db02ee67c39efdbb5eea95711 *%nwgrpname% | "%sha1sum%" --status --check - |
if "%ERRORLEVEL%"=="0" set version=full && popd && goto :eof |
if "%ERRORLEVEL%"=="1" echo 1b33b2cbb7101b5b18b15855392f55575413ecc3 *%nwgrpname% | "%addondir%\utils\windows\win32\sha1sum.exe" --status --check - |
if "%ERRORLEVEL%"=="1" echo 1b33b2cbb7101b5b18b15855392f55575413ecc3 *%nwgrpname% | "%sha1sum%" --status --check - |
if "%ERRORLEVEL%"=="0" set version=demo && popd && goto :eof |
if "%ERRORLEVEL%"=="1" set version=unknown |
popd |
276,7 → 281,7 |
mkdir nw_preserve |
if exist nwl*.map move /y nwl*.map nw_preserve\ |
if exist "%exedir%\nwl*.map" move /y "%exedir%\nwl*.map" nw_preserve\ |
"%addondir%\utils\windows\win32\kextract.exe" nwinter.grp E2L*.MAP |
"%kextract%" nwinter.grp E2L*.MAP |
ren E2L1.MAP nwl1.map |
ren E2L2.MAP nwl2.map |
ren E2L3.MAP nwl3.map |
292,14 → 297,14 |
echo. |
pause |
echo |
"%addondir%\utils\windows\win32\bspatch.exe" nwl1.map nwl1.map nwl1.patch |
"%addondir%\utils\windows\win32\bspatch.exe" nwl2.map nwl2.map nwl2.patch |
"%addondir%\utils\windows\win32\bspatch.exe" nwl3.map nwl3.map nwl3.patch |
"%addondir%\utils\windows\win32\bspatch.exe" nwl4.map nwl4.map nwl4.patch |
"%addondir%\utils\windows\win32\bspatch.exe" nwl5.map nwl5.map nwl5.patch |
"%addondir%\utils\windows\win32\bspatch.exe" nwl6.map nwl6.map nwl6.patch |
"%addondir%\utils\windows\win32\bspatch.exe" nwl7.map nwl7.map nwl7.patch |
"%addondir%\utils\windows\win32\bspatch.exe" nwl8.map nwl8.map nwl8.patch |
"%bspatch%" nwl1.map nwl1.map nwl1.patch |
"%bspatch%" nwl2.map nwl2.map nwl2.patch |
"%bspatch%" nwl3.map nwl3.map nwl3.patch |
"%bspatch%" nwl4.map nwl4.map nwl4.patch |
"%bspatch%" nwl5.map nwl5.map nwl5.patch |
"%bspatch%" nwl6.map nwl6.map nwl6.patch |
"%bspatch%" nwl7.map nwl7.map nwl7.patch |
"%bspatch%" nwl8.map nwl8.map nwl8.patch |
if exist nwpatch*.h266 del /f /q nwpatch*.h266 |
if exist nwflag*.h266 del /f /q nwflag*.h266 |
echo Do not delete this file! You will be forced to reinstall NW+ and repatch the maps. >nwflag_%addonver%.h266 |
347,9 → 352,9 |
if exist NWUser.con goto confound |
:confound_done |
chdir /d "%exedir%" |
if not exist GAME.CON "%addondir%\utils\windows\win32\kextract.exe" DUKE3D.GRP GAME.CON |
if not exist DEFS.CON "%addondir%\utils\windows\win32\kextract.exe" DUKE3D.GRP DEFS.CON |
if not exist USER.CON "%addondir%\utils\windows\win32\kextract.exe" DUKE3D.GRP USER.CON |
if not exist GAME.CON "%kextract%" DUKE3D.GRP GAME.CON |
if not exist DEFS.CON "%kextract%" DUKE3D.GRP DEFS.CON |
if not exist USER.CON "%kextract%" DUKE3D.GRP USER.CON |
chdir /d "%addondir%" |
echo. |
pause |
356,12 → 361,12 |
goto restart |
|
:checksum |
if not exist "%addondir%\utils\windows\win32\sha1sum.exe" ( |
echo "%addondir%\utils\windows\win32\sha1sum.exe" not found. |
if not exist "%sha1sum%" ( |
echo "%sha1sum%" not found. |
goto :eof |
) |
if not exist "%~2" goto :eof |
echo %~1 *%~2 | "%addondir%\utils\windows\win32\sha1sum.exe" --status --check - |
echo %~1 *%~2 | "%sha1sum%" --status --check - |
if "%ERRORLEVEL%"=="0" ( |
ren "%~2" "NWOld_%addonver%_%~nx2" |
echo %~3 %~nx2 |