Subversion Repositories nw_plus

Compare Revisions

Regard whitespace Rev 43 → Rev 42

/nw_plus/NWinter.bat
1,7 → 1,7
@echo off
@color 0C
pushd .
chdir /d "%~dp0"
cd /d "%~dp0"
 
:restart
title Duke: Nuclear Winter Plus Launcher
51,7 → 51,7
if exist nwinter\ set addonhrpdir=%cd%
:addondircheck
 
chdir nw_plus
cd nw_plus
set addondir=%cd%
if exist nwinter\ set addonhrpdir=%cd%
if exist nw_plus\ goto addondircheck
66,7 → 66,6
goto nonwgrp
) )
 
if exist nwinter.grp ren nwinter.grp nwinter.grp
call :grpchecksum
:nonwgrp_return
if not "%version%"=="demo" (
84,7 → 83,7
 
 
 
chdir /d "%exedir%"
cd "%exedir%"
echo.
echo To switch your character, open the console (~) and type one of the following:
echo Duke: "setvar skin 0".
157,9 → 156,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
 
chdir /d "%addondir%"
cd /d "%addondir%"
if not "%svnpath%"=="0" if exist ".svn" svn update
chdir /d "%addonhrpdir%"
cd /d "%addonhrpdir%"
if not "%svnpath%"=="0" if exist ".svn" svn update
 
goto end
181,7 → 180,6
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
188,14 → 186,6
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" (
248,10 → 238,10
if not exist nwl6.patch goto nopatch
if not exist nwl7.patch goto nopatch
if not exist nwl8.patch goto nopatch
mkdir nw_preserve
md 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
282,7 → 272,7
echo.
echo Patching complete^!
:scanning
chdir "%exedir%"
cd "%exedir%"
echo.
echo Scanning directory for potential problems.
if exist nwl1.mhk goto mhkfound
321,11 → 311,11
if exist NWSnow.con goto confound
if exist NWUser.con goto confound
:confound_done
chdir /d "%exedir%"
cd /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
chdir /d "%addondir%"
cd /d "%addondir%"
echo.
pause
goto restart
416,12 → 406,31
 
:execheck
if exist %exename%.bat 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
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
)
echo Warning: You don't have %exeproper% in your directory.
chdir /d "%~dp0"
goto execheck_done
 
:nodir