-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
43 lines (35 loc) · 1.09 KB
/
Copy pathbuild.bat
File metadata and controls
43 lines (35 loc) · 1.09 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
@echo off
:: Check if conda is available
where conda >nul 2>&1
if %errorlevel% neq 0 (
echo "Conda is not installed or not in the PATH. Please install Conda and try again."
exit /b 1
)
:: Activate the Anaconda environment
CALL conda activate stemlight
:: Check if the environment activation was successful
if %errorlevel% neq 0 (
echo "Failed to activate the Conda environment 'stemlight'. Please ensure it exists and try again."
exit /b 1
)
:: Build with PyInstaller
pyinstaller ^
--add-data "src/images/*;src/images" ^
--add-data "src/assets/*;src/assets" ^
--icon="src/assets/icon.ico" ^
--name "Stemlight for Windows" ^
--windowed ^
Main_Menu.py
:: Check if PyInstaller was successful
if %errorlevel% neq 0 (
echo "PyInstaller build failed. Exiting."
exit /b 1
)
:: Compress the output folder
powershell Compress-Archive -Path 'dist\\Stemlight for Windows\\*' -Force -DestinationPath 'Stemlight for Windows.zip'
:: Check if compression was successful
if %errorlevel% neq 0 (
echo "Compression failed. Exiting."
exit /b 1
)
echo "Build and compression completed successfully."