2025-11-06 10:10:29 -07:00
|
|
|
@echo off
|
2025-11-08 02:36:20 -07:00
|
|
|
setlocal EnableExtensions
|
2025-11-06 10:10:29 -07:00
|
|
|
|
2025-11-06 11:02:59 -07:00
|
|
|
set "REN_DIR=%~dp0"
|
|
|
|
|
for %%I in ("%REN_DIR%..") do set "PROJ_ROOT=%%~fI"
|
2025-11-06 10:10:29 -07:00
|
|
|
|
2025-11-08 02:36:20 -07:00
|
|
|
set "CONFIG_LOADER=%REN_DIR%ConfigLoader.ps1"
|
|
|
|
|
set "CONFIG_PATH=%REN_DIR%config.json"
|
|
|
|
|
|
|
|
|
|
if not exist "%CONFIG_LOADER%" (
|
|
|
|
|
echo [ERROR] ConfigLoader.ps1 not found next to ZipSeqArchv.bat.
|
2025-11-10 10:16:23 -07:00
|
|
|
echo Please run UpdateProjectBatches.ps1 to refresh helper files.
|
2025-11-08 02:36:20 -07:00
|
|
|
exit /b 1
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if not exist "%CONFIG_PATH%" (
|
|
|
|
|
echo [ERROR] config.json not found next to ZipSeqArchv.bat.
|
2025-11-10 10:16:23 -07:00
|
|
|
echo Please run UpdateProjectBatches.ps1 to refresh helper files.
|
2025-11-08 02:36:20 -07:00
|
|
|
exit /b 1
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
for /f "usebackq delims=" %%I in (`powershell -NoProfile -ExecutionPolicy Bypass -Command ^
|
|
|
|
|
"Set-StrictMode -Version Latest; $loader = Resolve-Path -LiteralPath '%CONFIG_LOADER%' -ErrorAction Stop; . $loader.Path; $pyPath = Join-Path (Get-StructDirectory) 'zip_sequences.py'; if (-not (Test-Path -LiteralPath $pyPath)) { throw \"zip_sequences.py not found at $pyPath\" }; Write-Output $pyPath"`) do set "PY_SCRIPT=%%I"
|
|
|
|
|
|
|
|
|
|
if not defined PY_SCRIPT (
|
|
|
|
|
echo [ERROR] Unable to resolve zip_sequences.py path from config.
|
2025-11-06 10:10:29 -07:00
|
|
|
exit /b 1
|
|
|
|
|
)
|
|
|
|
|
|
2025-11-06 11:02:59 -07:00
|
|
|
pushd "%PROJ_ROOT%" >nul 2>&1
|
|
|
|
|
|
2025-11-06 10:10:29 -07:00
|
|
|
python "%PY_SCRIPT%" --verbose %*
|
|
|
|
|
set "ERR=%ERRORLEVEL%"
|
|
|
|
|
|
|
|
|
|
if not "%ERR%"=="0" (
|
|
|
|
|
echo Failed to update render sequence archives (exit code %ERR%).
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
popd >nul 2>&1
|
|
|
|
|
exit /b %ERR%
|
|
|
|
|
|