Repository navigation
fix(installer): the publisher is Botloft, and installs made as "github" are adopted - #57
Merged
Merged
Conversation
…b" are adopted The app's file properties and Installed apps named "github" as the publisher: Tauri's default, the second part of the identifier. On an unsigned program that reads as someone posing as GitHub. bundle.publisher is now "Botloft" for the app and the setup window, and the installer's own properties name the company too. Tauri also names the registry key that keeps the install folder after the publisher, so the installer's hooks adopt an install made under the old name: BotloftAdoptOldFolder copies the folder from Software\github\Botloft to Software\Botloft\Botloft when the new key is missing and installs there, unless /D chose another folder. It runs before the first page (wizard and passive update) and at the start of the install (the quiet installer has no pages). After installing, the old key goes, and Software\github only if it is left empty. The setup window reads the new key, then the old one. Tested for real: over 0.6.0 installed under the old publisher, with the app open, the new installer run as the updater (/P /UPDATE /R) adopted the folder, removed the old key and reopened the app; the daemon kept running. A custom folder, /D and the quiet path were tested with a small installer compiled around the same hooks file and test keys. Spec 15.4 follows, and no longer says an update runs the old uninstaller: with Tauri 2.12 it does not.
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.
What
Botloft.exe's file properties said the company was "github". That is Tauri's default publisher, the second part of the identifierio.github.httpsphl.botloft. On an unsigned program it reads as someone posing as GitHub, which is the wrong thing to show before signing.bundle.publisheris now "Botloft" for the app and the setup window. Installed apps shows it natively, so the hook that overrode it is gone. The installer's own file properties name the company too (VIAddVersionKey).Software\<publisher>\<product>, and reads it to update into the same folder and for "uninstall before installing".BotloftAdoptOldFolderinhooks.nsh:Software\github\BotlofttoSoftware\Botloft\Botloftwhen the new key is missing;/Dchose another folder;MUI_CUSTOMFUNCTION_GUIINIT, for the wizard and the passive update) and at the start of the install (NSIS_HOOK_PREINSTALL, because the quiet installer has no pages).Software\githubonly if it is left empty./UPDATEskips it.Tests
/P /UPDATE /R):Software\Botloft\Botloftwith the folder from the old key;Software\github;hooks.nshand test registry keys: never installed; old name with a custom folder; the same with/D; already under the new name; the quiet path followed by the cleanup; and the cleanup keeping another program's key under the old publisher.cargo fmt,cargo clippy -p botloft-setup -D warningsand its tests pass.Botloft.exeand the installer show company "Botloft".Still to see