Repository navigation
The installer's welcome pages, and the uninstaller's "Also remove settings and logs" - #54
Merged
Merged
Conversation
…ther to remove settings and logs customWelcomePage says what the installer will ask (D144), skipped on an update. customUnWelcomePage adds an unticked "Also remove settings and logs" box under its text; ticked, or with --delete-app-data, customUnInstall removes the app's folders in the person's own app data, as electron-builder does, trying again for a few seconds while a file just deleted still holds its folder. Never on an update. config() owns nsis.deleteAppDataOnUninstall and nsis.removeDefaultUninstallWelcomePage.
… capture-installer.ps1 ticks the uninstaller's box With %APPDATA%\electron-kit Demo seeded, an update and a silent uninstall keep it and --delete-app-data removes it. The capture saves both welcome pages, ticks "Also remove settings and logs" after its picture and fails if the folder is still there. check-installer.ps1 now waits for the uninstall to finish, and for every one of the app's processes to stop after --force-run.
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.
The installer opens on a welcome page, and the uninstaller's welcome page asks whether to remove the app's settings and logs.
The installer.
customWelcomePageadds MUI's welcome page before "Who it's for": "Welcome to Setup", then "This installs on your computer. You'll choose who it's for, the files it opens and its shortcuts." (an app with no file types leaves out the files) and "Click Next to continue." An update never shows it.The uninstaller.
customUnWelcomePage: "Uninstall ", "This removes from your computer. Close it first if it's open.", an unticked "Also remove settings and logs" box, then "Click Next to continue." The box is added in the page's show function, on the page's background. The text is measured in its own font so the box always sits a line under it, however the name wraps. With the box ticked, or with--delete-app-data,customUnInstallremoves the same folders electron-builder's--delete-app-datadoes ($APPDATA\${APP_FILENAME},${APP_PRODUCT_FILENAME},${APP_PACKAGE_NAME}, in the person's own context). It retries for up to five seconds when a file it has just deleted still holds the folder: locally, electron-builder's single try left an empty folder behind about half the time. An update's uninstall never removes them, and a silent uninstall keeps them unless given--delete-app-data.config()now also refusesnsis.deleteAppDataOnUninstallandnsis.removeDefaultUninstallWelcomePage.Proved by:
check-installer.ps1: with%APPDATA%\electron-kit Demoseeded with a marker file, an update (--updated) and a silent uninstall keep it, and/S --delete-app-dataremoves it. It now waits for the uninstall to finish, and for every one of the app's processes to stop after--force-run.capture-installer.ps1: saves both welcome pages, ticks the uninstaller's box after its picture, and fails if the folder survives.npm test: 259 pass (3 new tests).docs/building.md: updated.Locally: built with
-WX,check-installer.ps1passed 4 times in a row once the retry was in, and the capture saved 7 pages with the folder gone afterwards.