Repository navigation
feat(desktop): tidy the installer's name and install-mode text - #269
Merged
Merged
Conversation
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
force-pushed
the
installer-name-cleanup
branch
from
August 19, 2026 03:49
196ace6 to
9c8c70e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 defaultsuninstallDisplayNameto${productName} ${version}, and the installer separately writesDisplayVersion— 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, soCoDev Beta/CoDev Devtoo). 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.nshblanks 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 —
addCustomMessageFileIncludereadsassistedMessages.ymlfrom app-builder-lib's own template directory and never from the project. Redefining theLangStringin<buildResources>/installer.nshis 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-WXturns into a failed build — I hit exactly that: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:
checkMakensisOutputrethrows only onError: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 totrueand rebuild — every warning then fails the build and prints. If you'd rather keep-WXand 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 ownbundledLanguages, so a language added upstream fails there instead of quietly restoring the line for its users.No dependency change
That test reaches
app-builder-libthrough 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 packageselectronalso uses:@electron/get@sindresorhus/isenv-pathsisarray42 insertions / 37 deletions in
bun.lock, and@electron/getis what downloads the Electron binary — not a trade worth making for one import in one test.bun.lockandpackage.jsonare now byte-identical tomain; 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