cfgdeploy and ignore RnR universally

This commit is contained in:
2025-12-26 18:12:46 -07:00
parent aad97c9c7a
commit 1ac9891a72
16 changed files with 1052 additions and 363 deletions

View File

@@ -2,18 +2,45 @@
setlocal EnableExtensions
set "script_dir=%~dp0"
for %%I in ("%script_dir%..\..") do set "PROJ_ROOT=%%~fI"
set "current_dir=%CD%"
set "PROJ_ROOT="
REM First, check project level (one directory up from current) - most common case
for %%I in ("%current_dir%..") do set "project_level=%%~fI"
set "project_config=%project_level%\.config\config.json"
if exist "%project_config%" (
set "PROJ_ROOT=%project_level%"
)
REM If not found at project level, search up from current working directory
if not defined PROJ_ROOT (
for /f "usebackq delims=" %%I in (`powershell -NoProfile -ExecutionPolicy Bypass -Command "Set-StrictMode -Version Latest; $dir = '%current_dir%'; $found = $null; while ($dir -and -not $found) { $configPath = Join-Path $dir '.config\config.json'; if (Test-Path -LiteralPath $configPath) { $found = $dir; break }; $parent = Split-Path -Parent $dir; if ($parent -eq $dir) { break }; $dir = $parent }; if ($found) { Write-Output $found } else { Write-Output '' }"`) do set "PROJ_ROOT=%%I"
)
REM If still not found, try searching from script location
if not defined PROJ_ROOT (
for /f "usebackq delims=" %%I in (`powershell -NoProfile -ExecutionPolicy Bypass -Command "Set-StrictMode -Version Latest; $dir = '%script_dir%'; $found = $null; while ($dir -and -not $found) { $configPath = Join-Path $dir '.config\config.json'; if (Test-Path -LiteralPath $configPath) { $found = $dir; break }; $parent = Split-Path -Parent $dir; if ($parent -eq $dir) { break }; $dir = $parent }; if ($found) { Write-Output $found } else { Write-Output '' }"`) do set "PROJ_ROOT=%%I"
)
REM Fallback: try original logic (script in 3 ProjectStructure)
if not defined PROJ_ROOT (
for %%I in ("%script_dir%..\..") do set "PROJ_ROOT=%%~fI"
)
set "CONFIG_DIR=%PROJ_ROOT%\.config"
set "CONFIG_PATH=%CONFIG_DIR%\config.json"
set "GET_STRUCT_DIR=%CONFIG_DIR%\GetStructDir.ps1"
if not exist "%CONFIG_PATH%" (
echo [ERROR] config.json not found at %CONFIG_PATH%
if defined project_config (
echo Also checked: %project_config%
)
echo Please run ConfigLoader.ps1 to deploy helper files.
exit /b 1
)
set "GET_STRUCT_DIR=%CONFIG_DIR%\GetStructDir.ps1"
if not exist "%GET_STRUCT_DIR%" (
echo [ERROR] GetStructDir.ps1 not found at %GET_STRUCT_DIR%
echo Please run ConfigLoader.ps1 to deploy helper files.

View File

@@ -2,18 +2,45 @@
setlocal EnableExtensions
set "script_dir=%~dp0"
for %%I in ("%script_dir%..\..") do set "PROJ_ROOT=%%~fI"
set "current_dir=%CD%"
set "PROJ_ROOT="
REM First, check project level (one directory up from current) - most common case
for %%I in ("%current_dir%..") do set "project_level=%%~fI"
set "project_config=%project_level%\.config\config.json"
if exist "%project_config%" (
set "PROJ_ROOT=%project_level%"
)
REM If not found at project level, search up from current working directory
if not defined PROJ_ROOT (
for /f "usebackq delims=" %%I in (`powershell -NoProfile -ExecutionPolicy Bypass -Command "Set-StrictMode -Version Latest; $dir = '%current_dir%'; $found = $null; while ($dir -and -not $found) { $configPath = Join-Path $dir '.config\config.json'; if (Test-Path -LiteralPath $configPath) { $found = $dir; break }; $parent = Split-Path -Parent $dir; if ($parent -eq $dir) { break }; $dir = $parent }; if ($found) { Write-Output $found } else { Write-Output '' }"`) do set "PROJ_ROOT=%%I"
)
REM If still not found, try searching from script location
if not defined PROJ_ROOT (
for /f "usebackq delims=" %%I in (`powershell -NoProfile -ExecutionPolicy Bypass -Command "Set-StrictMode -Version Latest; $dir = '%script_dir%'; $found = $null; while ($dir -and -not $found) { $configPath = Join-Path $dir '.config\config.json'; if (Test-Path -LiteralPath $configPath) { $found = $dir; break }; $parent = Split-Path -Parent $dir; if ($parent -eq $dir) { break }; $dir = $parent }; if ($found) { Write-Output $found } else { Write-Output '' }"`) do set "PROJ_ROOT=%%I"
)
REM Fallback: try original logic (script in 3 ProjectStructure)
if not defined PROJ_ROOT (
for %%I in ("%script_dir%..\..") do set "PROJ_ROOT=%%~fI"
)
set "CONFIG_DIR=%PROJ_ROOT%\.config"
set "CONFIG_PATH=%CONFIG_DIR%\config.json"
set "GET_STRUCT_DIR=%CONFIG_DIR%\GetStructDir.ps1"
if not exist "%CONFIG_PATH%" (
echo [ERROR] config.json not found at %CONFIG_PATH%
if defined project_config (
echo Also checked: %project_config%
)
echo Please run ConfigLoader.ps1 to deploy helper files.
exit /b 1
)
set "GET_STRUCT_DIR=%CONFIG_DIR%\GetStructDir.ps1"
if not exist "%GET_STRUCT_DIR%" (
echo [ERROR] GetStructDir.ps1 not found at %GET_STRUCT_DIR%
echo Please run ConfigLoader.ps1 to deploy helper files.

View File

@@ -2,18 +2,45 @@
setlocal EnableExtensions
set "script_dir=%~dp0"
for %%I in ("%script_dir%..\..") do set "PROJ_ROOT=%%~fI"
set "current_dir=%CD%"
set "PROJ_ROOT="
REM First, check project level (one directory up from current) - most common case
for %%I in ("%current_dir%..") do set "project_level=%%~fI"
set "project_config=%project_level%\.config\config.json"
if exist "%project_config%" (
set "PROJ_ROOT=%project_level%"
)
REM If not found at project level, search up from current working directory
if not defined PROJ_ROOT (
for /f "usebackq delims=" %%I in (`powershell -NoProfile -ExecutionPolicy Bypass -Command "Set-StrictMode -Version Latest; $dir = '%current_dir%'; $found = $null; while ($dir -and -not $found) { $configPath = Join-Path $dir '.config\config.json'; if (Test-Path -LiteralPath $configPath) { $found = $dir; break }; $parent = Split-Path -Parent $dir; if ($parent -eq $dir) { break }; $dir = $parent }; if ($found) { Write-Output $found } else { Write-Output '' }"`) do set "PROJ_ROOT=%%I"
)
REM If still not found, try searching from script location
if not defined PROJ_ROOT (
for /f "usebackq delims=" %%I in (`powershell -NoProfile -ExecutionPolicy Bypass -Command "Set-StrictMode -Version Latest; $dir = '%script_dir%'; $found = $null; while ($dir -and -not $found) { $configPath = Join-Path $dir '.config\config.json'; if (Test-Path -LiteralPath $configPath) { $found = $dir; break }; $parent = Split-Path -Parent $dir; if ($parent -eq $dir) { break }; $dir = $parent }; if ($found) { Write-Output $found } else { Write-Output '' }"`) do set "PROJ_ROOT=%%I"
)
REM Fallback: try original logic (script in 3 ProjectStructure)
if not defined PROJ_ROOT (
for %%I in ("%script_dir%..\..") do set "PROJ_ROOT=%%~fI"
)
set "CONFIG_DIR=%PROJ_ROOT%\.config"
set "CONFIG_PATH=%CONFIG_DIR%\config.json"
set "GET_STRUCT_DIR=%CONFIG_DIR%\GetStructDir.ps1"
if not exist "%CONFIG_PATH%" (
echo [ERROR] config.json not found at %CONFIG_PATH%
if defined project_config (
echo Also checked: %project_config%
)
echo Please run ConfigLoader.ps1 to deploy helper files.
exit /b 1
)
set "GET_STRUCT_DIR=%CONFIG_DIR%\GetStructDir.ps1"
if not exist "%GET_STRUCT_DIR%" (
echo [ERROR] GetStructDir.ps1 not found at %GET_STRUCT_DIR%
echo Please run ConfigLoader.ps1 to deploy helper files.

View File

@@ -2,18 +2,45 @@
setlocal EnableExtensions
set "script_dir=%~dp0"
for %%I in ("%script_dir%..\..") do set "PROJ_ROOT=%%~fI"
set "current_dir=%CD%"
set "PROJ_ROOT="
REM First, check project level (one directory up from current) - most common case
for %%I in ("%current_dir%..") do set "project_level=%%~fI"
set "project_config=%project_level%\.config\config.json"
if exist "%project_config%" (
set "PROJ_ROOT=%project_level%"
)
REM If not found at project level, search up from current working directory
if not defined PROJ_ROOT (
for /f "usebackq delims=" %%I in (`powershell -NoProfile -ExecutionPolicy Bypass -Command "Set-StrictMode -Version Latest; $dir = '%current_dir%'; $found = $null; while ($dir -and -not $found) { $configPath = Join-Path $dir '.config\config.json'; if (Test-Path -LiteralPath $configPath) { $found = $dir; break }; $parent = Split-Path -Parent $dir; if ($parent -eq $dir) { break }; $dir = $parent }; if ($found) { Write-Output $found } else { Write-Output '' }"`) do set "PROJ_ROOT=%%I"
)
REM If still not found, try searching from script location
if not defined PROJ_ROOT (
for /f "usebackq delims=" %%I in (`powershell -NoProfile -ExecutionPolicy Bypass -Command "Set-StrictMode -Version Latest; $dir = '%script_dir%'; $found = $null; while ($dir -and -not $found) { $configPath = Join-Path $dir '.config\config.json'; if (Test-Path -LiteralPath $configPath) { $found = $dir; break }; $parent = Split-Path -Parent $dir; if ($parent -eq $dir) { break }; $dir = $parent }; if ($found) { Write-Output $found } else { Write-Output '' }"`) do set "PROJ_ROOT=%%I"
)
REM Fallback: try original logic (script in 3 ProjectStructure)
if not defined PROJ_ROOT (
for %%I in ("%script_dir%..\..") do set "PROJ_ROOT=%%~fI"
)
set "CONFIG_DIR=%PROJ_ROOT%\.config"
set "CONFIG_PATH=%CONFIG_DIR%\config.json"
set "GET_STRUCT_DIR=%CONFIG_DIR%\GetStructDir.ps1"
if not exist "%CONFIG_PATH%" (
echo [ERROR] config.json not found at %CONFIG_PATH%
if defined project_config (
echo Also checked: %project_config%
)
echo Please run ConfigLoader.ps1 to deploy helper files.
exit /b 1
)
set "GET_STRUCT_DIR=%CONFIG_DIR%\GetStructDir.ps1"
if not exist "%GET_STRUCT_DIR%" (
echo [ERROR] GetStructDir.ps1 not found at %GET_STRUCT_DIR%
echo Please run ConfigLoader.ps1 to deploy helper files.

View File

@@ -2,18 +2,45 @@
setlocal EnableExtensions
set "script_dir=%~dp0"
for %%I in ("%script_dir%..\..") do set "PROJ_ROOT=%%~fI"
set "current_dir=%CD%"
set "PROJ_ROOT="
REM First, check project level (one directory up from current) - most common case
for %%I in ("%current_dir%..") do set "project_level=%%~fI"
set "project_config=%project_level%\.config\config.json"
if exist "%project_config%" (
set "PROJ_ROOT=%project_level%"
)
REM If not found at project level, search up from current working directory
if not defined PROJ_ROOT (
for /f "usebackq delims=" %%I in (`powershell -NoProfile -ExecutionPolicy Bypass -Command "Set-StrictMode -Version Latest; $dir = '%current_dir%'; $found = $null; while ($dir -and -not $found) { $configPath = Join-Path $dir '.config\config.json'; if (Test-Path -LiteralPath $configPath) { $found = $dir; break }; $parent = Split-Path -Parent $dir; if ($parent -eq $dir) { break }; $dir = $parent }; if ($found) { Write-Output $found } else { Write-Output '' }"`) do set "PROJ_ROOT=%%I"
)
REM If still not found, try searching from script location
if not defined PROJ_ROOT (
for /f "usebackq delims=" %%I in (`powershell -NoProfile -ExecutionPolicy Bypass -Command "Set-StrictMode -Version Latest; $dir = '%script_dir%'; $found = $null; while ($dir -and -not $found) { $configPath = Join-Path $dir '.config\config.json'; if (Test-Path -LiteralPath $configPath) { $found = $dir; break }; $parent = Split-Path -Parent $dir; if ($parent -eq $dir) { break }; $dir = $parent }; if ($found) { Write-Output $found } else { Write-Output '' }"`) do set "PROJ_ROOT=%%I"
)
REM Fallback: try original logic (script in 3 ProjectStructure)
if not defined PROJ_ROOT (
for %%I in ("%script_dir%..\..") do set "PROJ_ROOT=%%~fI"
)
set "CONFIG_DIR=%PROJ_ROOT%\.config"
set "CONFIG_PATH=%CONFIG_DIR%\config.json"
set "GET_STRUCT_DIR=%CONFIG_DIR%\GetStructDir.ps1"
if not exist "%CONFIG_PATH%" (
echo [ERROR] config.json not found at %CONFIG_PATH%
if defined project_config (
echo Also checked: %project_config%
)
echo Please run ConfigLoader.ps1 to deploy helper files.
exit /b 1
)
set "GET_STRUCT_DIR=%CONFIG_DIR%\GetStructDir.ps1"
if not exist "%GET_STRUCT_DIR%" (
echo [ERROR] GetStructDir.ps1 not found at %GET_STRUCT_DIR%
echo Please run ConfigLoader.ps1 to deploy helper files.

View File

@@ -2,18 +2,45 @@
setlocal EnableExtensions
set "script_dir=%~dp0"
for %%I in ("%script_dir%..\..") do set "PROJ_ROOT=%%~fI"
set "current_dir=%CD%"
set "PROJ_ROOT="
REM First, check project level (one directory up from current) - most common case
for %%I in ("%current_dir%..") do set "project_level=%%~fI"
set "project_config=%project_level%\.config\config.json"
if exist "%project_config%" (
set "PROJ_ROOT=%project_level%"
)
REM If not found at project level, search up from current working directory
if not defined PROJ_ROOT (
for /f "usebackq delims=" %%I in (`powershell -NoProfile -ExecutionPolicy Bypass -Command "Set-StrictMode -Version Latest; $dir = '%current_dir%'; $found = $null; while ($dir -and -not $found) { $configPath = Join-Path $dir '.config\config.json'; if (Test-Path -LiteralPath $configPath) { $found = $dir; break }; $parent = Split-Path -Parent $dir; if ($parent -eq $dir) { break }; $dir = $parent }; if ($found) { Write-Output $found } else { Write-Output '' }"`) do set "PROJ_ROOT=%%I"
)
REM If still not found, try searching from script location
if not defined PROJ_ROOT (
for /f "usebackq delims=" %%I in (`powershell -NoProfile -ExecutionPolicy Bypass -Command "Set-StrictMode -Version Latest; $dir = '%script_dir%'; $found = $null; while ($dir -and -not $found) { $configPath = Join-Path $dir '.config\config.json'; if (Test-Path -LiteralPath $configPath) { $found = $dir; break }; $parent = Split-Path -Parent $dir; if ($parent -eq $dir) { break }; $dir = $parent }; if ($found) { Write-Output $found } else { Write-Output '' }"`) do set "PROJ_ROOT=%%I"
)
REM Fallback: try original logic (script in 3 ProjectStructure)
if not defined PROJ_ROOT (
for %%I in ("%script_dir%..\..") do set "PROJ_ROOT=%%~fI"
)
set "CONFIG_DIR=%PROJ_ROOT%\.config"
set "CONFIG_PATH=%CONFIG_DIR%\config.json"
set "GET_STRUCT_DIR=%CONFIG_DIR%\GetStructDir.ps1"
if not exist "%CONFIG_PATH%" (
echo [ERROR] config.json not found at %CONFIG_PATH%
if defined project_config (
echo Also checked: %project_config%
)
echo Please run ConfigLoader.ps1 to deploy helper files.
exit /b 1
)
set "GET_STRUCT_DIR=%CONFIG_DIR%\GetStructDir.ps1"
if not exist "%GET_STRUCT_DIR%" (
echo [ERROR] GetStructDir.ps1 not found at %GET_STRUCT_DIR%
echo Please run ConfigLoader.ps1 to deploy helper files.

View File

@@ -21,7 +21,7 @@ if not exist "%GET_STRUCT_DIR%" (
)
for /f "usebackq delims=" %%I in (`powershell -NoProfile -ExecutionPolicy Bypass -Command ^
"Set-StrictMode -Version Latest; $structDir = & '%GET_STRUCT_DIR%' -ProjectRoot '%PROJ_ROOT%'; if (-not $structDir) { throw \"Failed to get structDir from GetStructDir.ps1\" }; $pyPath = Join-Path $structDir '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"
"Set-StrictMode -Version Latest; $structDir = & '%GET_STRUCT_DIR%' -ProjectRoot '%PROJ_ROOT%'; if (-not $structDir) { throw \"Failed to get structDir from GetStructDir.ps1\" }; $pyPath = Join-Path $structDir '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.
@@ -33,10 +33,12 @@ pushd "%PROJ_ROOT%" >nul 2>&1
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
if !ERR! NEQ 0 (
echo Failed to update render sequence archives ^(exit code !ERR!^).
exit /b !ERR!
)
popd >nul 2>&1
exit /b !ERR!
exit /b 0