forked from WEIFENG2333/VideoCaptioner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.bat
More file actions
46 lines (39 loc) · 961 Bytes
/
run.bat
File metadata and controls
46 lines (39 loc) · 961 Bytes
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
@echo off
:: VideoCaptioner Launcher for Windows
:: Check Python installation
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo Error: Python not found. Please install Python 3.8+
echo Download from: https://www.python.org/downloads/
pause
exit /b 1
)
:: Check if main.py exists
if not exist "main.py" (
echo Error: main.py not found. Please run from project root.
pause
exit /b 1
)
:: Create virtual environment if not exists
if not exist "venv" (
echo Creating virtual environment...
python -m venv venv
)
:: Activate virtual environment
call venv\Scripts\activate.bat
:: Check and install dependencies
python -c "import PyQt5" >nul 2>&1
if %errorlevel% neq 0 (
echo Installing dependencies...
pip install -r requirements.txt
)
::
Run the application
echo Starting VideoCaptioner...
python main.py
:: Pause on error
if %errorlevel% neq 0 (
echo.
echo Application exited with error.
pause
)