Files
Inv_web/build_client_agent_windows.bat
2026-03-19 23:27:22 +03:00

37 lines
747 B
Batchfile

@echo off
setlocal
cd /d "%~dp0"
set "SPEC_FILE=client_agent_windows_onefile.spec"
set "OUTPUT_EXE=dist\inventory_client_agent.exe"
set "ICON_FILE=picture\ICON\clientICO.ico"
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
)
echo Installing build dependencies...
py -m pip install --upgrade pip pyinstaller pystray pillow
if errorlevel 1 (
echo Failed to install build dependencies.
exit /b 1
)
echo Building inventory_client_agent.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