-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.bat
More file actions
55 lines (49 loc) · 1.35 KB
/
Copy pathrun.bat
File metadata and controls
55 lines (49 loc) · 1.35 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
@echo off
chcp 65001 >nul
title Character Card Duplicate Finder
echo.
echo ===============================================================
echo Character Card Duplicate Finder
echo ===============================================================
echo.
REM Check if Python is available
python --version >nul 2>&1
if errorlevel 1 (
echo [ERROR] Python not found! Please install Python 3.10+ first.
echo Download from: https://www.python.org/downloads/
pause
exit /b 1
)
REM Check Python version (3.10+ required)
python -c "import sys; sys.exit(0 if sys.version_info >= (3, 10) else 1)" >nul 2>&1
if errorlevel 1 (
echo [ERROR] Python 3.10 or higher is required!
echo Your current version:
python --version
echo Download from: https://www.python.org/downloads/
pause
exit /b 1
)
REM Check if all dependencies are installed
python -c "import PyQt5, PIL, Levenshtein" >nul 2>&1
if errorlevel 1 (
echo [INFO] Dependencies not found. Installing...
echo.
pip install -r requirements.txt
if errorlevel 1 (
echo.
echo [ERROR] Failed to install dependencies!
pause
exit /b 1
)
echo.
echo [OK] Dependencies installed successfully!
echo.
)
REM Run the application with error output
echo [INFO] Starting application...
echo.
python main.py 2>&1
REM Always pause at the end
echo.
pause