Subversion Repositories nw_plus

Rev

Rev 55 | Rev 57 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 55 Rev 56
Line 1... Line 1...
1
@echo off
1
@echo off
2
@color 0C
2
@color 0C
3
pushd "%~dp0"
3
pushd "%~dp0"
-
 
4
set startdir=%cd%
4
 
5
 
5
:restart
6
:restart
6
title Duke: Nuclear Winter Plus Launcher
7
title Duke: Nuclear Winter Plus Launcher
7
if "%editor%"=="1" title Duke: Nuclear Winter Plus Editor Launcher
8
if "%editor%"=="1" title Duke: Nuclear Winter Plus Editor Launcher
8
 
9
 
9
set exedir=%~dp0
10
set exedir=%startdir%
10
set addondir=%~dp0
11
set addondir=%startdir%
11
set addonhrpdir=%~dp0
12
set addonhrpdir=%startdir%
12
 
13
 
13
set exename=eduke32
14
set exename=eduke32
14
set exeproper=EDuke32
15
set exeproper=EDuke32
15
set action=playing
16
set action=playing
16
 
17
 
Line 145... Line 146...
145
start %exe%.exe %args%
146
start %exe%.exe %args%
146
if "%debug%"=="1" echo DEBUG: Final Command Line: start %exe%.exe %args%
147
if "%debug%"=="1" echo DEBUG: Final Command Line: start %exe%.exe %args%
147
)
148
)
148
 
149
 
149
set svnpath=0
150
set svnpath=0
150
if "%svnpath%"=="0" if exist "%~dp0\svn\bin\svn.exe" set svnpath=%~dp0\svn\bin
151
if "%svnpath%"=="0" if exist "%startdir%\svn\bin\svn.exe" set svnpath=%startdir%\svn\bin
151
if "%svnpath%"=="0" if exist "%exedir%\svn\bin\svn.exe" set svnpath=%exedir%\svn\bin
152
if "%svnpath%"=="0" if exist "%exedir%\svn\bin\svn.exe" set svnpath=%exedir%\svn\bin
152
if "%svnpath%"=="0" if exist "%ProgramFiles%\SlikSvn\bin\svn.exe" set svnpath=%ProgramFiles%\SlikSvn\bin
153
if "%svnpath%"=="0" if exist "%ProgramFiles%\SlikSvn\bin\svn.exe" set svnpath=%ProgramFiles%\SlikSvn\bin
153
if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\SlikSvn\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\SlikSvn\bin
154
if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\SlikSvn\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\SlikSvn\bin
154
if "%svnpath%"=="0" if exist "%ProgramFiles%\Subversion\bin\svn.exe" set svnpath=%ProgramFiles%\Subversion\bin
155
if "%svnpath%"=="0" if exist "%ProgramFiles%\Subversion\bin\svn.exe" set svnpath=%ProgramFiles%\Subversion\bin
155
if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\Subversion\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\Subversion\bin
156
if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\Subversion\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\Subversion\bin
156
if "%svnpath%"=="0" if exist "%ProgramFiles%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles%\TortoiseSVN\bin
157
if "%svnpath%"=="0" if exist "%ProgramFiles%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles%\TortoiseSVN\bin
157
if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\TortoiseSVN\bin
158
if "%svnpath%"=="0" if exist "%ProgramFiles(x86)%\TortoiseSVN\bin\svn.exe" set svnpath=%ProgramFiles(x86)%\TortoiseSVN\bin
158
if "%svnpath%"=="0" for %%S in (svn.exe) do if exist "%%~dp$PATH:S" set svnpath=%%~dp$PATH:S
159
if "%svnpath%"=="0" for %%S in (svn.exe) do if exist "%%~dp$PATH:S" set svnpath=%%~dp$PATH:S
159
 
160
 
160
chdir /d "%addondir%"
161
chdir /d "%addondir%"
161
if not "%svnpath%"=="0" if exist ".svn" "%svnpath%\svn.exe" update
162
if not "%svnpath%"=="0" if exist ".svn" call :svn_action
162
chdir /d "%addonhrpdir%"
163
chdir /d "%addonhrpdir%"
163
if not "%svnpath%"=="0" if exist ".svn" "%svnpath%\svn.exe" update
164
if not "%svnpath%"=="0" if exist ".svn" call :svn_action
164
 
