Backs up the live pack/*.eix/*.epk, rebuilds all three from source via the new PackTool binaries, and verifies every entry through both a single-pack round-trip and a full CEterPackManager registration (the latter catches path-prefix bugs the former can't).
65 lines
2.2 KiB
Batchfile
65 lines
2.2 KiB
Batchfile
@echo off
|
|
setlocal enabledelayedexpansion
|
|
|
|
set TOOLDIR=Y:\Metin2Dev\Programmierung\Client\vs_files\PackTool
|
|
set ETERNEXUS=Y:\Metin2Dev\Exec_Client\Eternexus
|
|
set PACKDIR=Y:\Metin2Dev\Exec_Client\pack
|
|
|
|
for /f %%i in ('powershell -NoProfile -Command "Get-Date -Format yyyyMMdd_HHmmss"') do set TS=%%i
|
|
set BACKUPDIR=%PACKDIR%\backup_%TS%
|
|
|
|
echo Backing up aktuelle root/uiscript/locale_de packs nach %BACKUPDIR%
|
|
mkdir "%BACKUPDIR%" >nul 2>nul
|
|
copy "%PACKDIR%\root.eix" "%BACKUPDIR%\" >nul 2>nul
|
|
copy "%PACKDIR%\root.epk" "%BACKUPDIR%\" >nul 2>nul
|
|
copy "%PACKDIR%\uiscript.eix" "%BACKUPDIR%\" >nul 2>nul
|
|
copy "%PACKDIR%\uiscript.epk" "%BACKUPDIR%\" >nul 2>nul
|
|
copy "%PACKDIR%\locale_de.eix" "%BACKUPDIR%\" >nul 2>nul
|
|
copy "%PACKDIR%\locale_de.epk" "%BACKUPDIR%\" >nul 2>nul
|
|
|
|
echo.
|
|
echo === Packe root ===
|
|
"%TOOLDIR%\PackMake.exe" "%ETERNEXUS%\root" "%PACKDIR%" root
|
|
if errorlevel 1 goto :error
|
|
"%TOOLDIR%\PackVerify.exe" "%PACKDIR%" root "%ETERNEXUS%\root"
|
|
if errorlevel 1 goto :error
|
|
|
|
echo.
|
|
echo === Packe uiscript ===
|
|
"%TOOLDIR%\PackMake.exe" "%ETERNEXUS%\uiscript" "%PACKDIR%" uiscript
|
|
if errorlevel 1 goto :error
|
|
"%TOOLDIR%\PackVerify.exe" "%PACKDIR%" uiscript "%ETERNEXUS%\uiscript"
|
|
if errorlevel 1 goto :error
|
|
|
|
echo.
|
|
echo === Packe locale_de ===
|
|
"%TOOLDIR%\PackMake.exe" "%ETERNEXUS%\locale_de" "%PACKDIR%" locale_de
|
|
if errorlevel 1 goto :error
|
|
"%TOOLDIR%\PackVerify.exe" "%PACKDIR%" locale_de "%ETERNEXUS%\locale_de"
|
|
if errorlevel 1 goto :error
|
|
|
|
echo.
|
|
echo === Verifiziere gegen echten Client-Lookup (alle ~103 Packs registriert) ===
|
|
"%TOOLDIR%\PackManagerSim.exe" "%PACKDIR%" --verify-all root
|
|
if errorlevel 1 goto :error
|
|
"%TOOLDIR%\PackManagerSim.exe" "%PACKDIR%" --verify-all uiscript
|
|
if errorlevel 1 goto :error
|
|
"%TOOLDIR%\PackManagerSim.exe" "%PACKDIR%" --verify-all locale_de
|
|
if errorlevel 1 goto :error
|
|
|
|
echo.
|
|
echo Raeume Nebeneffekt-Ordner auf (GetNames erzeugt beim Verifizieren leere Verzeichnisse)...
|
|
if exist "%PACKDIR%\uiscript" rmdir /s /q "%PACKDIR%\uiscript"
|
|
if exist "%PACKDIR%\locale" rmdir /s /q "%PACKDIR%\locale"
|
|
|
|
echo.
|
|
echo Fertig. Backup der vorherigen Packs liegt in %BACKUPDIR%
|
|
pause
|
|
exit /b 0
|
|
|
|
:error
|
|
echo.
|
|
echo FEHLER beim Packen/Verifizieren! Alte Dateien liegen als Backup in %BACKUPDIR%
|
|
pause
|
|
exit /b 1
|