-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.bat
More file actions
51 lines (45 loc) · 1.15 KB
/
run.bat
File metadata and controls
51 lines (45 loc) · 1.15 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
@echo off
title NotPixel
:run_bot
if not exist venv (
echo Creating virtual environment...
python -m venv venv
)
echo Activating virtual environment...
call venv\Scripts\activate
if not exist venv\Lib\site-packages\installed (
if exist requirements.txt (
echo Installing wheel for faster installation...
pip install wheel
echo Installing dependencies...
pip install -r requirements.txt
echo. > venv\Lib\site-packages\installed
) else (
echo requirements.txt not found, skipping dependency installation.
)
) else (
echo Dependencies already installed, skipping installation.
)
if not exist .env (
echo Copying configuration file...
copy .env-example .env
) else (
echo .env file already exists, skipping copy.
)
:menu
echo -----------------------------------------
echo 1. Run Bot
echo 2. Exit
echo -----------------------------------------
set /p choice="Please select an option (1, 2): "
if "%choice%"=="1" (
echo Starting the bot...
python main.py
pause
goto menu
) else if "%choice%"=="2" (
exit
) else (
echo Invalid option. Please try again.
goto menu
)