165
 
165
goto end
166
goto end
166
 
167
 
-
 
168
:svn_action
-
 
169
set PATH=%PATH%;%svnpath%
-
 
170
for /f "delims=" %%a in ('svnversion.exe .') do @set oldrev=%%a
-
 
171
"svn.exe" update
-
 
172
for /f "delims=" %%a in ('svnversion.exe .') do @set rev=%%a
-
 
173
if %rev% EQU %oldrev% goto :eof
-
 
174
set /a oldrev=%oldrev% + 1
-
 
175
echo.
-
 
176
"svn.exe" log -r %oldrev%:%rev%
-
 
177
echo.
-
 
178
pause
-
 
179
goto :eof
-
 
180
 
167
:nonwgrp
181
:nonwgrp
168
echo.
182
echo.
169
echo Error: You don't have NWINTER.GRP in your directory.
183
echo Error: You don't have NWINTER.GRP in your directory.
170
 
184
 
171
 
185
 
Line 205... Line 219...
205
if not exist "%addondir%\utils\windows\win32\sha1sum.exe" (
219
if not exist "%addondir%\utils\windows\win32\sha1sum.exe" (
206
echo "%addondir%\utils\windows\win32\sha1sum.exe" not found.
220
echo "%addondir%\utils\windows\win32\sha1sum.exe" not found.
207
goto :eof
221
goto :eof
208
)
222
)
209
pushd .
223
pushd .
210
if exist "%addondir%\%nwgrpname%" cd /d %addondir%
224
if exist "%addondir%\%nwgrpname%" chdir /d %addondir%
211
if exist "%exedir%\%nwgrpname%" cd /d %exedir%
225
if exist "%exedir%\%nwgrpname%" chdir /d %exedir%
212
echo a6728f621f121f9db02ee67c39efdbb5eea95711 *%nwgrpname% | "%addondir%\utils\windows\win32\sha1sum.exe" --status --check -
226
echo a6728f621f121f9db02ee67c39efdbb5eea95711 *%nwgrpname% | "%addondir%\utils\windows\win32\sha1sum.exe" --status --check -
213
if "%ERRORLEVEL%"=="0" set version=full && popd && goto :eof
227
if "%ERRORLEVEL%"=="0" set version=full && popd && goto :eof
214
if "%ERRORLEVEL%"=="1" echo 1b33b2cbb7101b5b18b15855392f55575413ecc3 *%nwgrpname% | "%addondir%\utils\windows\win32\sha1sum.exe" --status --check -
228
if "%ERRORLEVEL%"=="1" echo 1b33b2cbb7101b5b18b15855392f55575413ecc3 *%nwgrpname% | "%addondir%\utils\windows\win32\sha1sum.exe" --status --check -
215
if "%ERRORLEVEL%"=="0" set version=demo && popd && goto :eof
229
if "%ERRORLEVEL%"=="0" set version=demo && popd && goto :eof
216
if "%ERRORLEVEL%"=="1" set version=unknown
230
if "%ERRORLEVEL%"=="1" set version=unknown
Line 424... Line 438...
424
 
438
 
425
:execheck
439
:execheck
426
if exist %exename%.bat goto execheck_done
440
if exist %exename%.bat goto execheck_done
427
if exist %exename%.exe goto recheck
441
if exist %exename%.exe goto recheck
428
set prevdir=%cd%
442
set prevdir=%cd%
429
if not "%cd%"=="%cd:~0,3%" cd ..
443
if not "%cd%"=="%cd:~0,3%" chdir ..
430
if not "%cd%"=="%prevdir%" goto execheck
444
if not "%cd%"=="%prevdir%" goto execheck
431
echo Warning: You don't have %exeproper% in your directory.
445
echo Warning: You don't have %exeproper% in your directory.
432
chdir /d "%~dp0"
446
chdir /d "%startdir%"
433
goto execheck_done
447
goto execheck_done
434
 
448
 
435
:nodir
449
:nodir
436
echo.
450
echo.
437
echo Error: "nw_plus" data directory not found.
451
echo Error: "nw_plus" data directory not found.