Skip to content

feat(bundler): initialize msi install path with previous location#3158

Merged
lucasfernog merged 2 commits intonextfrom
msi/installdir
Jan 7, 2022
Merged

feat(bundler): initialize msi install path with previous location#3158
lucasfernog merged 2 commits intonextfrom
msi/installdir

Conversation

@FabianLars
Copy link
Copy Markdown
Member

With this PR we now save the installation directory to the registry and use that value to initialize the default install dir on following installations (upgrades).
This was requested a few times so that tauri's buit-in updater doesn't default to C:\Program Files\app_name (ofc useful for manual update-installations too).

The default path if the reg key doesn't exist is the same as before.

I intentionally added the reg value stuff in a separate Component (for clarity) and inside a RegistryKey object (for extensibility).

With this change i also changed manufacturer to be the middle part of the bundle identifier instead of the whole thing. This was imho just plain wrong.
The whole bundle identifier is still used as the AppId, mainly because notifications don't work without it.

Furthermore I changed the dummy registry values used as keyPaths for the shortcuts to be all in the same registry "folder".
Instead of having an installed key in 3 locations, we now have 3 different (dummy) keys in the same path, much cleaner imo.

Just to be extra clear, this is not a breaking change. New installers are still compatible with previous ones. Upgrading old installations with the new installer works normally (old reg keys will be removed by the old uninstaller).

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #___
  • No

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix #___, #___)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • I have added a convincing reason for adding this feature, if necessary

@FabianLars FabianLars requested a review from a team January 5, 2022 00:07
@FabianLars FabianLars added the scope: bundler The bundler used in our cli to make installers label Jan 5, 2022
Copy link
Copy Markdown
Member

@lucasfernog lucasfernog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could use a change file here

@FabianLars FabianLars requested a review from a team as a code owner January 5, 2022 11:14
@FabianLars
Copy link
Copy Markdown
Member Author

should it mention the registry key too or is this enough?

Copy link
Copy Markdown
Member

@lucasfernog lucasfernog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lucasfernog lucasfernog merged commit ac1dfd8 into next Jan 7, 2022
@lucasfernog lucasfernog deleted the msi/installdir branch January 7, 2022 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: bundler The bundler used in our cli to make installers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants