-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
66 lines (56 loc) Β· 1.86 KB
/
build.bat
File metadata and controls
66 lines (56 loc) Β· 1.86 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
@echo off
REM Enable UTF-8 encoding for emojis
chcp 65001 > nul
echo π VRCNotify Builder V1.0.1 π
REM Automatically detect venv path in the current directory
echo π Searching for a virtual environment...
set VENV_PATH=
for /d %%d in (*) do (
if exist "%%d\Scripts\activate.bat" (
set VENV_PATH=%%d
echo β
Virtual environment found: %%d π
goto :found
)
)
REM If no venv is found, create one
echo β No virtual environment found. Creating a new one... π οΈ
set VENV_PATH=venv
python -m venv %VENV_PATH%
if errorlevel 1 (
echo β Failed to create virtual environment. Please check your Python installation. π’
pause
exit /b
)
echo β
Virtual environment created successfully! π
:found
REM Activate the virtual environment
echo π Activating the virtual environment...
call "%VENV_PATH%\Scripts\activate.bat"
REM Install required packages
if exist requirements.txt (
echo π¦ Installing required packages from requirements.txt...
pip install -r requirements.txt
if errorlevel 1 (
echo β Failed to install packages. Please check your requirements.txt. π’
deactivate
pause
exit /b
)
echo β
All packages installed successfully! π
) else (
echo β οΈ No requirements.txt found. Skipping package installation.
)
REM Run the eel command
echo π Building VRCNotify with eel...
python -m eel --onefile --add-data="%VENV_PATH%\Lib\site-packages\pyfiglet;./pyfiglet" --hiddenimport=_ssl --icon=img/icon.ico --noconsole --name=VRCNotify --splash=img/splash.png ./app.py web
if errorlevel 1 (
echo β Build failed. Please check for errors in your script. π’
deactivate
pause
exit /b
)
REM Deactivate the virtual environment
echo π Deactivating the virtual environment...
deactivate
echo π Build completed successfully! Youβre all set! π
pause