Subversion Repositories nw_plus

Compare Revisions

Regard whitespace Rev 42 → Rev 43

/nw_plus/NWinter.bat
1,7 → 1,7
@echo off
@color 0C
pushd .
cd /d "%~dp0"
chdir /d "%~dp0"
 
:restart
title Duke: Nuclear Winter Plus Launcher
51,7 → 51,7
if exist nwinter\ set addonhrpdir=%cd%
:addondircheck
 
cd nw_plus
chdir nw_plus
set addondir=%cd%
if exist nwinter\ set addonhrpdir=%cd%
if exist nw_plus\ goto addondircheck
66,6 → 66,7
goto nonwgrp
) )
 
if exist nwinter.grp ren nwinter.grp nwinter.grp
call :grpchecksum
:nonwgrp_return
if not "%version%"=="demo" (
83,7 → 84,7
 
 
 
cd "%exedir%"
chdir /d "%exedir%"
echo.
echo To switch your character, open the console (~) and type one of the following:
echo Duke: "setvar skin 0".
156,9 → 157,9
if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\TortoiseSVN\bin
if "%svnpath%"=="0" for %%S in (svn.exe) do if exist "%%~dp$PATH:S" set svnpath=%%~dp$PATH:S
 
cd /d "%addondir%"
chdir /d "%addondir%"
if not "%svnpath%"=="0" if exist ".svn" svn update
cd /d "%addonhrpdir%"
chdir /d "%addonhrpdir%"
if not "%svnpath%"=="0" if exist ".svn" svn update
 
goto end
180,6 → 181,7
if not exist %cddrive%:\GAMEDATA\NWINTER.GRP goto cdw
copy %cddrive%:GAMEDATA\NWINTER.GRP .\nwinter.grp
echo.
if exist nwinter.grp (
type NWINTRO.TXT
echo.
pause
186,6 → 188,14
call :grpchecksum
call :grpchecksum_results
goto nonwgrp_return
)
if not exist nwinter.grp (
echo Installation Error!
echo Contact Hendricks266 for help.
echo.
pause
goto end
)
 
:grpchecksum
if not exist "%addondir%\utils\windows\win32\sha1sum.exe" (
238,10 → 248,10
if not exist nwl6.patch goto nopatch
if not exist nwl7.patch goto nopatch
if not exist nwl8.patch goto nopatch
md nw_preserve
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
"%addondir%\utils\windows\win32\kextract.exe" nwinter.grp E2L*.MAP
ren E2L1.MAP nwl1.map
ren E2L2.MAP nwl2.map
ren E2L3.MAP nwl3.map
272,7 → 282,7
echo.
echo Patching complete^!
:scanning
cd "%exedir%"
chdir "%exedir%"
echo.
echo Scanning directory for potential problems.
if exist nwl1.mhk goto mhkfound
311,11 → 321,11
if exist NWSnow.con goto confound
if exist NWUser.con goto confound
:confound_done
cd /d "%exedir%"
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
cd /d "%addondir%"
chdir /d "%addondir%"
echo.
pause
goto restart
406,31 → 416,12
 
:execheck
if exist %exename%.bat goto execheck_done
if exist ..\%exename%.exe (
cd ..
goto recheck
)
if exist ..\..\%exename%.exe (
cd ..\..
goto recheck
)
if exist ..\..\..\%exename%.exe (
cd ..\..\..
goto recheck
)
if exist ..\%exename%.bat (
cd ..
goto execheck_done
)
if exist ..\..\%exename%.bat (
cd ..\..
goto execheck_done
)
if exist ..\..\..\%exename%.bat (
cd ..\..\..
goto execheck_done
)
if exist %exename%.exe goto recheck
set prevdir=%cd%
if not "%cd%"=="%cd:~0,3%" cd ..
if not "%cd%"=="%prevdir%" goto execheck
echo Warning: You don't have %exeproper% in your directory.
chdir /d "%~dp0"
goto execheck_done
 
:nodir