Skip to content

Commit b0b60a2

Browse files
committed
feat(installer): make the installer branding-icon dir configurable
build.ps1 hardcoded frontend/public for the MSI icon, which breaks apps whose frontend carries no favicon.ico. Add an installer_branding_dir copier var (default frontend/public) and use it for BrandingDir, so an app without a usable frontend favicon can point it at a dir it owns (e.g. installer/) that holds favicon.ico.
1 parent 3efe4df commit b0b60a2

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

copier.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,12 @@ installer_manufacturer:
196196
help: "What is the human-friendly manufacturer/company name to show in the MSI installer and Add/Remove Programs (e.g. Acme Corp)?"
197197
when: "{{ install_as_windows_service }}"
198198

199+
installer_branding_dir:
200+
type: str
201+
help: "Directory (relative to the repo root) holding the installer icon favicon.ico. Frontend apps can use frontend/public; apps whose frontend has no favicon should point this at a dir they own (e.g. installer)."
202+
default: "frontend/public"
203+
when: "{{ install_as_windows_service }}"
204+
199205
installer_upgrade_code:
200206
type: str
201207
help: "A fixed-for-life UpgradeCode GUID for this app's MSI (generate once, NEVER change it - it identifies upgrades across versions). Format: 8-4-4-4-12 hex, e.g. 3b9d1f6a-2c84-4e7b-9a1f-6d5c4b3a2e10."

template/{% if install_as_windows_service %}installer{% endif %}/build.ps1.jinja

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@ $BuildDir = Join-Path $ScriptRoot 'build'
8181
$StagingDir = Join-Path $BuildDir 'staging'
8282
$DistDir = Join-Path $ScriptRoot 'dist'
8383
$WixDir = Join-Path $ScriptRoot 'wix'
84-
# Reuse the app's own favicon as the installer icon rather than duplicating it.
85-
$BrandingDir = Join-Path $RepoRoot 'frontend\public'
84+
# Directory (relative to the repo root) holding the installer icon; it must contain favicon.ico.
85+
# Frontend apps reuse frontend/public; apps without a frontend point this elsewhere (e.g. installer/).
86+
$BrandingDir = Join-Path $RepoRoot '{% endraw %}{{ installer_branding_dir | replace('/', '\\') }}{% raw %}'
8687
$LicenseRtf = Join-Path $ScriptRoot 'license.rtf'
8788

8889
if (-not $Version) {

0 commit comments

Comments
 (0)