Skip to content

Commit 2128478

Browse files
feat: add automated build scripts and Inno Setup configuration for dashboard and engine packaging
1 parent b33c7da commit 2128478

3 files changed

Lines changed: 96 additions & 0 deletions

File tree

installer/sentracore.iss

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
[Setup]
2+
AppName=SentraCore
3+
AppVersion=1.0
4+
AppPublisher=SentraCore Development Team
5+
DefaultDirName={autopf}\SentraCore
6+
DefaultGroupName=SentraCore
7+
OutputDir=..\dist
8+
OutputBaseFilename=SentraCore_Setup_v1.0
9+
Compression=lzma
10+
SolidCompression=yes
11+
SetupIconFile=compiler:SetupClassicIcon.ico
12+
UninstallDisplayIcon={app}\sentracore_dashboard.exe
13+
14+
[Files]
15+
; The Python Engine (Headless executable)
16+
Source: "..\dist\SentraCoreEngine.exe"; DestDir: "{app}"; Flags: ignoreversion
17+
18+
; The Flutter Dashboard and all its dependencies
19+
Source: "..\dashboard\build\windows\x64\runner\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
20+
21+
[Icons]
22+
; Start Menu Shortcut for the Dashboard
23+
Name: "{group}\SentraCore Dashboard"; Filename: "{app}\sentracore_dashboard.exe"
24+
; Desktop Shortcut for the Dashboard
25+
Name: "{autodesktop}\SentraCore Dashboard"; Filename: "{app}\sentracore_dashboard.exe"; Tasks: desktopicon
26+
; Uninstaller Shortcut
27+
Name: "{group}\Uninstall SentraCore"; Filename: "{uninstallexe}"
28+
29+
[Tasks]
30+
Name: "desktopicon"; Description: "Create a &desktop shortcut"; GroupDescription: "Additional icons:"
31+
Name: "startup"; Description: "Run SentraCore Engine automatically when Windows starts"; GroupDescription: "Background Service:"
32+
33+
[Registry]
34+
; Add the Engine to Windows Startup if the user selected the task
35+
Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "SentraCoreEngine"; ValueData: """{app}\SentraCoreEngine.exe"""; Tasks: startup
36+
37+
[Run]
38+
; Optionally run the engine right after installation
39+
Filename: "{app}\SentraCoreEngine.exe"; Description: "Start SentraCore Engine (Background)"; Flags: nowait postinstall runhidden
40+
; Optionally launch the dashboard
41+
Filename: "{app}\sentracore_dashboard.exe"; Description: "Launch SentraCore Dashboard"; Flags: nowait postinstall
42+
43+
[UninstallRun]
44+
; Attempt to gracefully kill the engine process during uninstallation
45+
Filename: "{cmd}"; Parameters: "/c taskkill /f /im SentraCoreEngine.exe"; Flags: runhidden waituntilterminated

scripts/build_dashboard.bat

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
@echo off
2+
echo ===========================================
3+
echo Building SentraCore Dashboard (Flutter)
4+
echo ===========================================
5+
6+
REM Ensure we are in the root directory
7+
cd %~dp0\..\dashboard
8+
9+
echo Running flutter build windows...
10+
call flutter build windows --release
11+
12+
echo.
13+
echo Dashboard build complete! Executables are located in dashboard\build\windows\x64\runner\Release

scripts/build_engine.bat

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
@echo off
2+
echo ===========================================
3+
echo Building SentraCore Engine (Python)
4+
echo ===========================================
5+
6+
REM Ensure we are in the root directory
7+
cd %~dp0\..
8+
9+
REM Activate the virtual environment
10+
call .venv\Scripts\activate
11+
12+
REM Clean previous builds
13+
if exist "build" rmdir /s /q build
14+
if exist "dist\SentraCoreEngine.exe" del /q "dist\SentraCoreEngine.exe"
15+
16+
REM Run PyInstaller
17+
REM --onefile: creates a single executable
18+
REM --noconsole: hides the terminal window
19+
REM --name: the name of the executable
20+
REM --hidden-import: ensure fastapi/uvicorn dependencies are included
21+
echo Running PyInstaller...
22+
pyinstaller --name "SentraCoreEngine" ^
23+
--noconsole ^
24+
--onefile ^
25+
--hidden-import "uvicorn.logging" ^
26+
--hidden-import "uvicorn.loops" ^
27+
--hidden-import "uvicorn.loops.auto" ^
28+
--hidden-import "uvicorn.protocols" ^
29+
--hidden-import "uvicorn.protocols.http" ^
30+
--hidden-import "uvicorn.protocols.http.auto" ^
31+
--hidden-import "uvicorn.protocols.websockets" ^
32+
--hidden-import "uvicorn.protocols.websockets.auto" ^
33+
--hidden-import "engine.api.server" ^
34+
--clean ^
35+
engine/main.py
36+
37+
echo.
38+
echo Engine build complete! Executable is located at dist\SentraCoreEngine.exe

0 commit comments

Comments
 (0)