diff --git a/installers/windows/bambuddy.ico b/installers/windows/bambuddy.ico new file mode 100644 index 000000000..93f2dc013 Binary files /dev/null and b/installers/windows/bambuddy.ico differ diff --git a/installers/windows/bambuddy.iss b/installers/windows/bambuddy.iss index 9fd74f6c6..140d22c2a 100644 --- a/installers/windows/bambuddy.iss +++ b/installers/windows/bambuddy.iss @@ -49,8 +49,12 @@ ArchitecturesInstallIn64BitMode=x64compatible ; Admin required: we register a Windows service and write to ProgramData PrivilegesRequired=admin PrivilegesRequiredOverridesAllowed= -UninstallDisplayIcon={app}\bin\nssm.exe -SetupIconFile= +; Bambuddy branding — bambuddy.ico is a multi-resolution .ico (16/32/48/ +; 64/128/256) generated from frontend/public/img/favicon.png; lives next +; to this .iss so the SourcePath-relative reference works during compile +; and the [Files] entry stages it into {app} for Add/Remove Programs. +SetupIconFile=bambuddy.ico +UninstallDisplayIcon={app}\bambuddy.ico ; Don't allow installing to a network drive — service won't start cleanly DisableDirPage=no DisableReadyPage=no @@ -76,6 +80,10 @@ Source: "build\staging\bin\*"; DestDir: "{app}\bin"; Flags: recursesubdirs ignor Source: "build\staging\service\*"; DestDir: "{app}\service"; Flags: recursesubdirs ignoreversion ; Version stamp Source: "build\staging\VERSION"; DestDir: "{app}"; Flags: ignoreversion +; App icon — used by UninstallDisplayIcon (Add/Remove Programs) and the +; Start Menu / desktop shortcuts. Lives at the install root so the +; UninstallDisplayIcon path stays stable when the [Files] tree changes. +Source: "bambuddy.ico"; DestDir: "{app}"; Flags: ignoreversion [Dirs] ; ProgramData layout — created with permissions LocalSystem can write to @@ -84,10 +92,10 @@ Name: "{commonappdata}\Bambuddy\data"; Permissions: users-modify Name: "{commonappdata}\Bambuddy\logs"; Permissions: users-modify [Icons] -Name: "{group}\Open Bambuddy Dashboard"; Filename: "http://localhost:{#DefaultPort}"; IconFilename: "{app}\bin\nssm.exe" +Name: "{group}\Open Bambuddy Dashboard"; Filename: "http://localhost:{#DefaultPort}"; IconFilename: "{app}\bambuddy.ico" Name: "{group}\Bambuddy Logs"; Filename: "{commonappdata}\Bambuddy\logs" Name: "{group}\Uninstall Bambuddy"; Filename: "{uninstallexe}" -Name: "{commondesktop}\Bambuddy"; Filename: "http://localhost:{#DefaultPort}"; IconFilename: "{app}\bin\nssm.exe"; Tasks: desktopicon +Name: "{commondesktop}\Bambuddy"; Filename: "http://localhost:{#DefaultPort}"; IconFilename: "{app}\bambuddy.ico"; Tasks: desktopicon [Run] ; Register and start the Windows service diff --git a/installers/windows/build.py b/installers/windows/build.py index 2e74e7bec..b5b3e3424 100644 --- a/installers/windows/build.py +++ b/installers/windows/build.py @@ -271,17 +271,20 @@ def write_version_file() -> None: Inno Setup include file so the .iss script can pick it up at compile time without a fragile file-read hack. - Reads from pyproject.toml's [project] version line for the source of - truth. Falls back to ``0.0.0+dev`` if not parseable. + Reads ``APP_VERSION`` from ``backend/app/core/config.py`` — that's the + canonical version used by every other surface in Bambuddy (the FastAPI + OpenAPI title, /system info, the support bundle, the spoolbuddy update + check). pyproject.toml has its own stale ``version = "0.1.5"`` that + isn't kept in sync; reading it would ship a wrong-versioned installer. """ version = "0.0.0+dev" - pyproject = REPO_ROOT / "pyproject.toml" - if pyproject.exists(): - for line in pyproject.read_text().splitlines(): - line = line.strip() - if line.startswith("version =") or line.startswith('version="'): - # version = "0.1.5" -> 0.1.5 - version = line.split("=", 1)[1].strip().strip('"').strip("'") + config_py = REPO_ROOT / "backend" / "app" / "core" / "config.py" + if config_py.exists(): + for raw in config_py.read_text().splitlines(): + stripped = raw.strip() + if stripped.startswith("APP_VERSION"): + # APP_VERSION = "0.2.5b1" -> 0.2.5b1 + version = stripped.split("=", 1)[1].strip().strip('"').strip("'") break (STAGING / "VERSION").write_text(version)