# electron-installer-squirrel-windows

> Generate Windows installers for Electron apps using Squirrel.

Latest version **1.3.0** (published 2016-02-04) · Apache-2.0 license · 47 weekly downloads

## Install

```sh
npm install electron-installer-squirrel-windows
pnpm add electron-installer-squirrel-windows
yarn add electron-installer-squirrel-windows
bun add electron-installer-squirrel-windows
```

Provides the command `electron-installer-squirrel-windows`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2016-02-04 |
| First published | 2015-07-11 |
| Weekly downloads | 47 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 12 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 45 |
| Author | Lucas Hrabovsky |
| Maintainers | imlucas, kangas, machyne, mongodb-js-user, rueckstiess |
| Keywords | mongodb.js, electron, electron-installer, squirrel, squirrel.windows, electron windows setup.exe |

## Links

- npm: https://www.npmjs.com/package/electron-installer-squirrel-windows
- Repository: https://github.com/mongodb-js/electron-installer-squirrel-windows
- Homepage: http://github.com/mongodb-js/electron-installer-squirrel-windows
- Issues: https://github.com/mongodb-js/electron-installer-squirrel-windows/issues
- npm.io page: https://npm.io/package/electron-installer-squirrel-windows

## Dependencies (12)

- [asar](https://npm.io/package/asar.md) ~0.9.1
- [temp](https://npm.io/package/temp.md) ^0.8.3
- [async](https://npm.io/package/async.md) ^1.5.2
- [debug](https://npm.io/package/debug.md) ^2.2.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^0.26.5
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [titlecase](https://npm.io/package/titlecase.md) ^1.0.2
- [lodash.clone](https://npm.io/package/lodash.clone.md) ^4.0.2
- [lodash.assign](https://npm.io/package/lodash.assign.md) ^4.0.1
- [lodash.foreach](https://npm.io/package/lodash.foreach.md) ^4.0.0
- [ampersand-model](https://npm.io/package/ampersand-model.md) ^6.0.2
- [lodash.template](https://npm.io/package/lodash.template.md) ^4.0.1

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 1.3.0 (latest) — 2016-02-04
- 1.2.2 — 2015-11-23
- 1.0.0 — 2015-11-19
- 0.4.0 — 2015-09-01
- 0.3.0 — 2015-09-01
- 0.2.0 — 2015-07-27
- 0.0.1 — 2015-07-11

## README

# electron-installer-squirrel-windows [![][appveyor_img]][appveyor_url]

Generate Windows installers for [Electron][electron] apps using [Squirrel][squirrel].

## Todo

- Pull `AppModel` into it's own module

## Installation

```
# For use in npm scripts
npm i electron-installer-squirrel-windows --save-dev

# For use from cli
npm i electron-installer-squirrel-windows -g
```

## Usage

```
Usage: electron-installer-squirrel-windows <path/to/.app>

Generate Windows installers for Electron apps.

Usage:
  electron-installer-squirrel-windows ./dist/FooBar-win32-ia32
  # Creates a `.nupkg`, a `RELEASES` file, and a `.exe` installer file in `./`

Options:
  --out=<path>         The directory to place artifacts [Default: `process.cwd()`].
  --debug              Enable debug messages.
  --overwrite          Overwrite any existing `Setup.exe` [Default: `false`].
  -h --help            Show this screen.
  --version            Show version.
```

## Integration

Squirrel will spawn your app with command line flags on first run,
updates, and uninstalls. It is **very** important that your app handle
these events as _early_ as possible, and quit **immediately** after
handling them. Squirrel will give your app a short amount of time
(~15sec) to apply these operations and quit.

The [electron-squirrel-startup][electron-squirrel-startup] module will handle
the most common events for you, such as managing desktop shortcuts.  Just
add the following to the top of your `main.js` and you're good to go:

```js
if(require('electron-squirrel-startup')) return;
```

### API

```javascript
var createInstaller = require('electron-installer-squirrel-windows')
createInstaller(opts, function done (err) { })
```
#### createInstaller(opts, callback)

##### opts

**Required**

`path` - *String*
The directory generated by [electron-packager][electron-packager].

**Optional**

> **Note** All optional keys will be read from your `package.json` by default.

`name` - *String*
The application name (usually all lowercase with dashes for spaces).

`product_name` - *String*
The marketing name (usually `name` with spaces and titlecased).

`out` - *String*
The folder path to create the `.exe` installer in. [Default: `process.cwd()`]

`loading_gif` - *String*
The local path to a `.gif` file to display during install. [Default: `__dirname/resources/install-spinner.gif`]

`authors` - *String*
The authors value for the nuget package metadata.

`owners` - *String*
The owners value for the nuget package metadata. [Default: `#{authors}`]

`exe` - *String*
The name of your app's main `.exe` file. [Default: `#{product_name}Setup.exe`]

`description` - *String*
The description value for the nuget package metadata. [Default: ``]

`version` - *String*
The version value for the nuget package metadata.

`title` - *String*
The title value for the nuget package metadata. [Default: `#{product_name || name}`]

`cert_path` - *String*
The path to an Authenticode Code Signing Certificate. [Default: `null`]

`cert_password` - *String*
The password to decrypt the certificate given in `cert_path`. [Default: `null`]

`sign_with_params` - *String*
Params to pass to signtool which overrides `cert_path` and `cert_password`.  [Default: `null`]

`setup_icon` - *String*
URL to the `.ico` file to use as the icon for the generated `Setup.exe`. [Default: `http://git.io/vqdOX` (atom.ico)]

`remote_releases` - *String*
URL to your existing updates. If given, these will be downloaded to create delta updates. [Default: `null`]

`overwrite` - *Boolean*
Overwrite existing installers if they already exist. [Default: `false`]

`debug` - *Boolean*
Enable debug message output. [Default: `false`]

##### callback

`err` - *Error*
Contains errors if any.

## License

Relicensed under Apache 2.0 Copyright (c) 2015 MongoDB Inc.

Based on [atom/grunt-electron-installer][original] Copyright (c) 2015 GitHub Inc.

[appveyor_img]: https://ci.appveyor.com/api/projects/status/157smy0vsosp72bu/branch/master?svg=true
[appveyor_url]: https://ci.appveyor.com/project/mongodb-js/electron-installer-squirrel-windows/branch/master
[electron]: https://github.com/atom/electron
[squirrel]: https://github.com/Squirrel/Squirrel.Windows
[original]: https://github.com/atom/grunt-electron-installer
[electron-squirrel-startup]: https://github.com/mongodb-js/electron-squirrel-startup

---
_Source: https://npm.io/package/electron-installer-squirrel-windows · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
