Squirrel.Windows
Create a Windows installer for your Electron app using Electron Forge.
Last updated
Was this helpful?
Create a Windows installer for your Electron app using Electron Forge.
Last updated
Was this helpful?
The Squirrel.Windows target builds your application using the framework. It generates three files:
{appName} Setup.exe
The main executable installer for your application
{appName}-full.nupkg
The NuGet package file used for updates
RELEASES
Metadata file used to check if an update is available
Squirrel.Windows is a no-prompt, no-hassle, no-admin method of installing Windows applications, and is therefore the most user friendly you can get.
You can only build the Squirrel.Windows target on a Windows machine or on a Linux machine with and installed.
Add this module to the section of your :
By default, the Squirrel.Windows maker fetches the author
and description
fields in the project's package.json file.
Alternatively, you can also override these values directly in your Squirrel.Windows maker config.
Note that the Forge config field is "authors" while the package.json field is called "author".
Squirrel.Windows can behave unexpectedly when application names contain spaces. You can use the following setup in this case, which works well:
Additionally, you'll need to set the App User Model ID from your main process like this:
Squirrel.Windows will use the productName
from your package.json
for any user-facing strings and for the name of your Setup.exe
.
It will use the camel-cased name
from the MakerSquirrel
config for the NuGet package name. NuGet package names cannot contain spaces.
For advanced debug logging for this maker, add the DEBUG=electron-windows-installer*
environment variable.
The Squirrel.Windows maker inherits all of its config options from the module, except for appDirectory
and outputDirectory
, which are set by the maker.
Complete configuration options are documented in the types.
Squirrel.Windows requires mandatory package metadata to satisfy the manifest format. There are two ways to specify this information in Electron Forge.
When first running your app, updating it, and uninstalling it, Squirrel.Windows will spawn your app an additional time with some special arguments. You can read more about these arguments on the README.
The easiest way to handle these arguments and stop your app launching multiple times during these events is to use the module as one of the first things your app does.