Squirrel / Squirrel.Windows

An installation and update framework for Windows desktop apps
MIT License
7.38k stars 1.03k forks source link

Discussion - combining squirrel installation with already working MSI installation #1679

Open Alonzzzo2 opened 4 years ago

Alonzzzo2 commented 4 years ago

This is more of a discussion post, would love to get your advices / input on this: My work place already creates an MSI install file by using wix tools. I need to investigate and implement a switch to squirrel. The main reason to switch to squirrel is the update mechanism and not the installation procedure. The current MSI we're generating does relatively a lot of work in the installation process: update registry, edit environment variables and some more.

The discussion in my team is whether to switch completely to squirrel (and move all the work the MSI installer does to squirrel's onInitialInstall+onAppUninstall hooks) or to create some hybrid solution which will allow us to continue using our MSI for installation and uninstallation and still use squirrel for auto update. One of the things to consider is we want to avoid having 2 uninstall entries (both squirrel and the MSI create an uninstall entry)

So there are 3 options:

  1. Switch to squirrel completely. that means implementing all the work the MSI does when installing/uninstalling in squirrel's hooks.
  2. Let the MSI run squirrel's setup.exe. that means we're gonna have 2 uninstall entries: 2.a. When squirrel is uninstalled, also uninstall the MSI 2.b. When the MSI is uninstalled, also uninstall squirrel 2.c implement 2.a AND 2.b
  3. Let the MSI create all the app's folder tree, simulating squirrel install (file-system wise), which means unpacking the nupkg in the app/app-1.0 dir, and copy RELEASES and the nupkg to the packages directory. This way, only the MSI will be in charge of installing and uninstalling the app, and squirrel can carry on updating the app (since the updates use nupkg and not setup.exe)

What do you think? Would love to get feedback on this, currently I'm starting to implement 3 at the MSI

Thanks

frederikolsen88 commented 4 years ago

I would always go for option 1. Not because I have any experience with your scenario, but because it will invariably be easier to maintain and support down the line. 2 sounds like it might bug end users; there is no good answer as to why there are suddenly two uninstall entries. 3 sounds like a solution that could wind up being very brittle.

It should also pay off to familiarize yourself with the workings of vanilla Squirrel. The documentation has some holes in it, but even the best documentation can rarely match learning by doing. Also, if you run into any problems, it's way easier for other developers using Squirrel to help you out.