-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.bat
More file actions
51 lines (43 loc) · 1.2 KB
/
run.bat
File metadata and controls
51 lines (43 loc) · 1.2 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
SETLOCAL EnableDelayedExpansion
:: --- Configuration ---
SET "VENV_DIR=.venv"
SET "SCRIPT_NAME=main.py"
echo Checking environment...
:: 1. Create Virtual Environment if it doesn't exist
if not exist "%VENV_DIR%" (
echo Creating virtual environment in %VENV_DIR%...
py -m venv %VENV_DIR%
if !errorlevel! neq 0 (
echo Error: Failed to create virtual environment.
pause
exit /b
)
)
:: 2. Activate venv and check/install vrchatapi
echo Activating environment...
call "%VENV_DIR%\Scripts\activate"
:: We check if packages are installed by trying to show its info
pip show vrchatapi >nul 2>&1
if %errorlevel% neq 0 (
echo vrchatapi not found. Installing...
py -m pip install vrchatapi
) else (
echo vrchatapi is already installed.
)
pip show icalendar >nul 2>&1
if %errorlevel% neq 0 (
echo icalendar not found. Installing...
py -m pip install icalendar
) else (
echo icalendar is already installed.
)
:: 3. Run the script
echo.
echo Starting Tummy Funny Scripts...
echo ---------------------------------
python "%SCRIPT_NAME%"
:: Keep window open if the script crashes or finishes
echo.
echo ---------------------------------
echo Script finished.