-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.bat
41 lines (34 loc) · 962 Bytes
/
setup.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
@echo off
setlocal enabledelayedexpansion
:: Prompt the user for the path to Python executable
set /p PYTHON_PATH="Enter the path to your Python 3.12 executable: "
if not exist "!PYTHON_PATH!" (
echo Python executable not found at specified path.
exit /b 1
)
:: Set the virtual environment name
set VENV_NAME=.venv
:: Check if the virtual environment already exists
if exist %VENV_NAME% (
echo Virtual environment already exists.
) else (
:: Create the virtual environment
!PYTHON_PATH! -m venv %VENV_NAME%
if !errorlevel! neq 0 (
echo Failed to create virtual environment.
exit /b 1
)
echo Virtual environment created.
)
:: Activate the virtual environment
call %VENV_NAME%\Scripts\activate
if !errorlevel! neq 0 (
echo Failed to activate virtual environment.
exit /b 1
)
:: Install PyQt5 using pip
pip install -r requirements.txt
:: Deactivate the virtual environment
deactivate
:: Exit
exit /b 0