-
Notifications
You must be signed in to change notification settings - Fork 0
Building SentraCore
This guide covers how to produce standalone, production-ready executables for both the Python Engine and the Flutter Dashboard, and how to compile the final Windows installer.
Before running any build, ensure the following are installed and verified:
| Requirement | Verification Command |
|---|---|
| Python 3.11+ with virtual environment | .venv\Scripts\python --version |
| PyInstaller (installed in venv) | .venv\Scripts\pyinstaller --version |
| Flutter SDK (stable) | flutter --version |
| Visual Studio with "Desktop development with C++" |
flutter doctor (should show green) |
| Inno Setup 6 | Installed from jrsoftware.org |
Run the provided build script from the repository root:
scripts\build_engine.batThis script will:
- Activate the virtual environment.
- Clean any previous build artifacts.
- Run PyInstaller with the correct hidden imports for
uvicornandfastapi. - Output
SentraCoreEngine.exeto thedist/directory.
The engine is compiled with the --noconsole flag so it runs as a completely invisible background process. No terminal window will appear when the user launches it.
Expected output location: dist\SentraCoreEngine.exe
Run the dashboard build script from the repository root:
scripts\build_dashboard.batThis script navigates to the dashboard/ directory and runs flutter build windows --release.
Expected output location: dashboard\build\windows\x64\runner\Release\
Note: Flutter bundles the executable alongside several required DLL files and data directories. The entire
Release\folder contents must be included in the installer, not just the.exefile.
Once both builds have completed successfully:
- Open Inno Setup Compiler.
- Go to File → Open and select
installer\sentracore.iss. - Press Ctrl+F9 (or click Build → Compile).
Inno Setup will package all files, shortcuts, and registry entries into a single setup executable.
Expected output location: dist\SentraCore_Setup_v1.0.exe
The sentracore.iss script configures the installer to perform the following actions:
| Action | Detail |
|---|---|
| Install location | C:\Program Files\SentraCore\ |
| Desktop shortcut |
SentraCore Dashboard.lnk (optional, user-selectable) |
| Start Menu group |
SentraCore\ with shortcuts to Dashboard and Uninstaller |
| Auto-start on login | Adds SentraCoreEngine.exe to HKCU\...\Run (optional, user-selectable) |
| Post-install launch | Starts the engine in the background and optionally opens the dashboard |
| Uninstall | Kills the engine process and removes all files and registry keys |
To release a new version of SentraCore:
- Update the version string in
engine/__init__.py(__version__). - Update the
AppVersionfield ininstaller/sentracore.iss. - Update the
OutputBaseFilenameininstaller/sentracore.issto match the new version. - Commit all changes.
- Create and push an annotated Git tag:
git tag -a v1.1.0 -m "Release v1.1.0" git push origin main --tags
- Run the three build steps above to produce the new installer.
- Create a GitHub Release from the tag and attach the new
SentraCore_Setup_v*.exeas a release asset.