Installer just installs WixUI
whose job is to:
- Run the client code to unpack the latest full NuGet package and finish initial install.
- Execute the uninstaller code when WiX goes to remove us, and remove the App directory.
- WiX unpacks
WixUI
and runs it, and puts an entry in Programs and Features. WixUI
executes initial install usingSquirrel.Client
for the full NuGet package, doing the update in-place so the installer never needs to be rebuilt.
- WiX gets notified about the uninstall, calls
WixUI
to do app uninstall viaSquirrel.Client
- WiX then blows away
WixUI
, the "real" installed app.
WixUI
has an extremely simple UI when it does its work, it just pops
up, shows a progress bar, a-la Chrome Installer:
On Uninstall, there is no UI, it's solely in the background.
If Setup.exe gets invoked with the 'Install' action, and the app is already installed, we just execute the app, a-la ClickOnce.
The WiX install script is generated via a Mustache template, whose contents
are primarily populated via the generated NuGet release package. WiX will end
up installing WixUI
, the latest NuGet package file, and a one-line
RELEASES file (meaning that what WiX installs is technically a valid Squirrel
remote update directory).
-
DetectedPackage
- if we're installed (determine this by looking at the NuGet package in the same directory as the app), we run the app and bail. -
DetectComplete
- Do what we're actually here to do (invoke the Squirrel installer), then on the UI thread, tell WiX to finish up. -
PlanPackageBegin
- squelch installation of .NET 4 -
PlanComplete
- Push WiX to to Apply state -
ApplyComplete
- If something bad happened, switch to UI Error state, otherwise start the app if we're in Interactive Mode and call Shutdown() -
ExecuteError
- Switch to the UI Error state