43 lines
985 B
Batchfile
43 lines
985 B
Batchfile
@echo off
|
|
REM Batch file to build Windows executable
|
|
|
|
echo ========================================
|
|
echo Building Windows Executable
|
|
echo ========================================
|
|
echo.
|
|
|
|
REM Check if virtual environment exists
|
|
if not exist "venv\Scripts\activate.bat" (
|
|
echo Creating virtual environment...
|
|
python -m venv venv
|
|
call venv\Scripts\activate.bat
|
|
echo Installing requirements...
|
|
pip install -r requirements.txt
|
|
) else (
|
|
call venv\Scripts\activate.bat
|
|
)
|
|
|
|
REM Install PyInstaller if not present
|
|
python -c "import pyinstaller" 2>nul
|
|
if errorlevel 1 (
|
|
echo Installing PyInstaller...
|
|
pip install pyinstaller
|
|
)
|
|
|
|
echo.
|
|
echo Building executable with PyInstaller...
|
|
echo This may take a few minutes...
|
|
echo.
|
|
|
|
REM Build the executable
|
|
python build_windows.py
|
|
|
|
echo.
|
|
echo ========================================
|
|
echo Build process completed!
|
|
echo.
|
|
echo Executable location: dist\DatabaseApp.exe
|
|
echo ========================================
|
|
echo.
|
|
pause
|