alpha v0.950
This commit is contained in:
48
build_app_windows.bat
Normal file
48
build_app_windows.bat
Normal file
@@ -0,0 +1,48 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
cd /d "%~dp0"
|
||||
set "SPEC_FILE=app_windows_onefile.spec"
|
||||
set "OUTPUT_EXE=dist\inventory_app.exe"
|
||||
set "ICON_FILE=picture\ICON\mainICO.ico"
|
||||
set "REQUIREMENTS_FILE=requirements.txt"
|
||||
|
||||
if not exist "%SPEC_FILE%" (
|
||||
echo Spec file not found: %SPEC_FILE%
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if not exist "%ICON_FILE%" (
|
||||
echo Icon file not found: %ICON_FILE%
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if not exist "%REQUIREMENTS_FILE%" (
|
||||
echo Requirements file not found: %REQUIREMENTS_FILE%
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo Installing application and build dependencies...
|
||||
py -m pip install --upgrade pip
|
||||
if errorlevel 1 (
|
||||
echo Failed to upgrade pip.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
py -m pip install -r "%REQUIREMENTS_FILE%" pyinstaller
|
||||
if errorlevel 1 (
|
||||
echo Failed to install dependencies.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo Building inventory_app.exe from %SPEC_FILE%...
|
||||
py -m PyInstaller --clean --noconfirm "%SPEC_FILE%"
|
||||
if errorlevel 1 (
|
||||
echo Build failed.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo.
|
||||
echo Done.
|
||||
echo EXE path: %~dp0%OUTPUT_EXE%
|
||||
exit /b 0
|
||||
Reference in New Issue
Block a user