Beta_cartrigesg_bd Beta v0.13

This commit is contained in:
2026-08-05 17:33:13 +03:00
parent 15d5e780ee
commit 532b327e1a
4 changed files with 99 additions and 12 deletions

View File

@@ -3,7 +3,8 @@ setlocal
cd /d "%~dp0"
set "SPEC_FILE=client_agent_v2_windows_onefile.spec"
set "CLIENT_EXE=dist\Inv_web Client.exe"
set "CLIENT_DIR=dist\Inv_web Client"
set "CLIENT_EXE=%CLIENT_DIR%\Inv_web Client.exe"
set "INSTALLER_SCRIPT=client_agent_v2_installer.iss"
set "RUSTDESK_INSTALLER=installer\prerequisites\rustdesk.exe"
set "ISCC=%ProgramFiles(x86)%\Inno Setup 6\ISCC.exe"
@@ -55,9 +56,33 @@ if not exist "%ISCC%" (
echo Inno Setup compiler: %ISCC%
echo Installing Python build dependencies...
py -m pip install --upgrade pyinstaller pystray pillow
py -m pip install --upgrade "pyinstaller>=6.18" pystray pillow
if errorlevel 1 exit /b 1
set "PYTHON_BASE="
for /f "delims=" %%I in ('py -c "import sys; print(sys.base_prefix)"') do set "PYTHON_BASE=%%I"
if not defined PYTHON_BASE (
echo Could not determine the Python installation directory.
exit /b 1
)
set "TCL_LIBRARY="
for /d %%D in ("%PYTHON_BASE%\tcl\tcl*") do if exist "%%~fD\init.tcl" set "TCL_LIBRARY=%%~fD"
set "TK_LIBRARY="
for /d %%D in ("%PYTHON_BASE%\tcl\tk*") do if exist "%%~fD\tk.tcl" set "TK_LIBRARY=%%~fD"
if not defined TCL_LIBRARY (
echo Tcl runtime was not found under: %PYTHON_BASE%\tcl
exit /b 1
)
if not defined TK_LIBRARY (
echo Tk runtime was not found under: %PYTHON_BASE%\tcl
exit /b 1
)
echo Tcl runtime: %TCL_LIBRARY%
echo Tk runtime: %TK_LIBRARY%
echo Building client executable...
py -m PyInstaller --clean --noconfirm "%SPEC_FILE%"
if errorlevel 1 exit /b 1
@@ -67,6 +92,23 @@ if not exist "%CLIENT_EXE%" (
exit /b 1
)
if not exist "%CLIENT_DIR%\_internal\_tcl_data\init.tcl" (
echo Tcl data was not included in the client build.
exit /b 1
)
if not exist "%CLIENT_DIR%\_internal\_tk_data\tk.tcl" (
echo Tk data was not included in the client build.
exit /b 1
)
echo Testing the packaged client runtime...
start "" /wait "%CLIENT_EXE%" --help
if errorlevel 1 (
echo The packaged client failed its startup test.
exit /b 1
)
echo Building Windows installer...
"%ISCC%" "%INSTALLER_SCRIPT%"
if errorlevel 1 exit /b 1