-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_exe.bat
More file actions
50 lines (37 loc) · 1.31 KB
/
Copy pathbuild_exe.bat
File metadata and controls
50 lines (37 loc) · 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
@echo off
REM Build script for Git Repository Manager executable
REM Creates virtual environment (if missing), installs dependencies, and builds the exe.
setlocal ENABLEDELAYEDEXPANSION
set VENV_DIR=venv
set APP_MAIN=git_repository_manager.py
set EXE_NAME=GitRepositoryManager
set PYINSTALLER_VERSION=5.13.2
if not exist %VENV_DIR% (
echo Creating virtual environment...
py -3 -m venv %VENV_DIR%
)
call %VENV_DIR%\Scripts\activate.bat
python -m pip install --upgrade pip >nul
REM Install runtime dependencies
python -m pip install -r requirements.txt
REM Ensure specific PyInstaller version (can be adjusted)
python -m pip install pyinstaller
echo.
echo Building (directory mode for easier persistence of app_data.json)...
REM pyinstaller --noconfirm --clean --name %EXE_NAME% --windowed --add-data "app_data.json;." %APP_MAIN%
IF %ERRORLEVEL% NEQ 0 (
echo Build failed.
goto :end
)
echo.
echo Optional: build single-file executable (slower startup) - uncomment below if desired
pyinstaller --noconfirm --clean --onefile --name %EXE_NAME% --windowed %APP_MAIN%
echo.
echo Build complete.
echo Directory build: dist\%EXE_NAME%\%EXE_NAME%.exe
REM echo One-file build (if enabled): dist\%EXE_NAME%.exe
echo.
echo To run:
echo dist\%EXE_NAME%\%EXE_NAME%.exe
:end
pause