{"_id":"@atom/electron-winstaller","_rev":"2-03a4ccce589e6fe7d243fcd41a79a109","name":"@atom/electron-winstaller","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@atom/electron-winstaller","version":"0.0.1","description":"Module to generate Windows installers for Electron apps","main":"./lib/index.js","license":"MIT","repository":{"type":"git","url":"git+https://github.com/electronjs/windows-installer.git"},"scripts":{"build":"babel -d lib/ src/","prepublish":"npm run build","lint":"eslint src spec","test":"npm run lint && ava","tdd":"ava --watch","semantic-release":"semantic-release"},"dependencies":{"@babel/runtime":"^7.3.4","asar":"^1.0.0","debug":"^4.1.1","fs-extra":"^7.0.1","lodash.template":"^4.2.2","pify":"^4.0.1","temp":"^0.9.0"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.3.3","@babel/plugin-transform-async-to-generator":"^7.2.0","@babel/plugin-transform-runtime":"^7.3.4","@babel/polyfill":"^7.2.5","@babel/preset-env":"^7.3.1","@babel/register":"^7.0.0","@continous-auth/semantic-release-npm":"1.0.3","ava":"^1.2.1","babel-eslint":"^10.0.1","eslint":"^5.14.1","semantic-release":"^15.13.3"},"engines":{"node":">=6.0.0"},"babel":{"presets":["@babel/preset-env"],"plugins":["@babel/plugin-transform-async-to-generator","@babel/plugin-transform-runtime"]},"ava":{"files":["spec/*.js"],"failFast":true,"require":["@babel/register","@babel/polyfill"]},"gitHead":"315145e090a64d2226576fe6ef4ba419eb136d80","bugs":{"url":"https://github.com/electronjs/windows-installer/issues"},"homepage":"https://github.com/electronjs/windows-installer#readme","_id":"@atom/electron-winstaller@0.0.1","_npmVersion":"6.4.1","_nodeVersion":"8.15.0","_npmUser":{"name":"atom-team","email":"atom@github.com"},"dist":{"integrity":"sha512-E8bGTBrhf4HsZZS5oPxQgx8XL2wCz04vi0gtYzQH+i9gpxdkuGuV+RHGAtQY+k+wbG5RVR89sB6ICMmhUYNi2Q==","shasum":"9e3ea7bcd0dd5c341c223caaf5a11809ef96f3dd","tarball":"https://registry.npmjs.org/@atom/electron-winstaller/-/electron-winstaller-0.0.1.tgz","fileCount":41,"unpackedSize":26647486,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdCkniCRA9TVsSAnZWagAAy5UQAKQ1YZc5Qy0pZWAsMlnj\nffKEI1VPk4op9S0WYFbdcDUtJV/qsG3cUQqfNIqDNjLi7O+394n4VYNXfb9J\nrxoIMtURAInNj3fvB3/pK2wAdFofZ0V0Da4bCriPmZfarbTrjw/q2vB1zbu6\ntiPI9RgGPqVTb30wFELpJw/8lUc0eobPUkitgWtioWdiFb1dxYYikva+u9n3\nY+h9sXhvj4PYeuFJoIr+RTrkWjAqbF+HYaj3T11lV6CU3wa23pPRZ3GPEk6z\n69XmZm6Eo7JRbzwSG1W+cTL0nlRoluXw5mw3Ji/0omT1W60GPQjh7vPXTn21\nkLorbiQHKv9YYn1W+qrlA8XhApR+JXMeAu5seCueafD/x7+aOjB65sxhIvxN\nsj76yeMqLCL8hY3N+TRlMD1173dreUJJRf0/YPP2AVCcXCCeaBfR/84v3PvZ\nIBPkfOo5iGCnQUue2J7/3Q7/jZR6/zZEaQ29o0zJN5BPSY/rXdPxC0u6w5Et\nSvFEnG2IBxsXdAnCeup4At0V4VfIp/pIVo4z2kV/qUQl8hFP4RK2TlgziQqR\nTD+JF5n0kCDzlWoRvbMqLzJ0ZKUUeoE8yI7k5h5FmL8hTXpZx1sQzAyW2Hc9\nOOykx9uM5EEptElZaOGj7CJTc9vjmisNtG+zl1yqPsJIq6NyF0ZtWyaSnAKI\nna6S\r\n=sPc/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAU0AcdGmcgweQoNLjKysaKsh+tUQNTgGmphuE5+qKwHAiEA4AKrpNj3njCqidqYPMNnD7j/4RuYdp2/Ay50H1u4crs="}]},"maintainers":[{"name":"daviwil","email":"daviwil@github.com"},{"name":"binarymuse","email":"michelle@michelletilley.net"},{"name":"kuychaco","email":"kuychaco@gmail.com"},{"name":"atom-team","email":"atom@github.com"},{"name":"smashwilson","email":"smashwilson@gmail.com"},{"name":"nathansobo","email":"nathan@github.com"},{"name":"maxbrunsfeld","email":"maxbrunsfeld@gmail.com"},{"name":"simurai","email":"sim@simurai.com"},{"name":"iolsen","email":"ian.olsen@gmail.com"},{"name":"as-cii","email":"as-cii@github.com"},{"name":"jasonrudolph","email":"jason@jasonrudolph.com"},{"name":"lee-dohm","email":"lee@lee-dohm.com"},{"name":"donokuda","email":"helloyesthisisdon@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/electron-winstaller_0.0.1_1560955360983_0.9235281981099046"},"_hasShrinkwrap":false}},"time":{"created":"2019-06-19T14:42:40.983Z","0.0.1":"2019-06-19T14:42:41.525Z","modified":"2022-04-04T16:14:25.942Z"},"maintainers":[{"email":"mazen.elkashef@gmail.com","name":"kashef"},{"email":"daviwil@github.com","name":"daviwil"},{"email":"michelle@michelletilley.net","name":"binarymuse"},{"email":"kuychaco@gmail.com","name":"kuychaco"},{"email":"atom@github.com","name":"atom-team"},{"email":"smashwilson@gmail.com","name":"smashwilson"},{"email":"nathan@github.com","name":"nathansobo"},{"email":"maxbrunsfeld@gmail.com","name":"maxbrunsfeld"},{"email":"sim@simurai.com","name":"simurai"},{"email":"ian.olsen@gmail.com","name":"iolsen"},{"email":"as-cii@github.com","name":"as-cii"},{"email":"jason@jasonrudolph.com","name":"jasonrudolph"},{"email":"lee@lee-dohm.com","name":"lee-dohm"},{"email":"helloyesthisisdon@gmail.com","name":"donokuda"}],"description":"Module to generate Windows installers for Electron apps","homepage":"https://github.com/electronjs/windows-installer#readme","repository":{"type":"git","url":"git+https://github.com/electronjs/windows-installer.git"},"bugs":{"url":"https://github.com/electronjs/windows-installer/issues"},"license":"MIT","readme":"# Electron Installer\n\n[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/bq6c06suq5abb66s/branch/master?svg=true)](https://ci.appveyor.com/project/electron-bot/windows-installer/branch/master)\n[![Travis CI Build Status](https://travis-ci.org/electron/windows-installer.svg?branch=master)](https://travis-ci.org/electronjs/windows-installer)\n\nNPM module that builds Windows installers for\n[Electron](https://github.com/atom/electron) apps using\n[Squirrel](https://github.com/Squirrel/Squirrel.Windows).\n\n## Installing\n\n```sh\nnpm install --save-dev electron-winstaller\n```\n\n## Usage\n\nRequire the package:\n\n```js\nvar electronInstaller = require('electron-winstaller');\n```\n\nThen do a build like so..\n\n```js\nresultPromise = electronInstaller.createWindowsInstaller({\n    appDirectory: '/tmp/build/my-app-64',\n    outputDirectory: '/tmp/build/installer64',\n    authors: 'My App Inc.',\n    exe: 'myapp.exe'\n  });\n\nresultPromise.then(() => console.log(\"It worked!\"), (e) => console.log(`No dice: ${e.message}`));\n```\n\nAfter running you will have an `.nupkg`, a\n`RELEASES` file, and a `.exe` installer file in the `outputDirectory` folder\nfor each multi task target given under the config entry.\n\nThere are several configuration settings supported:\n\n| Config Name           | Required | Description |\n| --------------------- | -------- | ----------- |\n| `appDirectory`        | Yes      | The folder path of your Electron app |\n| `outputDirectory`     | No       | The folder path to create the `.exe` installer in. Defaults to the `installer` folder at the project root. |\n| `loadingGif`          | No       | The local path to a `.gif` file to display during install. |\n| `authors`             | Yes      | The authors value for the nuget package metadata. Defaults to the `author` field from your app's package.json file when unspecified. |\n| `owners`              | No       | The owners value for the nuget package metadata. Defaults to the `authors` field when unspecified. |\n| `exe`                 | No       | The name of your app's main `.exe` file. This uses the `name` field in your app's package.json file with an added `.exe` extension when unspecified. |\n| `description`         | No       | The description value for the nuget package metadata. Defaults to the `description` field from your app's package.json file when unspecified. |\n| `version`             | No       | The version value for the nuget package metadata. Defaults to the `version` field from your app's package.json file when unspecified. |\n| `title`               | No       | The title value for the nuget package metadata. Defaults to the `productName` field and then the `name` field from your app's package.json file when unspecified. |\n| `name`                | No      | Windows Application Model ID (appId). Defaults to the `name` field in your app's package.json file. |\n| `certificateFile`     | No       | The path to an Authenticode Code Signing Certificate |\n| `certificatePassword` | No       | The password to decrypt the certificate given in `certificateFile` |\n| `signWithParams`      | No       | Params to pass to signtool.  Overrides `certificateFile` and `certificatePassword`. |\n| `iconUrl`             | No       | A URL to an ICO file to use as the application icon (displayed in Control Panel > Programs and Features). Defaults to the Atom icon. |\n| `setupIcon`           | No       | The ICO file to use as the icon for the generated Setup.exe |\n| `skipUpdateIcon`      | No       | Disables setting the icon of `Update.exe`. This can solve installation errors with the following message: \"This application could not be started\", when the setup is built on a non-Windows system. |\n| `setupExe`            | No       | The name to use for the generated Setup.exe file |\n| `setupMsi`            | No       | The name to use for the generated Setup.msi file |\n| `noMsi`               | No       | Should Squirrel.Windows create an MSI installer? |\n| `noDelta`             | No       | Should Squirrel.Windows delta packages? (disable only if necessary, they are a Good Thing) |\n| `remoteReleases`      | No       | A URL to your existing updates. If given, these will be downloaded to create delta updates |\n| `remoteToken`         | No       | Authentication token for remote updates |\n| `frameworkVersion`    | No       | Set the required .NET framework version, e.g. `net461` |\n\n## Sign your installer or else bad things will happen\n\nFor development / internal use, creating installers without a signature is okay, but for a production app you need to sign your application. Internet Explorer's SmartScreen filter will block your app from being downloaded, and many anti-virus vendors will consider your app as malware unless you obtain a valid cert.\n\nAny certificate valid for \"Authenticode Code Signing\" will work here, but if you get the right kind of code certificate, you can also opt-in to [Windows Error Reporting](http://en.wikipedia.org/wiki/Windows_Error_Reporting). [This MSDN page](http://msdn.microsoft.com/en-us/library/windows/hardware/hh801887.aspx) has the latest links on where to get a WER-compatible certificate. The \"Standard Code Signing\" certificate is sufficient for this purpose.\n\n## Handling Squirrel Events\n\nSquirrel will spawn your app with command line flags on first run, updates,\nand uninstalls. it is **very** important that your app handle these events as _early_\nas possible, and quit **immediately** after handling them. Squirrel will give your\napp a short amount of time (~15sec) to apply these operations and quit.\n\nThe [electron-squirrel-startup](https://github.com/mongodb-js/electron-squirrel-startup) module will handle\nthe most common events for you, such as managing desktop shortcuts.  Just\nadd the following to the top of your `main.js` and you're good to go:\n\n```js\nif (require('electron-squirrel-startup')) return;\n```\n\nYou should handle these events in your app's `main` entry point with something\nsuch as:\n\n```js\nconst app = require('app');\n\n// this should be placed at top of main.js to handle setup events quickly\nif (handleSquirrelEvent()) {\n  // squirrel event handled and app will exit in 1000ms, so don't do anything else\n  return;\n}\n\nfunction handleSquirrelEvent() {\n  if (process.argv.length === 1) {\n    return false;\n  }\n\n  const ChildProcess = require('child_process');\n  const path = require('path');\n\n  const appFolder = path.resolve(process.execPath, '..');\n  const rootAtomFolder = path.resolve(appFolder, '..');\n  const updateDotExe = path.resolve(path.join(rootAtomFolder, 'Update.exe'));\n  const exeName = path.basename(process.execPath);\n\n  const spawn = function(command, args) {\n    let spawnedProcess, error;\n\n    try {\n      spawnedProcess = ChildProcess.spawn(command, args, {detached: true});\n    } catch (error) {}\n\n    return spawnedProcess;\n  };\n\n  const spawnUpdate = function(args) {\n    return spawn(updateDotExe, args);\n  };\n\n  const squirrelEvent = process.argv[1];\n  switch (squirrelEvent) {\n    case '--squirrel-install':\n    case '--squirrel-updated':\n      // Optionally do things such as:\n      // - Add your .exe to the PATH\n      // - Write to the registry for things like file associations and\n      //   explorer context menus\n\n      // Install desktop and start menu shortcuts\n      spawnUpdate(['--createShortcut', exeName]);\n\n      setTimeout(app.quit, 1000);\n      return true;\n\n    case '--squirrel-uninstall':\n      // Undo anything you did in the --squirrel-install and\n      // --squirrel-updated handlers\n\n      // Remove desktop and start menu shortcuts\n      spawnUpdate(['--removeShortcut', exeName]);\n\n      setTimeout(app.quit, 1000);\n      return true;\n\n    case '--squirrel-obsolete':\n      // This is called on the outgoing version of your app before\n      // we update to the new version - it's the opposite of\n      // --squirrel-updated\n\n      app.quit();\n      return true;\n  }\n};\n```\n\nNotice that the first time the installer launches your app, your app will see a ```--squirrel-firstrun``` flag. This allows you to do things like showing up a splash screen or presenting a settings UI. Another thing to be aware of is that, since the app is spawned by squirrel and squirrel acquires a file lock during installation, you won't be able to successfully check for app updates till a few seconds later when squirrel releases the lock.\n\n## Debugging this package\n\nYou can get debug messages from this package by running with the environment variable `DEBUG=electron-windows-installer:main` e.g.\n\n```\nDEBUG=electron-windows-installer:main node tasks/electron-winstaller.js\n```\n","readmeFilename":"README.md"}