docs / using / install-process.md |
---|
This section goes into detail about the install process.
Setup.exe
is a C++ bootstrapper application used to install your app on the user's local system. It is generated as part of the Squirrel --releasify
process.
The Setup.exe
file includes the Update.exe
application and the latest version of the MyApp package to be installed. A single executable file can be provided due to the WriteZipToSetup.exe
tool injecting the appropriate files into the exe.
In addition, the Setup.exe
will also ensure that .NET 4.5 is installed on the user's computer.
The Setup.exe
, and later the UpdateManager
in MyApp must have the ability to write files to and execute files from the application install location. To ensure permission for all types of users, the user's application data directory is selected as the install location (i.e., %LocalAppData%\MyApp
).
The installation root really only needs to consist of two types of folders:
- Packages - folder used to download and assemble the update package files.
- App Folders - the "installed" application files for a given version of MyApp.
\%LocalAppData%
\packages
MyApp-1.0.0.nupkg
MyApp-1.0.1-delta.nupkg
MyApp-1.0.1.nupkg
\app-1.0.0
MyApp.exe
\app-1.0.1
MyApp.exe
The packages directory is effectively immutable, it simply consists of the packages we've downloaded. Using the user's local application data directory means that we the needed write-access to the install directory on a per-user basis.
Tip: See Machine-wide Installs for more information on ensuring your application pushed to all users in an enterprise environment.
The Setup.exe
application preforms the following:
- Ensures .NET Framework Installed - determines if .NET Framework is available, and if not relaunches itself with
/installfx45
to download and launch the .NET Framework installer. - Create
%LocalAppData%\MyApp
Directory - creates a directory for the MyApp to be installed. - Extracts
Update.exe
- extracts theUpdate.exe
application to the application directory (%LocalAppData%\MyApp
). - Extracts
MyApp.1.0.0-full.nupkg
- extracts the MyApp full application package to the%LocalAppData%\MyApp\packages\temp
directory. - Executes
Update.exe
to Finish Install - executes theUpdater.exe
application with the/install
switch to finish the application installation and then launch the application.- Copy MyApp to
app-1.0.0
Directory - copy the full version of MyApp files to a application sub-directory (e.g.,MyApp\app-1.0.0
). - Launch MyApp - at the end of the setup process, the Updater launches the newly installed version of MyApp.
- Copy MyApp to
- MyApp Creates Shortcuts - the first execution of the application will cause shortcuts to be created on the desktop and Windows start menu for MyApp.
By default, application shortcuts are created on the desktop and the Windows Start menu that point to the Update.exe
application with additional arguments pointing to the correct application to execute.
MyApp.lnk
(Application Shortcut)
- Target:
C:\Users\kbailey\AppData\Local\MyApp\Update.exe --processStart MyApp.exe
- Start in:
C:\Users\kbailey\AppData\Local\MyApp\app-1.0.0
- Loading GIF - specify a "loading" image during initial install of large applications.
- Machine-wide Installs - generating an MSI file suitable for installation via Group Policy.
- NuGet Package Metadata - overview of the NuGet metadata and its uses by Squirrel.
Return: Table of Contents |
---|