-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathRun_VSR_Pro.bat
More file actions
58 lines (50 loc) · 1.65 KB
/
Copy pathRun_VSR_Pro.bat
File metadata and controls
58 lines (50 loc) · 1.65 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
@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.
)
python setup.py --repair
if errorlevel 1 (
echo.
echo Setup did not complete. Review the messages above, then try again.
pause
exit /b 1
)
)
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