build_windows.bat
1.31 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
REM Windows Build Script for Gemini Image Generator
echo ================================
echo Building Gemini Image Generator
echo ================================
REM Check if virtual environment exists
if not exist ".venv" (
echo Creating virtual environment...
python -m venv .venv
)
REM Activate virtual environment
echo Activating virtual environment...
call .venv\Scripts\activate.bat
REM Install dependencies
echo Installing dependencies...
pip install --upgrade pip
pip install -r requirements.txt
REM Clean previous builds
echo Cleaning previous builds...
if exist "build" rd /s /q build
if exist "dist" rd /s /q dist
if exist "*.spec" del /q *.spec
REM Build executable
echo Building executable...
pyinstaller --name="ZB100ImageGenerator" ^
--onedir ^
--windowed ^
--icon=zb100_windows.ico ^
--add-data "config.json;." ^
--add-data "zb100_windows.ico;." ^
image_generator.py
REM Check if build was successful
if exist "dist\ZB100ImageGenerator\ZB100ImageGenerator.exe" (
echo ================================
echo Build successful!
echo Executable: dist\ZB100ImageGenerator\ZB100ImageGenerator.exe
echo ================================
) else (
echo ================================
echo Build failed!
echo ================================
)
pause