diff --git a/build_exe.bat b/build_exe.bat index 2fc8ad9..cab6fe6 100644 --- a/build_exe.bat +++ b/build_exe.bat @@ -5,19 +5,19 @@ REM This script builds a standalone executable using Waitress WSGI server echo Building GasFlux Web API executable... REM Check if PyInstaller is installed -python -c "import PyInstaller" >nul 2>&1 +py -3 -c "import PyInstaller" >nul 2>&1 if errorlevel 1 ( echo Error: PyInstaller is not installed. Please run: - echo pip install pyinstaller waitress + echo py -3 -m pip install pyinstaller waitress pause exit /b 1 ) REM Check if Waitress is installed -python -c "import waitress" >nul 2>&1 +py -3 -c "import waitress" >nul 2>&1 if errorlevel 1 ( echo Error: Waitress is not installed. Please run: - echo pip install waitress + echo py -3 -m pip install waitress pause exit /b 1 ) @@ -41,8 +41,24 @@ pyinstaller --onefile ^ --hidden-import skgstat ^ --hidden-import skgstat.Variogram ^ --hidden-import skgstat.OrdinaryKriging ^ - --add-data "src\gasflux\gasflux_config.yaml;src\gasflux" ^ - --add-data "API_DOCUMENTATION.md;." ^ + --hidden-import skgstat.DirectionalVariogram ^ + --hidden-import plotly ^ + --hidden-import plotly.graph_objects ^ + --hidden-import plotly.express ^ + --hidden-import plotly.subplots ^ + --hidden-import pybaselines ^ + --hidden-import scipy ^ + --hidden-import scipy.odr ^ + --hidden-import scipy.signal ^ + --hidden-import scipy.stats ^ + --hidden-import scipy.integrate ^ + --hidden-import scipy.optimize ^ + --hidden-import molmass ^ + --hidden-import openpyxl ^ + --hidden-import pyproj ^ + --hidden-import jinja2 ^ + --hidden-import requests ^ + --hidden-import urllib3 ^ --hidden-import matplotlib ^ --hidden-import matplotlib.pyplot ^ --hidden-import matplotlib.backends ^ @@ -53,7 +69,19 @@ pyinstaller --onefile ^ --hidden-import matplotlib.patches ^ --hidden-import matplotlib.text ^ --hidden-import matplotlib.transforms ^ + --hidden-import tqdm ^ + --hidden-import certifi ^ + --hidden-import charset_normalizer ^ + --hidden-import geopandas ^ + --hidden-import shapely ^ + --hidden-import fiona ^ + --hidden-import simplekml ^ + --hidden-import joblib ^ --exclude-module tkinter ^ + --add-data "src\gasflux\gasflux_config.yaml;src\gasflux" ^ + --add-data "src\gasflux\templates\mass_balance_template.html;src\gasflux\templates" ^ + --add-data "gasflux.ini;." ^ + --add-data "gasflux.ini.example;." ^ server_waitress.py if errorlevel 1 ( @@ -67,8 +95,10 @@ echo Build completed successfully! echo Executable created: dist\GasFluxAPI.exe echo. echo To run the server: -echo GasFluxAPI.exe +echo GasFluxAPI.exe echo. -echo The server will start on http://localhost:5000 +echo The server will start on http://localhost:5001 +echo Make sure gasflux.ini is in the same directory as the executable, +echo or configure paths via environment variables. echo. -pause \ No newline at end of file +pause