Skip to content

feat(desktop): tidy the installer's name and install-mode text - #269

Merged
quickbeard merged 1 commit into
mainfrom
installer-name-cleanup
Aug 19, 2026
Merged

quickbeard merged 1 commit into
mainfrom
installer-name-cleanup

Conversation

@quickbeard

@quickbeard quickbeard commented Aug 19, 2026 •

Copy link
Copy Markdown
Owner

Two bits of installer text, from a real install of the 1.18.4-8 build.

The version in the app name

Windows Settings → Apps listed CoDev 1.18.4-8, while the Version column beside it already said 1.18.4-8. electron-builder defaults uninstallDisplayName to ${productName} ${version}, and the installer separately writes DisplayVersion — which is what feeds that column. So the version was printed twice, and the name went stale-looking the moment you updated.

uninstallDisplayName: "${productName}" leaves just CoDev (channel-correct, so CoDev Beta/CoDev Dev too). The Version column is untouched.

"Fresh install for current user only."

The install-mode page explained the choice it had just offered — the radio already reads "Only for me (mnguy)", and the line underneath said the same thing in a smaller font. resources/installer.nsh blanks it.

The all-users line is deliberately left alone: "Fresh install for all users. (will prompt for admin credentials)" tells you something the radio button doesn't.

Why this needs a script and a flag

There's no project-level message override — addCustomMessageFileInclude reads assistedMessages.yml from app-builder-lib's own template directory and never from the project. Redefining the LangString in <buildResources>/installer.nsh is the only hook, and electron-builder includes that file after its own language files, so the redefinition wins.

NSIS answers a redefinition with warning 6030: LangString "freshInstallForCurrent" set multiple times, which makensis's default -WX turns into a failed build — I hit exactly that:

warning 6030: LangString "freshInstallForCurrent" set multiple times for 1033, wasting space
Error: warning treated as error

Hence warningsAsErrors: false. The two are a pair — either alone is a broken build or a pointless loss of a safety net, and DIVERGENCES says so.

What the flag costs, stated plainly: checkMakensisOutput rethrows only on Error: lines and prints nothing on a successful run, so a new NSIS warning is now invisible as well as non-fatal. Nothing else warned before this change, so nothing is being hidden today. To audit later, flip the flag back to true and rebuild — every warning then fails the build and prints. If you'd rather keep -WX and live with the redundant line, this is the change to drop.

All 26 languages, not just English: the string is emitted once per bundled language, so an English-only override would leave the other 25 showing it. A test pins the coverage against app-builder-lib's own bundledLanguages, so a language added upstream fails there instead of quietly restoring the line for its users.

No dependency change

That test reaches app-builder-lib through electron-builder's own resolution rather than declaring it. An earlier revision of this PR added it as a devDependency; that turned out to re-hoist the lockfile, because app-builder-lib pins older copies of packages electron also uses:

package top-level before with the devDependency
@electron/get 5.0.0 3.1.0
@sindresorhus/is 7.2.0 4.6.0
env-paths 3.0.0 2.2.1
isarray 2.0.5 1.0.0

42 insertions / 37 deletions in bun.lock, and @electron/get is what downloads the Electron binary — not a trade worth making for one import in one test. bun.lock and package.json are now byte-identical to main; the branch touches five files, none of them dependency manifests.

Verification

Packaged an x64 build both ways: it fails with 6030 without the flag, and succeeds with it. Desktop suite 141 pass / 0 fail; typecheck clean. The language guard was checked by breaking one LCID and confirming the test fails, so it isn't vacuous.

Not verified: how either change looks on screen — the Apps & Features entry and the install-mode page both need a real install to see. Worth confirming with the next build, along with the wizard itself from #268, which is still unobserved.

🤖 Generated with Claude Code

Two installer-text changes.

Apps & Features listed the app as "CoDev 1.18.4-8". That list has its own
Version column, fed by the DisplayVersion the installer writes
separately, so electron-builder's default uninstallDisplayName of
"${productName} ${version}" prints the version twice.
uninstallDisplayName: "${productName}" leaves just the name.

The install-mode page explained the choice it had just offered: picking
"Only for me (user)" showed "Fresh install for current user only."
underneath. resources/installer.nsh blanks it. The all-users line stays,
since "(will prompt for admin credentials)" is information the radio
button does not carry.

Redefining the LangString is the only hook for that text —
addCustomMessageFileInclude reads assistedMessages.yml from
app-builder-lib's template dir, never from the project — and NSIS
answers a redefinition with warning 6030, which makensis's default -WX
makes fatal. Hence warningsAsErrors: false, which is meaningless without
the script and vice versa. It costs something worth recording: warnings
are not printed on a successful run, so a new one is now invisible as
well as non-fatal; flip the flag back to audit.

The override covers all 26 bundled languages, because the string is
emitted once per language and an English-only override would leave the
rest showing it. A test pins that against app-builder-lib's own list, so
a language added upstream fails there instead of quietly restoring the
line. That list is reached through electron-builder's own resolution
rather than by declaring app-builder-lib: it is already in the tree as
electron-builder's dependency, and promoting it to a direct
devDependency re-hoists the lockfile — top-level @electron/get 5.0.0 ->
3.1.0, plus env-paths, @sindresorhus/is, isarray and signal-exit — which
is not a trade worth making for one import. bun.lock and package.json
are unchanged.

Verified by packaging: the build fails with 6030 before the flag and
succeeds after.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@quickbeard
quickbeard force-pushed the installer-name-cleanup branch from 196ace6 to 9c8c70e Compare August 19, 2026 03:49
@quickbeard
quickbeard merged commit 03b4085 into main Aug 19, 2026
0 of 5 checks passed
@quickbeard
quickbeard deleted the installer-name-cleanup branch August 19, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant