-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart_windows.bat
50 lines (40 loc) · 1.29 KB
/
start_windows.bat
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
@echo off
REM Check if Python 3.12 is installed
python --version | find "3.12" >nul
if errorlevel 1 (
echo Python 3.12 is not installed or not in PATH.
echo Please install Python 3.12 and try again.
pause
exit /b
)
REM Check if the virtual environment already exists
if not exist "venv\Scripts\activate.bat" (
REM Create the virtual environment
echo Creating Python 3.12 virtual environment...
python -m venv venv
REM Activate the virtual environment
call venv\Scripts\activate
REM Upgrade pip to the latest version
echo Upgrading pip...
python -m pip install --upgrade pip
REM Install required packages
echo Installing required packages...
pip install customtkinter keyring pillow requests
REM Deactivate the virtual environment
echo Deactivating the virtual environment after setup...
python gimmich.py
deactivate
) else (
echo Virtual environment already exists. Skipping setup...
)
REM Activate the virtual environment
echo Activating the virtual environment...
call venv\Scripts\activate
REM Run the Python program
echo Running gimmich.py...
python gimmich.py
REM Deactivate the virtual environment after running the program
echo Deactivating the virtual environment...
deactivate
echo Setup and execution complete!
pause