-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathRun_VSR_Pro.bat
More file actions
69 lines (61 loc) · 2.25 KB
/
Copy pathRun_VSR_Pro.bat
File metadata and controls
69 lines (61 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
@echo off
setlocal EnableDelayedExpansion
title Video Subtitle Remover Pro
:: Change to script directory
cd /d "%~dp0"
set "VSR_SETUP_REPAIR=0"
if not exist "venv\Scripts\python.exe" (
set "VSR_SETUP_REPAIR=1"
) else (
"venv\Scripts\python.exe" -c "import cv2, PIL, numpy" >nul 2>nul
if errorlevel 1 set "VSR_SETUP_REPAIR=1"
)
if "%VSR_SETUP_REPAIR%"=="1" (
echo.
echo ============================================================
echo VIDEO SUBTITLE REMOVER PRO
echo ============================================================
echo.
echo Runtime setup or repair required.
echo Preparing the runtime and dependencies without prompts...
echo.
python -c "import sys; raise SystemExit(0 if sys.version_info[:2] >= (3, 14) else 1)" >nul 2>nul
if not errorlevel 1 (
echo WARNING: Python 3.14+ cannot install Windows CUDA PyTorch wheels.
echo Use Python 3.12 or 3.13 for NVIDIA GPU acceleration.
echo Set VSR_ALLOW_PY314_CPU=1 before launch only for CPU-only setup.
echo.
)
set "VSR_SETUP_PROGRESS_FILE=%TEMP%\vsr-pro-setup-!RANDOM!-!RANDOM!.status"
>"!VSR_SETUP_PROGRESS_FILE!" echo RUNNING^|Preparing the local runtime...^|2
where pythonw.exe >nul 2>nul
if not errorlevel 1 (
start "" /b pythonw.exe "scripts\setup_splash.py" --progress-file "!VSR_SETUP_PROGRESS_FILE!"
)
python setup.py --repair
if errorlevel 1 (
>"!VSR_SETUP_PROGRESS_FILE!" echo ERROR^|Setup failed. Review the console details.^|100
echo.
echo Setup did not complete. Review the messages above, then try again.
pause
del /q "!VSR_SETUP_PROGRESS_FILE!" >nul 2>nul
exit /b 1
)
timeout /t 1 /nobreak >nul
del /q "!VSR_SETUP_PROGRESS_FILE!" >nul 2>nul
set "VSR_SETUP_PROGRESS_FILE="
)
echo Launching Video Subtitle Remover Pro...
if exist "venv\Scripts\pythonw.exe" (
start "" "venv\Scripts\pythonw.exe" "VideoSubtitleRemover.py"
exit /b 0
)
if exist "venv\Scripts\python.exe" (
start "" "venv\Scripts\python.exe" "VideoSubtitleRemover.py"
exit /b 0
)
echo.
echo The Python runtime could not be found in the virtual environment.
echo Re-run setup.py to repair the installation.
pause
exit /b 1