| @echo off
|
|
|
|
|
|
|
| setlocal EnableDelayedExpansion
|
| chcp 65001 >nul 2>&1
|
| |
|
|
|
|
| pushd "%~dp0.."
|
| |
|
|
| set PYTHONNOUSERSITE=1
|
| set PYTHONPATH=
|
|
|
| echo.
|
| echo ========================================================
|
| echo AutoMosaRakku Triton Cache Prebuild Tool
|
| echo ========================================================
|
| echo.
|
| echo This tool creates Triton cache for object removal feature.
|
| echo Prevents long processing time and timeouts on first use.
|
| echo.
|
| echo Note: This process may take several minutes.
|
| echo.
|
|
|
| if not defined AUTOPILOT pause
|
|
|
| echo.
|
| echo [START] Starting Triton cache creation...
|
| echo.
|
| |
|
|
| echo [CONFIG] Setting up MSVC environment...
|
| if exist "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" (
|
| call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" >nul 2>&1
|
| echo [OK] MSVC Build Tools environment configured
|
| ) else if exist "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" (
|
| call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" >nul 2>&1
|
| echo [OK] MSVC Community environment configured
|
| ) else (
|
| echo [WARNING] MSVC not found. Please run Setup.bat first.
|
| )
|
| |
|
|
| echo.
|
| echo [EXEC] Running encrypted environment cache creation...
|
| echo Current directory: %CD%
|
| python_base\python.exe runtime\secure_launcher_v2.py --cache-only
|
| |
|
|
| if %errorlevel% equ 0 (
|
| echo.
|
| echo ========================================================
|
| echo [SUCCESS] Triton cache creation completed
|
| echo ========================================================
|
| echo.
|
| echo Object removal processing will be faster next time.
|
| echo Start the application and try the object removal feature.
|
| echo.
|
| ) else (
|
| echo.
|
| echo ========================================================
|
| echo [FAILED] Triton cache creation failed
|
| echo ========================================================
|
| echo.
|
| echo Troubleshooting:
|
| echo 1. Make sure Setup.bat has been executed and completed
|
| echo 2. Ensure NVIDIA GPU drivers are up to date
|
| echo 3. Run this batch file with administrator privileges
|
| echo.
|
| )
|
|
|
| echo Cache directory check:
|
| if exist "%USERPROFILE%\.triton\cache" (
|
| echo [OK] %USERPROFILE%\.triton\cache
|
| dir "%USERPROFILE%\.triton\cache" /b | find /c /v "" > nul
|
| if not errorlevel 1 (
|
| for /f %%i in ('dir "%USERPROFILE%\.triton\cache" /b ^| find /c /v ""') do echo Cache files count: %%i
|
| )
|
| ) else (
|
| echo [INFO] Triton cache directory was not created
|
| )
|
|
|
| echo.
|
| if not defined AUTOPILOT (
|
| echo Batch execution completed. Press any key to exit...
|
| pause >nul
|
| )
|
| |
|
|
| popd |