Beta_cartrigesg_bd Beta v0.2
This commit is contained in:
@@ -6,40 +6,39 @@ cd /d "%~dp0"
|
||||
set "APP_SPEC=Inventera_windows.spec"
|
||||
set "APP_EXE=dist\Inventera.Server.exe"
|
||||
set "INSTALLER_SCRIPT=Inventera.iss"
|
||||
set "POSTGRES_INSTALLER=installer\prerequisites\postgresql-18-windows-x64.exe"
|
||||
set "POSTGRES_DOWNLOAD_SCRIPT=installer\download_postgresql.ps1"
|
||||
set "POSTGRES_INSTALLER=installer\prerequisites\postgesql.exe"
|
||||
|
||||
if not exist "%POSTGRES_INSTALLER%" (
|
||||
echo PostgreSQL installer is not present. Downloading the signed EDB package...
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%POSTGRES_DOWNLOAD_SCRIPT%"
|
||||
if errorlevel 1 (
|
||||
echo Failed to download or verify PostgreSQL.
|
||||
exit /b 1
|
||||
)
|
||||
echo.
|
||||
echo ERROR: PostgreSQL installer was not found.
|
||||
echo Download the official Windows x64 PostgreSQL installer,
|
||||
echo rename it to postgesql.exe and place it here:
|
||||
echo %~dp0%POSTGRES_INSTALLER%
|
||||
goto :fail
|
||||
)
|
||||
|
||||
if not exist "picture\logo\main_logo.ico" (
|
||||
echo Missing installer icon: picture\logo\main_logo.ico
|
||||
exit /b 1
|
||||
goto :fail
|
||||
)
|
||||
|
||||
echo Installing Python build dependencies...
|
||||
py -m pip install --upgrade pip
|
||||
if errorlevel 1 exit /b 1
|
||||
if errorlevel 1 goto :fail
|
||||
|
||||
py -m pip install -r requirements.txt pyinstaller
|
||||
if errorlevel 1 exit /b 1
|
||||
if errorlevel 1 goto :fail
|
||||
|
||||
echo Building Inventera.Server.exe...
|
||||
py -m PyInstaller --clean --noconfirm "%APP_SPEC%"
|
||||
if errorlevel 1 (
|
||||
echo Application build failed.
|
||||
exit /b 1
|
||||
goto :fail
|
||||
)
|
||||
|
||||
if not exist "%APP_EXE%" (
|
||||
echo Application executable was not created: %APP_EXE%
|
||||
exit /b 1
|
||||
goto :fail
|
||||
)
|
||||
|
||||
set "ISCC_EXE="
|
||||
@@ -51,17 +50,24 @@ if not defined ISCC_EXE if exist "%ProgramFiles%\Inno Setup 6\ISCC.exe" set "ISC
|
||||
|
||||
if not defined ISCC_EXE (
|
||||
echo Inno Setup was not found. Install it from https://jrsoftware.org/isdl.php
|
||||
exit /b 1
|
||||
goto :fail
|
||||
)
|
||||
|
||||
echo Building Inventera installer...
|
||||
"%ISCC_EXE%" "%INSTALLER_SCRIPT%"
|
||||
if errorlevel 1 (
|
||||
echo Installer build failed.
|
||||
exit /b 1
|
||||
goto :fail
|
||||
)
|
||||
|
||||
echo.
|
||||
echo Build completed.
|
||||
echo Installer: %~dp0dist\Inventera.exe
|
||||
pause
|
||||
exit /b 0
|
||||
|
||||
:fail
|
||||
echo.
|
||||
echo Build stopped because of an error.
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
Reference in New Issue
Block a user