2025-08-08 13:33:08 -06:00
|
|
|
@echo off
|
2025-11-08 02:36:20 -07:00
|
|
|
setlocal EnableExtensions
|
|
|
|
|
|
|
|
|
|
set "SCRIPT_DIR=%~dp0"
|
|
|
|
|
set "CONFIG_LOADER=%SCRIPT_DIR%ConfigLoader.ps1"
|
|
|
|
|
set "CONFIG_PATH=%SCRIPT_DIR%config.json"
|
|
|
|
|
|
|
|
|
|
if not exist "%CONFIG_LOADER%" (
|
|
|
|
|
echo [ERROR] ConfigLoader.ps1 not found next to NewProject.bat.
|
|
|
|
|
exit /b 1
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if not exist "%CONFIG_PATH%" (
|
|
|
|
|
echo [ERROR] config.json not found next to NewProject.bat.
|
|
|
|
|
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; Write-Output (Get-StructDirectory)"`) do set "STRUCT_DIR=%%I"
|
|
|
|
|
|
|
|
|
|
if not defined STRUCT_DIR (
|
|
|
|
|
echo [ERROR] Unable to resolve ProjectStructure directory from config.
|
|
|
|
|
exit /b 1
|
|
|
|
|
)
|
2025-08-08 13:33:08 -06:00
|
|
|
|
2025-08-17 14:22:09 -06:00
|
|
|
:: Get current date in YYYY-MM-DD format
|
2025-08-08 13:33:08 -06:00
|
|
|
for /f "tokens=2-4 delims=/ " %%a in ('date /t') do (
|
|
|
|
|
set mm=%%a
|
|
|
|
|
set dd=%%b
|
|
|
|
|
set yy=%%c
|
|
|
|
|
)
|
2025-08-17 14:22:09 -06:00
|
|
|
set yyyy=20%yy:~-2%
|
2025-10-30 11:29:58 -06:00
|
|
|
set yymmdd=%yy:~-2%%mm%%dd%
|
2025-08-08 13:33:08 -06:00
|
|
|
|
|
|
|
|
:: Ask for project name
|
|
|
|
|
set /p projectName="Enter project name (press Enter for default 'NewProject'): "
|
|
|
|
|
if "%projectName%"=="" set projectName=NewProject
|
2025-10-30 11:29:58 -06:00
|
|
|
set projectRoot=%yymmdd%_%projectName%
|
2025-08-08 13:33:08 -06:00
|
|
|
|
|
|
|
|
:: Create main project directory
|
|
|
|
|
mkdir "%projectRoot%"
|
|
|
|
|
|
|
|
|
|
:: Create Assets structure
|
|
|
|
|
mkdir "%projectRoot%\Assets\ElevenLabs"
|
2025-11-08 02:36:20 -07:00
|
|
|
if exist "%STRUCT_DIR%\NewDaily.bat" copy /Y "%STRUCT_DIR%\NewDaily.bat" "%projectRoot%\Assets\ElevenLabs\NewDaily.bat" >nul
|
2025-08-08 13:33:08 -06:00
|
|
|
mkdir "%projectRoot%\Assets\Blends"
|
2025-09-17 09:42:32 -06:00
|
|
|
mkdir "%projectRoot%\Assets\Mocap"
|
2025-08-08 13:33:08 -06:00
|
|
|
mkdir "%projectRoot%\Assets\VO"
|
2025-09-16 22:11:55 -06:00
|
|
|
if exist "%~dp0NewDaily.bat" copy /Y "%~dp0NewDaily.bat" "%projectRoot%\Assets\VO\NewDaily.bat" >nul
|
2025-08-08 13:33:08 -06:00
|
|
|
|
|
|
|
|
:: Create Blends structure
|
2025-09-04 11:38:15 -06:00
|
|
|
mkdir "%projectRoot%\Blends\animations\"
|
2025-08-08 13:33:08 -06:00
|
|
|
mkdir "%projectRoot%\Blends\stills\img-BG"
|
|
|
|
|
|
|
|
|
|
:: Create Deliverable structure
|
|
|
|
|
mkdir "%projectRoot%\Deliverable\"
|
|
|
|
|
|
|
|
|
|
:: Create Pr structure
|
|
|
|
|
mkdir "%projectRoot%\Pr\RnR\RIFE"
|
|
|
|
|
|
2025-08-08 16:48:08 -06:00
|
|
|
:: Add project root additions
|
|
|
|
|
if not exist "%projectRoot%\Renders" mkdir "%projectRoot%\Renders"
|
|
|
|
|
|
2025-08-08 16:54:18 -06:00
|
|
|
:: Place helper scripts into Renders
|
2025-11-08 02:36:20 -07:00
|
|
|
set "templateRoot=%STRUCT_DIR%"
|
|
|
|
|
for %%F in (UpdateSequences.bat ZipSeqArchv.bat UnzipSeqArchv.bat ConfigLoader.ps1 config.json) do (
|
|
|
|
|
if exist "%templateRoot%\%%F" copy /Y "%templateRoot%\%%F" "%projectRoot%\Renders\%%F" >nul
|
|
|
|
|
)
|
2025-08-08 16:54:18 -06:00
|
|
|
|
2025-08-08 16:48:08 -06:00
|
|
|
:: Use repo-provided templates for git config files
|
2025-08-17 14:27:16 -06:00
|
|
|
if exist "%~dp0components\gitignore" copy /Y "%~dp0components\gitignore" "%projectRoot%\.gitignore" >nul
|
|
|
|
|
if exist "%~dp0components\gitattributes" copy /Y "%~dp0components\gitattributes" "%projectRoot%\.gitattributes" >nul
|
2025-08-08 16:48:08 -06:00
|
|
|
|
|
|
|
|
:: Initialize git and install Git LFS
|
|
|
|
|
pushd "%projectRoot%" >nul
|
|
|
|
|
git init
|
|
|
|
|
git lfs install
|
2025-08-20 14:40:49 -06:00
|
|
|
git add . -v
|
|
|
|
|
git commit -m "init"
|
2025-08-08 16:48:08 -06:00
|
|
|
popd >nul
|
2025-08-08 13:33:08 -06:00
|
|
|
|
|
|
|
|
echo Project structure created successfully in folder: %projectRoot%
|
|
|
|
|
pause
|