2.2 KiB
Installer
The installer consists of two parts: Setup.exe (C++ bootstrapper) and Update.exe (C# Squirrel Client). There are several main design goals of the installer:
-
Run as quickly as possible, with as little user interface interaction as possible. The faster we can get into the application, the better. An ideal install experience is that once
Setup.exegets clicked, within 3sec the application is running on the user's machine. Double-clickingSetup.exeshould feel like clicking the app shortcut. -
Setup.exeshould be written such that it does as little work as possible, because C++. -
Running an older
Setup.exeshould simply execute the current app. -
Support installation of non-C# applications
Setup.exe
Setup.exe does the following operations:
- Determines if the .NET Framework is installed
- If not, relaunches itself with
/installfx45, which opens a progress dialog which downloads the .NET Framework and silently invokes it. - Extract
Update.exeandAppName-full.nupkgto%LocalAppData%\Squirrel\Tempwhich are embedded as resources. - Execute
Update.exewith the/installswitch, and apply any switches that were applied to Setup.exe - Nuke the extracted temporary files from step 3.
Update.exe
Update.exe is a generic client for Squirrel which supports several operations:
--install [directory] [/silent]- Install the NuPkg file given (or any NuPkg files in the same directory as itself), and launch their applications. If/silentis given, don't launch anything. CopyUpdate.exeto the application root directory. Install also writes an entry in Programs and Features which will invoke/uninstall.--uninstall- Completely uninstall the application associated with the directory in whichUpdate.exeresides.--download URL- Check for updates from the given URL and write information about available versions to standard output in JSON format.--update URL- Updates the application to the latest version from the remote URL
Sample JSON output
{
currentVersion: "1.0.0.0",
futureVersion: "1.0.0.1",
releasesToApply: [
{
version: "1.0.0.1",
releaseNotes: "This does a thing"
}
]
}