-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathinstaller.bat
More file actions
68 lines (61 loc) · 1.79 KB
/
Copy pathinstaller.bat
File metadata and controls
68 lines (61 loc) · 1.79 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
@echo off
echo ================================
echo TV Launcher - Installer
echo ================================
echo.
:: Checking if Python is installed
python --version >nul 2>&1
if errorlevel 1 (
echo [ERROR] Python not found!
echo Please install Python 3.10 or higher from https://www.python.org
echo Make sure to check "Add Python to PATH" during installation.
pause
exit /b 1
)
:: Checking minimum Python version (3.10)
python -c "import sys; exit(0) if sys.version_info >= (3,10) else exit(1)" >nul 2>&1
if errorlevel 1 (
echo [ERROR] Python version too old!
for /f "tokens=*" %%i in ('python --version') do echo Detected: %%i
echo Required: Python 3.10 or higher
echo Please update Python from https://www.python.org
pause
exit /b 1
)
:: Shows the version found
for /f "tokens=*" %%i in ('python --version') do echo [OK] Found %%i
:: Crea virtual environment
echo.
echo Creating virtual environment...
python -m venv venv
if errorlevel 1 (
echo [ERROR] Failed to create virtual environment.
pause
exit /b 1
)
echo [OK] Virtual environment created.
:: Activate Virtual Environment
call venv\Scripts\activate
if errorlevel 1 (
echo [ERROR] Failed to activate virtual environment.
pause
exit /b 1
)
echo [OK] Virtual environment activated.
:: Install Dependencies
echo.
echo Installing dependencies...
pip install -r requirements.txt
if errorlevel 1 (
echo [ERROR] Failed to install dependencies.
echo Check your internet connection and try again.
pause
exit /b 1
)
echo [OK] Dependencies installed.
echo.
echo ================================
echo Installation complete!
echo Use TVLauncher.bat to start the launcher.
echo ================================
pause