Coder Social home page Coder Social logo

windows-installer's Introduction

Electron Installer

CircleCI NPM package

NPM module that builds Windows installers for Electron apps using Squirrel.

Installing

npm install --save-dev electron-winstaller

Usage

Require the package:

const electronInstaller = require('electron-winstaller');

Then do a build like so..

// NB: Use this syntax within an async function, Node does not have support for
//     top-level await as of Node 12.
try {
  await electronInstaller.createWindowsInstaller({
    appDirectory: '/tmp/build/my-app-64',
    outputDirectory: '/tmp/build/installer64',
    authors: 'My App Inc.',
    exe: 'myapp.exe'
  });
  console.log('It worked!');
} catch (e) {
  console.log(`No dice: ${e.message}`);
}

After running you will have an .nupkg, a RELEASES file, and a .exe installer file in the outputDirectory folder for each multi task target given under the config entry.

There are several configuration settings supported:

Config Name Required Description
appDirectory Yes The folder path of your Electron app
outputDirectory No The folder path to create the .exe installer in. Defaults to the installer folder at the project root.
loadingGif No The local path to a .gif file to display during install.
authors Yes The authors value for the nuget package metadata. Defaults to the author field from your app's package.json file when unspecified.
owners No The owners value for the nuget package metadata. Defaults to the authors field when unspecified.
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.
description No The description value for the nuget package metadata. Defaults to the description field from your app's package.json file when unspecified.
version No The version value for the nuget package metadata. Defaults to the version field from your app's package.json file when unspecified.
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.
name No Windows Application Model ID (appId). Defaults to the name field in your app's package.json file.
certificateFile No The path to an Authenticode Code Signing Certificate
certificatePassword No The password to decrypt the certificate given in certificateFile
signWithParams No Params to pass to signtool. Overrides certificateFile and certificatePassword.
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.
setupIcon No The ICO file to use as the icon for the generated Setup.exe
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.
setupExe No The name to use for the generated Setup.exe file
setupMsi No The name to use for the generated Setup.msi file
noMsi No Should Squirrel.Windows create an MSI installer?
noDelta No Should Squirrel.Windows delta packages? (disable only if necessary, they are a Good Thing)
remoteReleases No A URL to your existing updates. If given, these will be downloaded to create delta updates
remoteToken No Authentication token for remote updates
frameworkVersion No Set the required .NET framework version, e.g. net461
windowsSign No Use @electron/windows-sign for advanced codesigning. See documentation for details.

Sign your installer or else bad things will happen

For 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.

Any 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. This MSDN page has the latest links on where to get a WER-compatible certificate. The "Standard Code Signing" certificate is sufficient for this purpose.

Handling Squirrel Events

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 module will handle the most common events for you, such as managing desktop shortcuts. Add the following to the top of your main.js and you're good to go:

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

You should handle these events in your app's main entry point with something such as:

const app = require('app');

// this should be placed at top of main.js to handle setup events quickly
if (handleSquirrelEvent()) {
  // squirrel event handled and app will exit in 1000ms, so don't do anything else
  return;
}

function handleSquirrelEvent() {
  if (process.argv.length === 1) {
    return false;
  }

  const ChildProcess = require('child_process');
  const path = require('path');

  const appFolder = path.resolve(process.execPath, '..');
  const rootAtomFolder = path.resolve(appFolder, '..');
  const updateDotExe = path.resolve(path.join(rootAtomFolder, 'Update.exe'));
  const exeName = path.basename(process.execPath);

  const spawn = function(command, args) {
    let spawnedProcess, error;

    try {
      spawnedProcess = ChildProcess.spawn(command, args, {detached: true});
    } catch (error) {}

    return spawnedProcess;
  };

  const spawnUpdate = function(args) {
    return spawn(updateDotExe, args);
  };

  const squirrelEvent = process.argv[1];
  switch (squirrelEvent) {
    case '--squirrel-install':
    case '--squirrel-updated':
      // Optionally do things such as:
      // - Add your .exe to the PATH
      // - Write to the registry for things like file associations and
      //   explorer context menus

      // Install desktop and start menu shortcuts
      spawnUpdate(['--createShortcut', exeName]);

      setTimeout(app.quit, 1000);
      return true;

    case '--squirrel-uninstall':
      // Undo anything you did in the --squirrel-install and
      // --squirrel-updated handlers

      // Remove desktop and start menu shortcuts
      spawnUpdate(['--removeShortcut', exeName]);

      setTimeout(app.quit, 1000);
      return true;

    case '--squirrel-obsolete':
      // This is called on the outgoing version of your app before
      // we update to the new version - it's the opposite of
      // --squirrel-updated

      app.quit();
      return true;
  }
};

Notice 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.

Advanced codesigning with @electron/windows-sign

This package supports two different ways to codesign your application and the installer:

  1. Modern: By passing a windowsSign option, which will be passed to @electron/windows-sign. This method allows full customization of the code-signing process - and supports more complicated scenarios like cloud-hosted EV certificates, custom sign pipelines, and per-file overrides. It also supports all existing "simple" codesigning scenarios, including just passing a certificate file and password. Please see https://github.com/@electron/windows-sign for all possible configuration options.

    When passing windowsSign, do not pass any other available parameters at the top level (like certificateFile, certificatePassword, or signWithParams).

  2. Legacy: By passing the top-level settings (certificateFile, certificatePassword, and signWithParams). For simple codesigning scenarios, there's no reason not to use this method - it'll work just as fine as the modern method.

Debugging this package

You can get debug messages from this package by running with the environment variable DEBUG=electron-windows-installer:main e.g.

DEBUG=electron-windows-installer:main node tasks/electron-winstaller.js

windows-installer's People

Contributors

anaisbetts avatar bursauxa avatar damieng avatar dependabot[bot] avatar develar avatar dsanders11 avatar electron-roller[bot] avatar erickzhao avatar fscherwi avatar georgexu99 avatar havenchyk avatar kevinsawicki avatar lukeapage avatar lukpsaxo avatar malept avatar marshallofsound avatar matsnow avatar maxbrunsfeld avatar niik avatar rbkreisberg avatar rickymohk avatar ssboisen avatar techninja avatar tnm avatar trodi avatar vasumahesh1 avatar vhashimotoo avatar voldmar avatar zcbenz avatar zhenchaoli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

windows-installer's Issues

The input package file targets no platform and cannot be transformed into a release package

When building an installer on Debian stable (Debian GNU/Linux 8.3) I get
the following error:

No dice: Failed with exit code: 255
Output:
System.InvalidOperationException: The input package file /mnt/data1/devel/electron-quick-start/installer/electron-quick-start.1.0.0.nupkg targets no platform and cannot be transformed into a release package.
  at Squirrel.ReleasePackage.CreateReleasePackage (System.String outputFile, System.String packagesRootDir, System.Func`2 releaseNotesProcessor, System.Action`1 contentsPostProcessHook) [0x00000] in <filename unknown>:0 
  at Squirrel.Update.Program.Releasify (System.String package, System.String targetDir, System.String packagesDir, System.String bootstrapperExe, System.String backgroundGif, System.String signingOpts, System.String baseUrl, System.String setupIcon, Boolean generateMsi) [0x00000] in <filename unknown>:0 
  at Squirrel.Update.Program.executeCommandLine (System.String[] args) [0x00000] in <filename unknown>:0 
  at Squirrel.Update.Program.main (System.String[] args) [0x00000] in <filename unknown>:0 

How to reproduce:

git clone https://github.com/electron/electron-quick-start.git
cd electron-quick-start
npm install --save-dev electron-winstaller
electron-packager . electron-quick-start --platform win32 --arch x64 --out dist --version 0.37.4 --overwrite
node electron-winstaller.js

electron-winstaller.js:

var electronInstaller = require('electron-winstaller');

resultPromise = electronInstaller.createWindowsInstaller({
  appDirectory: 'dist/electron-quick-start-win32-x64',
  outputDirectory: 'installer',
  authors: '',
  exe: 'electron-quick-start.exe'
});

resultPromise.then(() => console.log("It worked!"), (e) => console.log(`No dice: ${e.message}`));

electron-packager is in version 6.0.0. mono and wine are both installed on the
system, but I am not sure if some other packages are required as well:

mono-runtime          3.2.8+dfsg-10
mono-devel            3.2.8+dfsg-10
mono-4.0-gac          3.2.8+dfsg-10
mono-utils            3.2.8+dfsg-10
wine                  1.6.2-20
wine32                1.6.2-20
wine32-dev-tools      1.6.2-20
wine32-development    1.7.29-4
wine32-tools          1.6.2-20

uname -a:

Linux localhost 4.3.0-0.bpo.1-amd64 #1 SMP Debian 4.3.5-1~bpo8+1 (2016-02-23) x86_64 GNU/Linux

SyntaxError: Unexpected strict mode reserved word when using with grunt-electron-installer

Hey guys,

I am trying to use grunt-electron-installer and it's latest release build is crashing at electron-winstaller's index.js:10. Here is the output:

Loading "index.js" tasks...ERROR
>> SyntaxError: P:\electron-proj\node_modules\grunt-electron-installer\node_modules\electron-winstaller\lib\index.js:10
>> let createWindowsInstaller = exports.createWindowsInstaller = (() => {
>> ^^^
>> Unexpected strict mode reserved word
Warning: Task "create-windows-installer:x64" not found. Use --force to continue.

Aborted due to warnings.

I am on a very old node version(v0.12.10) due to other dependency issues.

Any word on the issue?

System.IO.IOException: The file 'C:\Users\appveyor\AppData\Local\Temp\1\tmp35CE.tmp' already exists

electron-builder tests very often failed because of error https://ci.appveyor.com/project/stefanjudis/electron-builder/build/1.0.247#L502

@paulcbetts Do you have any clue why? May be Squirrel.Windows cannot be run in parallel?

Output:
Done Adding Additional Store
Successfully signed: C:\Users\appveyor\AppData\Local\SquirrelTemp\tempd\lib\net45\TestApp.exe
Done Adding Additional Store
Successfully signed: C:\Users\appveyor\AppData\Local\SquirrelTemp\tempd\lib\net45\squirrel.exe
Done Adding Additional Store
Successfully signed: C:\Users\appveyor\AppData\Local\SquirrelTemp\tempa\Update.exe
System.AggregateException: One or more errors occurred. ---> System.IO.IOException: The file 'C:\Users\appveyor\AppData\Local\Temp\1\tmp35CE.tmp' already exists.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at System.IO.Compression.ZipFile.Open(String archiveFileName, ZipArchiveMode mode, Encoding entryNameEncoding)
   at System.IO.Compression.ZipFile.DoCreateFromDirectory(String sourceDirectoryName, String destinationArchiveFileName, Nullable`1 compressionLevel, Boolean includeBaseDirectory, Encoding entryNameEncoding)
   at Squirrel.Update.Program.<>c__DisplayClass91.<createSetupEmbeddedZip>b__89()
   at Squirrel.Utility.LogIfThrows(IFullLogger This, LogLevel level, String message, Action block)
   at Squirrel.Update.Program.<createSetupEmbeddedZip>d__93.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at Squirrel.Update.Program.Releasify(String package, String targetDir, String packagesDir, String bootstrapperExe, String backgroundGif, String signingOpts, String baseUrl, String setupIcon, Boolean generateMsi)
   at Squirrel.Update.Program.executeCommandLine(String[] args)
   at Squirrel.Update.Program.main(String[] args)
   at Squirrel.Update.Program.Main(String[] args)
---> (Inner Exception #0) System.IO.IOException: The file 'C:\Users\appveyor\AppData\Local\Temp\1\tmp35CE.tmp' already exists.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at System.IO.Compression.ZipFile.Open(String archiveFileName, ZipArchiveMode mode, Encoding entryNameEncoding)
   at System.IO.Compression.ZipFile.DoCreateFromDirectory(String sourceDirectoryName, String destinationArchiveFileName, Nullable`1 compressionLevel, Boolean includeBaseDirectory, Encoding entryNameEncoding)
   at Squirrel.Update.Program.<>c__DisplayClass91.<createSetupEmbeddedZip>b__89()
   at Squirrel.Utility.LogIfThrows(IFullLogger This, LogLevel level, String message, Action block)
   at Squirrel.Update.Program.<createSetupEmbeddedZip>d__93.MoveNext()<---

Takes a long time to boot the app

The boot time on my app is pretty bad, and it shows this screen each time:
screen shot 2016-05-08 at 9 09 46 pm

What can I do to speed up the boot? It looks to me like it's installing the application before allowing it to run?

Package not published on npm

Contrary to the README.md instructions, this command fails.

npm install --save-dev electron-winstaller

Will it be published soon?

v2.0.5 fails with "[TypeError: Cannot read property 'description' of null]"

Running electronInstaller.createWindowsInstaller fails with [TypeError: Cannot read property 'description' of null]. I have tried to experiment by providing different options to the method but without success.

This is where the code fails in the compiled version. The appMetadata seems to have null value:

case 41:
  defaults = {
    // it fails here where appMetadata value is null
    description: appMetadata.description || '',
    exe: appMetadata.name + '.exe',
    iconUrl: 'https://raw.githubusercontent.com/atom/electron/master/atom/browser/resources/win/atom.ico',
    title: appMetadata.productName || appMetadata.name
  };
  metadata = _lodash2.default.defaults({}, options, defaults, appMetadata);


  if (!metadata.authors) {
    if (typeof metadata.author === 'string') {
      metadata.authors = metadata.author;
    } else {
      metadata.authors = (metadata.author || {}).name || '';
    }
  }

  metadata.owners = metadata.owners || metadata.authors;
  metadata.version = convertVersion(metadata.version);
  metadata.copyright = metadata.copyright || 'Copyright © ' + new Date().getFullYear() + ' ' + (metadata.authors || metadata.owners);

  _context3.t2 = _lodash2.default;
  _context3.next = 50;
  return _fsJetpack2.default.readAsync(_path2.default.join(__dirname, '..', 'template.nuspec'));

You must install both Mono and Wine on non-Windows

[luncher@localhost build]$ ./build_installer.sh
You must install both Mono and Wine on non-Windows
[luncher@localhost build]$ cat build_installer.sh

!/usr/bin/env node

var electronInstaller = require('electron-winstaller');

electronInstaller.createWindowsInstaller({
appDirectory: './package/HolaStudio-win32-x64/',
outputDirectory: './installer/',
authors: 'Holaverse Tech Inc. ',
exe: 'HolaStudio.exe'
}).then(function() {
console.log("build done");
}, function(err) {
console.log(err.message);
});

Both tools are necessary to install it? My computer is fedora system.

Error on OS X: "System.DllNotFoundException: msdelta.dll"

$ wine --version
wine-1.8.1
$ mono --version
Mono JIT compiler version 4.2.3 (Stable 4.2.3.4/832de4b Wed Mar 30 13:57:48 PDT 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           normal
    SIGSEGV:       altstack
    Notification:  kqueue
    Architecture:  amd64
    Disabled:      none
    Misc:          softdebug 
    LLVM:          supported, not enabled.
    GC:            sgen

Any ideas?

$ DEBUG=electron-windows-installer:main npm run package -- win32 
  electron-windows-installer:main Using Mono: '/usr/local/bin/mono' +0ms
  electron-windows-installer:main Using Wine: '/usr/local/bin/wine' +2ms
  electron-windows-installer:main Created NuSpec file:
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
  <metadata>
    <id>WebTorrent</id>
    <title>WebTorrent</title>
    <version>0.2.0</version>
    <authors>The WebTorrent Project</authors>
    <owners>The WebTorrent Project</owners>
    <iconUrl>https://raw.githubusercontent.com/feross/webtorrent-desktop/master/static/WebTorrent.ico</iconUrl>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>WebTorrent</description>
    <copyright>Copyright © 2016 The WebTorrent Project</copyright>
  </metadata>
  <files>
    <file src="locales/**" target="lib/net45/locales" />
    <file src="resources/**" target="lib/net45/resources" />
    <file src="*.bin" target="lib/net45" />
    <file src="*.dll" target="lib/net45" />
    <file src="*.pak" target="lib/net45" />
    <file src="Update.exe" target="lib/net45/squirrel.exe" />
    <file src="icudtl.dat" target="lib/net45/icudtl.dat" />
    <file src="LICENSE" target="lib/net45/LICENSE" />
    <file src="WebTorrent.exe" target="lib/net45/WebTorrent.exe" />
  </files>
</package>
 +53ms
  electron-windows-installer:main Attempting to build package from 'WebTorrent.nuspec'.
Successfully created package '/var/folders/n9/tqh670d16c3bd5853qgbvz1w0000gn/T/si-11635-82019-17kbzp6/WebTorrent.0.2.0.nupkg'.
 +24s
  electron-windows-installer:main  +17s
Failed with exit code: 255
Output:
System.DllNotFoundException: msdelta.dll
  at (wrapper managed-to-native) DeltaCompressionDotNet.MsDelta.NativeMethods:CreateDelta (DeltaCompressionDotNet.MsDelta.FileTypeSet,long,long,string,string,string,string,DeltaCompressionDotNet.MsDelta.DeltaInput,intptr,DeltaCompressionDotNet.MsDelta.HashAlgId,string)
  at DeltaCompressionDotNet.MsDelta.MsDeltaCompression.CreateDelta (System.String oldFilePath, System.String newFilePath, System.String deltaFilePath) <0x1063ef5e0 + 0x0007b> in <filename unknown>:0 
  at Squirrel.DeltaPackageBuilder.createDeltaForSingleFile (System.IO.FileInfo targetFile, System.IO.DirectoryInfo workingDirectory, System.Collections.Generic.Dictionary`2 baseFileListing) <0x1063eea40 + 0x003b0> in <filename unknown>:0 
  at Squirrel.DeltaPackageBuilder.CreateDeltaPackage (Squirrel.ReleasePackage basePackage, Squirrel.ReleasePackage newPackage, System.String outputFile) <0x1063c1dc0 + 0x006f9> in <filename unknown>:0 
  at Squirrel.Update.Program.Releasify (System.String package, System.String targetDir, System.String packagesDir, System.String bootstrapperExe, System.String backgroundGif, System.String signingOpts, System.String baseUrl, System.String setupIcon, Boolean generateMsi) <0x1052a8f60 + 0x00b5a> in <filename unknown>:0 
  at Squirrel.Update.Program.executeCommandLine (System.String[] args) <0x102a10930 + 0x0173e> in <filename unknown>:0 
  at Squirrel.Update.Program.main (System.String[] args) <0x102a0c260 + 0x0027a> in <filename unknown>:0 

Update asar dep to ~0.11.0

To fix the following install warning:

npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

Windows Installer Hanging on Mono Command

I'm using windows-installer through electron-builder. My installation appears to be hanging at the step seen in https://github.com/electron/windows-installer/blob/master/src/index.js#L151. I'm running windows-installer with the debug flag, and I very quickly get to the output for 'Created NuSpec file'.

Running ps | grep mono, I see that the mono pack command continues to run indefinitely (At the time of writing this, it's been going for over 10 minutes). Any ideas what might be causing this? I'm running this on a mac and have installed mono using brew. Mono version is 4.2.0.

Is codesigning supposed to work from non-windows?

When I try to build the app from a non-windows machine (Ubuntu 15.10 in this case), I get the following error:

Error: Failed with exit code: 255
Output:
System.AggregateException: One or more errors occurred. ---> System.Exception: Failed to sign, command invoked was: '[path censored]/node_modules/electron-winstaller/vendor/signtool.exe sign /a /f "/[path censored]/build/codesigningcertificate.pfx" /p "[password censored]" [path truncated]/.local/share/SquirrelTemp/tempa/lib/net45/[filename censored].exe'

There's also a long stacktrace not included for the sake of brevity.

Release notes exception

Hi, I've got this exception

2016-03-22 12:35:34> UpdateInfo: Couldn't get release notes for:MuApp-0.0.2-full.nupkg: System.Exception: Invalid 'ReleaseNotes' value in nuspec file at 'C:\Users\Uladzimir_Havenchyk\AppData\Local\MuApp\packages\MuApp-0.0.2-full.nupkg'
   at Squirrel.ReleaseEntry.GetReleaseNotes(String packageDirectory)
   at Squirrel.UpdateInfo.<FetchReleaseNotes>b__2(ReleaseEntry x)

@paulcbetts could you please clarify, what's going on and how to fix it?

Path error when building on Windows

I am getting a path error when I try to build on a Windows machine. It seems to be double-including the project path for some reason:

Error: Path to copy doesn't exist 
C:\Users\*username*\*appfolder*\Users\*username*\*appfolder*\node_modules\electron-winstaller\vendor\Update.exe]

The correct path should be:

C:\Users\*username*\*appfolder*\node_modules\electron-winstaller\vendor\Update.exe

Where *username* is my Windows machine username and *appfolder* is the root folder of the app.

Huge difference in delta file size for x64

Hi,
I had been creating the installer for both the windows ia32 and x64 arch.
For some reasons the delta file generated for my x64 architecture is too big.

For me: size of
V1 ia32 = 43mb,
v1 x64 = 96mb

This huge difference itself weird for me of same code base.

On V2 delta ia32 = 22kb,
v2 delta x64 = 50mb

Can someone help me out?

var electronInstaller = require('electron-winstaller');

resultPromise =   electronInstaller.createWindowsInstaller({
      appDirectory: applicationDirectory,
      outputDirectory: outDirectory,
      authors: AuthurName,
      setupExe: setupExeName,
      noMsi: true,
      exe: exeName,
      remoteReleases:releaseURL 
  });

resultPromise.then(() => console.log("Installer created for "+ packageName + ' '+ channel +' '+platform),
                  (e) => console.log(`No dice: ${e.message}`));

Windows installer creation fails under OS X

Running windows-installer through electron-builder doesnt work creating the installer for Windows (both 32 and 64) under OS X. OS X installer creation works, is just the windows one:

    Packaging app for platform win32 x64 using electron v0.37.2
    Error: Failed with exit code: 1
    Output:
    Intentando compilar el paquete desde 'xxxxxx.nuspec'. 
    ManifestMetadata is required.
    ManifestMetadata is required.
        at ChildProcess.<anonymous> (/usr/local/lib/node_modules/electron-builder/node_modules/electron-winstaller-fixed/lib/spawn-promise.js:59:16)
        at emitTwo (events.js:100:13)
        at ChildProcess.emit (events.js:185:7)
        at maybeClose (internal/child_process.js:821:16)
        at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
    From previous event:
        at processImmediate [as _immediateCallback] (timers.js:383:17)
    From previous event:
        at Object.createWindowsInstaller (/usr/local/lib/node_modules/electron-builder/node_modules/electron-winstaller-fixed/lib/index.js:207:16)
        at WinPackager.<anonymous> (/usr/local/lib/node_modules/electron-builder/src/winPackager.ts:123:50)
        at [object Generator].next (native)
    From previous event:
        at tsAwaiter (/usr/local/lib/node_modules/electron-builder/src/awaiter.ts:10:51)
        at Object.build (/usr/local/lib/node_modules/electron-builder/src/builder.ts:30:55)
        at Object.<anonymous> (/usr/local/lib/node_modules/electron-builder/src/build-cli.ts:41:2)
        at Module._compile (module.js:413:34)
        at Object.Module._extensions..js (module.js:422:10)
        at Module.load (module.js:357:32)
        at Function.Module._load (module.js:314:12)
        at Function.Module.runMain (module.js:447:10)
        at startup (node.js:139:18)
        at node.js:999:3

Related to:
electron-userland/electron-builder#258

build with remoteReleases

{"win": {
      "remoteReleases": "http://sdfdsfdsfdsf/update/win64/1.0.3/stable"
    }}

with electron-release-server

npm 3.8.6
node 6.0.0
error:

Packaging app for platform win32 x64 using electron v0.37.8
Attemping to sync URL as remote RELEASES folder
Error: G:\dfg\dfg\node_modules\electron-winstaller-fixed\vendor\Updat
e.com failed with exit code: 4294967295
at ChildProcess.proc.on.code (G:\dfg\dfg\node_modules\electron-wi
nstaller-fixed\lib\spawn-promise.js:33:16)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:850:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
From previous event:
at spawn (G:\dfg\dfg\node_modules\electron-winstaller-fixed\lib\s
pawn-promise.js:22:10)
at G:\dfg\dfg\node_modules\electron-winstaller-fixed\lib\index.js
:168:38
at undefined.next (native)
From previous event:
at releasify (G:\dfg\dfg\node_modules\electron-winstaller-fixed\l
ib\index.js:171:16)
at Object. (G:\dfg\dfg\node_modules\electron-winstalle
r-fixed\lib\index.js:94:11)
From previous event:
at Object.createWindowsInstaller (G:\dfg\dfg\node_modules\electro
n-winstaller-fixed\lib\index.js:118:16)
at WinPackager. (G:\dfg\dfg\node_modules\electron-buil
der\src\winPackager.ts:161:48)
at undefined.next (native)
at tryOnImmediate (timers.js:543:15)
at processImmediate as _immediateCallback
From previous event:
at tsAwaiter (G:\dfg\dfg\node_modules\electron-builder\src\awaite
r.ts:10:47)
at Object.build (G:\dfg\dfg\node_modules\electron-builder\src\bui
lder.ts:30:59)
at Object. (G:\dfg\dfg\node_modules\electron-builder\s
rc\build-cli.ts:47:2)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Function.Module.runMain (module.js:575:10)
at startup (node.js:159:18)

Error while copying Update.exe

During running createWindowsInstaller error appears:

Error: Path to copy doesn't exist C:\Users\usr\Documents\Projects\bakaru\Users\usr\Documents\Projects\bakaru\node_modules\electron-winstaller\vendor\Update.exe] code: 'ENOENT'

It is produced by fs-jetpack/lib/copy.js#33:15, and surely this path doesn't exist, because path somehow has been doubled.

Advanced updating support

Squirrel supports "advanced updating" (e.g. asking the user if he wants to download the update, apply the update, etc), see: https://github.com/Squirrel/Squirrel.Windows/blob/master/docs/using/update-manager.md#advanced-updating

I'd like to ask user if he wants to download and apply an update. How that can be managed? I guess that app is spawn with --squirrel-updated parameter when the update is done (so update already downloaded and installed). It's correct?

If so, how that can be obtained?

Invalid URI error?!

electron-installer-windows --src release/win32-x64/app-win32-x64 --dest dist/installers/ --options.version 0.1

Creating package (this may take a while)
[Error: Error creating package: Error executing file (1):


electron-installer-windows\vendor\nuget\NuGet.exe pack C:\Users\\AppData\Local\Temp\electron-116418-7308-13rc54g\app_0.1\nuget\xcheque-dev-tools.nuspec -BasePath C:\Users\user\AppData\Local\Temp\electron-116418-7308-13rc54g\app_0.1\app -OutputDirectory C:\Users\scheeren\AppData\Local\Temp\electron-116418-7308-13rc54g\xcheque-dev-tools_0.1\nuget -NoDefaultExcludes
Invalid URI: The format of the URI could not be determined.
] 'Error: Error creating package: Error executing file (1):   \\nuget -NoDefaultExcludes\nInvalid URI: The format of the URI could not be determined.\r\n\n    at D:\\Projects\\app\\node_modules\\electron-installer-windows\\src\\installer.js:273:21\n    at ChildProcess.<anonymous> (D:\\Projects\\app\\node_modules\\electron-installer-windows\\src\\installer.js:62:5)\n    at emitTwo (events.js:92:20)\n    at ChildProcess.emit (events.js:172:7)\n    at maybeClose (internal/child_process.js:817:16)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)'

under app-win32-x64 folder i have the .exe, the dlls, the resources folder with the app.asar file inside

Icon inconsistency

Pretty minor thing, but iconUrl accepts a URL whereas setupIcon accepts a local resource. It would be nice if they could both accept a URL.

Also this could be better documented (happy to submit a PR for that later)

Installer created on non-windows doesn't install

I created an installer on a non-windows machine (Ubuntu 15.10 in this case) and tried to run the installer on a Windows machine. It loads up the default electron gif and then closes and nothing happens or installs.

Is there a debug file I can provide?

Build fails for applications with deep dependencies

Attempting to build package from 'bridge.nuspec'.
The specified path, file name, or both are too long. The fully qualified file na
me must be less than 260 characters, and the directory name must be less than 24
8 characters.

I'm getting this error when attempting to build my application on Windows. I'm using the latest version of npm, have run npm dedupe to flatten the dependency tree as much as possible, and have put the project directly in the C:\ drive of the system.

What else can be done to fix this?

App not being built

I'm using 2.0.2 build, but still the release folder is not being created. It seems there is some problem with Jetpack maybe?

Some console.log debugging in the generated files (lib/index.js) in the createWindowsInstaller function gives this output:

CONTEXT3 0 -> 0
CONTEXT3 0 -> 3
CONTEXT3 3 -> 6
CONTEXT3 13 -> end             

which I got by putting this:

console.log('CONTEXT3', _context3.prev, '->', _context3.next);

in the generated files in the first line of the function:

174:   ...
175:   return _regenerator2.default.wrap(function _callee3$(_context3) {
176:      console.log('CONTEXT3', _context3.prev, '->', _context3.next);
177:      while (1) {

Seems like the control is not going beyond this line:

await jetpack.copyAsync(
    p`${__dirname}/../vendor/Update.exe`,
    p`${appDirectory}/Update.exe`);

Could not load file or assembly 'Microsoft.Build`

[luncher@localhost build]$ ./build_installer.sh
Failed with exit code: 1
Output:
Could not load file or assembly 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

[luncher@localhost build]$ cat build_installer.sh

!/usr/bin/env node

var electronInstaller = require('electron-winstaller');

electronInstaller.createWindowsInstaller({
appDirectory: './package/HolaStudio-win32-x64/',
outputDirectory: './installer/',
authors: 'Holaverse Tech Inc. ',
exe: 'HolaStudio.exe'
}).then(function() {
console.log("build done");
}, function(err) {
console.log(err.message);
});

remoteReleases Fails to Sync URL

When specifying a remoteReleases URL I'm receiving the following error:

Attemping to sync URL as remote RELEASES folder
Failed to sync URL as GitHub repo: Repo URL must be to the root URL of the repo e.g. https://github.com/myuser/myrepo

However, I'm not using a GitHub repo for my releases but https://github.com/ArekSredzki/electron-release-server

I've verified the URL used is returning the expected data for releases, but continue to receive this error. Is there a way to use non-GitHub release servers?

Error parsing EntityName from nuspec file

Hey,

I'm getting the following error when trying to build an installer...

[START] Electron Winstaller
  electron-windows-installer:main Using Mono: 'mono' +0ms
  electron-windows-installer:main Using Wine: 'wine' +3ms
  electron-windows-installer:main Created NuSpec file:
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
  <metadata>
    <id>wmail</id>
    <title>wmail</title>
    <version>1.2.4</version>
    <authors>Thomas Beverley</authors>
    <owners>Thomas Beverley</owners>
    <iconUrl>https://raw.githubusercontent.com/atom/electron/master/atom/browser/resources/win/atom.ico</iconUrl>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>The missing desktop client for Gmail &amp; Google Inbox</description>
    <copyright>Copyright © 2016 Thomas Beverley</copyright>
  </metadata>
  <files>
    <file src="locales/**" target="lib/net45/locales" />
    <file src="resources/**" target="lib/net45/resources" />
    <file src="*.bin" target="lib/net45" />
    <file src="*.dll" target="lib/net45" />
    <file src="*.pak" target="lib/net45" />
    <file src="Update.exe" target="lib/net45/squirrel.exe" />
    <file src="icudtl.dat" target="lib/net45/icudtl.dat" />
    <file src="LICENSE" target="lib/net45/LICENSE" />
    <file src="wmail.exe" target="lib/net45/wmail.exe" />
  </files>
</package>
 +7s
[Error: Failed with exit code: 1
Output:
Attempting to build package from 'wmail.nuspec'.
An error occurred while parsing EntityName. Line 1, position 39.
]

Has anyone else seen this? I'm using el-capitan with mono 4.2.3

Failed to sign

Not sure where to post this so starting here. When I try to sign our build using certificateFile and certificatePassword I get the following stack trace:

Failed with exit code: 4294967295
System.AggregateException: One or more errors occurred. ---> System.Exception: Failed to sign, command invoked was: 'C:\Users\John\Documents\GitHub\shrimp\node_modules\electron-winstaller\vendor\signtool.exe sign /a /f "C:\Users\John\Documents\GitHub\shrimp\cert.pfx" /p "fake-pass" C:\Users\John\AppData\Local\SquirrelTemp\tempb\lib\net45\shrimp.exe'
   at Squirrel.Update.Program.<signPEFile>d__9a.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Squirrel.Utility.<>c__DisplayClass1e`1.<>c__DisplayClass20.<<ForEachAsync>b__1d>d__22.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Squirrel.Update.Program.<>c__DisplayClass78.<Releasify>b__6a(String pkgPath)
   at Squirrel.ReleasePackage.CreateReleasePackage(String outputFile, String packagesRootDir, Func`2 releaseNotesProcessor, Action`1 contentsPostProcessHook)
   at Squirrel.Update.Program.Releasify(String package, String targetDir, String packagesDir, String bootstrapperExe, String backgroundGif, String signingOpts, String baseUrl, String setupIcon, Boolean generateMsi)
   at Squirrel.Update.Program.executeCommandLine(String[] args)
   at Squirrel.Update.Program.main(String[] args)
   at Squirrel.Update.Program.Main(String[] args)
---> (Inner Exception #0) System.Exception: Failed to sign, command invoked was: 'C:\Users\John\Documents\GitHub\shrimp\node_modules\electron-winstaller\vendor\signtool.exe sign /a /f "C:\Users\John\Documents\GitHub\shrimp\cert.pfx" /p "fake-pass" C:\Users\John\AppData\Local\SquirrelTemp\tempb\lib\net45\shrimp.exe'
   at Squirrel.Update.Program.<signPEFile>d__9a.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Squirrel.Utility.<>c__DisplayClass1e`1.<>c__DisplayClass20.<<ForEachAsync>b__1d>d__22.MoveNext()<---

---> (Inner Exception #1) System.Exception: Failed to sign, command invoked was: 'C:\Users\John\Documents\GitHub\shrimp\node_modules\electron-winstaller\vendor\signtool.exe sign /a /f "C:\Users\John\Documents\GitHub\shrimp\cert.pfx" /p "fake-pass" C:\Users\John\AppData\Local\SquirrelTemp\tempb\lib\net45\squirrel.exe'
   at Squirrel.Update.Program.<signPEFile>d__9a.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Squirrel.Utility.<>c__DisplayClass1e`1.<>c__DisplayClass20.<<ForEachAsync>b__1d>d__22.MoveNext()<---

Couldn't see a clear problem in the trace, any ideas? Thanks!

Cannot find module (...) resources\atom.asar\browser\lib\init.js

After the install, if I run the app I have this issue:
Error: Cannot find module 'C:\Users\yyy\AppData\Local\xxx\app-version\resources\atom.asar\browser\lib\init.js'
The strange thing is that the path is actually wrong, since atom.asar is indeed in \app-version\resources\resources\atom.asar (note the resources\resources).
If I copy atom.asar and app.asar into C:\Users\yyy\AppData\Local\xxx\app-version\resources\ all works
I'm using Windows 7 - x64 and electron-builder

Squirrel.Windows ReleaseNotes error causes autoUpdater to download updates twice

I am using the auto-updater module, and when an update is detected and downloaded, Squirrel logs an exception (see below) and as a result the file gets downloaded twice.

I may be doing something wrong, but as far as I can see, the NUPKG file is getting downloaded twice as I am monitoring the folders.

This issue has been flagged as a red herring, but I am not a 100% if it is an autoUpdater issue or a Squirrel issue. See Squirrel/Squirrel.Windows#136.

016-04-04 17:03:09> Program: Starting Squirrel Updater: --download http://lsnuts-dev.us-east-1.elasticbeanstalk.com/update/win32/0.1.9-alpha
2016-04-04 17:03:09> Program: Fetching update information, downloading from http://lsnuts-dev.us-east-1.elasticbeanstalk.com/update/win32/0.1.9-alpha
2016-04-04 17:03:09> CheckForUpdateImpl: Downloading RELEASES file from http://lsnuts-dev.us-east-1.elasticbeanstalk.com/update/win32/0.1.9-alpha
2016-04-04 17:03:09> FileDownloader: Downloading url: http://lsnuts-dev.us-east-1.elasticbeanstalk.com/update/win32/0.1.9-alpha/RELEASES?id=lifesize&localVersion=0.1.9-alpha-ia32&arch=amd64
2016-04-04 17:03:11> FileDownloader: Downloading file: http://lsnuts-dev.us-east-1.elasticbeanstalk.com/download/0.1.10-alpha/lifesize.cloud-0.1.10-alpha-ia32-full.nupkg
2016-04-04 17:04:03> UpdateInfo: Couldn't get release notes for:lifesize.cloud-0.1.10-alpha-ia32-full.nupkg: System.Exception: Invalid 'ReleaseNotes' value in nuspec file at 'C:\Users\dpereira\AppData\Local\lifesize\packages\lifesize.cloud-0.1.10-alpha-ia32-full.nupkg'
   at Squirrel.ReleaseEntry.GetReleaseNotes(String packageDirectory)
   at Squirrel.UpdateInfo.<FetchReleaseNotes>b__2(ReleaseEntry x)
2016-04-04 17:04:04> Program: Starting Squirrel Updater: --update http://lsnuts-dev.us-east-1.elasticbeanstalk.com/update/win32/0.1.9-alpha
2016-04-04 17:04:04> Program: Starting update, downloading from http://lsnuts-dev.us-east-1.elasticbeanstalk.com/update/win32/0.1.9-alpha
2016-04-04 17:04:04> Program: About to update to: C:\Users\dpereira\AppData\Local\lifesize
2016-04-04 17:04:04> CheckForUpdateImpl: Downloading RELEASES file from http://lsnuts-dev.us-east-1.elasticbeanstalk.com/update/win32/0.1.9-alpha
2016-04-04 17:04:04> FileDownloader: Downloading url: http://lsnuts-dev.us-east-1.elasticbeanstalk.com/update/win32/0.1.9-alpha/RELEASES?id=lifesize&localVersion=0.1.9-alpha-ia32&arch=amd64
2016-04-04 17:04:04> FileDownloader: Downloading file: http://lsnuts-dev.us-east-1.elasticbeanstalk.com/download/0.1.10-alpha/lifesize.cloud-0.1.10-alpha-ia32-full.nupkg
2016-04-04 17:05:13> ApplyReleasesImpl: Writing files to app directory: 
... Here things go as planned ...

Unable to build windows installer

development package.json has the following:

  "build": {
    "app-bundle-id": "com.datafiniti",
    "app-category-type": "public.app-category.visual-scraper",
    "iconUrl": "build/icon.ico"
  },

  "scripts": {
    "postinstall": "install-app-deps",
    "pack": "build --platform=all",
    "dist:win": "build --platform=win32"
  }

when running npm run dist:win i run into the following error:

Packaging app for platform win32 x64 using electron v0.37.3
Error: Failed with exit code: 1
Output:
Attempting to build package from 'SpiderSense.nuspec'.
Invalid URI: The URI scheme is not valid.

 at ChildProcess.<anonymous> (/SpiderSense/node_modules/electron-winstaller-fixed/lib/spawn-promise.js:59:16)
    at emitTwo (events.js:100:13)
    at ChildProcess.emit (events.js:185:7)
    at maybeClose (internal/child_process.js:850:16)
    at Socket.<anonymous> (internal/child_process.js:323:11)
    at emitOne (events.js:95:20)
    at Socket.emit (events.js:182:7)
    at Pipe._onclose (net.js:477:12)
From previous event:
    at tsAwaiter (/SpiderSense/node_modules/electron-builder/src/awaiter.ts:10:51)
    at Object.build (/SpiderSense/node_modules/electron-builder/src/builder.ts:30:59)
    at Object.<anonymous> (/SpiderSense/node_modules/electron-builder/src/build-cli.ts:41:2)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:146:18)
    at node.js:404:3

Any ideas here?

i have mono version 4.2.3 and wine version 1.8.1. Let me know if you need any more information

Weird "green" dialog in windows 7 64

Hi,
I created an installer for win64 and I run it in Windows 7.
When I run it, a strange "green" dialog appears (see attachments). Probably it should be a dialog saying that the installer it's doing the install (copying the files, etc). But it's weird :)
Did anyone had the same behaviour?
squirrel

regeneratorRuntime is not defined

Just including the installer via const electronInstaller = require('electron-winstaller'); throws this error:

ReferenceError: regeneratorRuntime is not defined
    at D:\code\project\node_modules\electron-winstaller\lib\index.js:9:31

Add support to install additional libraries/drivers in Windows

Hi,
I'm creating an electron app that uses a printer, and I'd like to install the printer driver along with the application (in Windows).
Of course, the driver can be installed manually, but I want to reduce the number of things that user must do.
Is that possible?

Update Squirrel.Windows

When is a new version of Squirrel.Windows coming out? Would be great to get all those fixes into our windows installer.

Updating to `2.3.0` breaks any application with a space in its name

As of 2.3.0 we are using a version of Squirrel.Windows that "fixes" the space = "%20" bug that has been around for a while. The problem is that some pre-existing applications have shortcuts set up with that '%20' in the name.

This means that updating to the new naming scheme breaks existing installations as these shortcuts stop working rendering the application useless and unstartable.

Not sure where this fix should go (probably Squirrel.Windows) but posting this here to warn other users

Error message when running installer: "This application could not be started"

I'm building a Windows installer using windows-installer (unsigned at the moment but I plan to set up signing shortly). Everything works as expected including build, install, app initialization, and even auto updating. When I run the installer though I get the below error messages and I can't figure out why. It's a really straightforward app with no weird custom libraries or anything.

The Microsoft documentation which the Windows 10 error points me to is unhelpful. It seems to be something related to .NET and possibly 32/64 bit architecture but after a lot of google research I'm stumped (I haven't done any Windows development in years so forgive me for noobery). The error seems fairly common but I couldn't find anything in relation to squirrel or windows-installer and none of the suggests that I saw seemed particularly relevant.

Again, as far as I can tell the app actually works fine after this happens. The app launches after installation just as expected and I can run it again from the newly created shortcuts and it runs without issue. I just don't want to ship it to customers with this error message.

Any ideas? I apologize if this is the wrong place to post this but it's hard for me to tell exactly what isn't working right.

Errors

I'm running the installer on two VMs, Win 7 and Win 10. I had to install .NET 4.5 on the Win 7 VM but otherwise both are clean installs from here. I'm assuming these errors are basically the same, or caused by the same thing, even though they appear slightly different in each OS.

Win 7:
screenshot 2016-05-06 08 38 28

Win 10:
screenshot 2016-05-06 08 53 33

SquirrelSetup.log:

2016-05-06 06:52:55> Program: Starting Squirrel Updater: --install .
2016-05-06 06:52:55> Program: Starting install, writing to C:\Users\IEUser\AppData\Local\SquirrelTemp
2016-05-06 06:52:55> Program: About to install to: C:\Users\IEUser\AppData\Local\citytrader
2016-05-06 06:52:55> CheckForUpdateImpl: Couldn't write out staging user ID, this user probably shouldn't get beta anything: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\IEUser\AppData\Local\citytrader\packages\.betaId'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
   at System.IO.File.WriteAllText(String path, String contents, Encoding encoding)
   at Squirrel.UpdateManager.CheckForUpdateImpl.getOrCreateStagedUserId()
2016-05-06 06:52:55> CheckForUpdateImpl: Failed to load local releases, starting from scratch: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\IEUser\AppData\Local\citytrader\packages\RELEASES'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at Squirrel.Utility.LoadLocalReleases(String localReleaseFile)
   at Squirrel.UpdateManager.CheckForUpdateImpl.<CheckForUpdate>d__3f.MoveNext()
2016-05-06 06:52:55> CheckForUpdateImpl: Reading RELEASES file from C:\Users\IEUser\AppData\Local\SquirrelTemp
2016-05-06 06:52:55> CheckForUpdateImpl: First run or local directory is corrupt, starting from scratch
2016-05-06 06:52:55> ApplyReleasesImpl: Writing files to app directory: C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\content_resources_200_percent.pak to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\content_resources_200_percent.pak
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\content_shell.pak to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\content_shell.pak
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\d3dcompiler_47.dll to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\d3dcompiler_47.dll
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\ffmpeg.dll to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\ffmpeg.dll
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\Futures+.exe to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\Futures+.exe
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\icudtl.dat to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\icudtl.dat
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\libEGL.dll to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\libEGL.dll
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\libGLESv2.dll to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\libGLESv2.dll
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\LICENSE to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\LICENSE
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\msvcp120.dll to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\msvcp120.dll
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\msvcr120.dll to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\msvcr120.dll
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\natives_blob.bin to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\natives_blob.bin
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\node.dll to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\node.dll
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\snapshot_blob.bin to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\snapshot_blob.bin
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\squirrel.exe to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\squirrel.exe
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\ui_resources_200_percent.pak to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\ui_resources_200_percent.pak
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\vccorlib120.dll to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\vccorlib120.dll
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\xinput1_3.dll to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\xinput1_3.dll
2016-05-06 06:52:59> ApplyReleasesImpl: Squirrel Enabled Apps: [C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\Futures+.exe]
2016-05-06 06:53:02> ApplyReleasesImpl: Starting fixPinnedExecutables
2016-05-06 06:53:02> ApplyReleasesImpl: Examining Pin: File Explorer.lnk
2016-05-06 06:53:02> ApplyReleasesImpl: Fixing up tray icons
2016-05-06 06:53:02> ApplyReleasesImpl: Couldn't rewrite shim RegKey, most likely no apps are shimmed: System.NullReferenceException: Object reference not set to an instance of an object.
   at Squirrel.UpdateManager.ApplyReleasesImpl.<unshimOurselves>b__ee(RegistryView view)
2016-05-06 06:53:02> ApplyReleasesImpl: Couldn't rewrite shim RegKey, most likely no apps are shimmed: System.NullReferenceException: Object reference not set to an instance of an object.
   at Squirrel.UpdateManager.ApplyReleasesImpl.<unshimOurselves>b__ee(RegistryView view)
2016-05-06 06:53:02> ApplyReleasesImpl: cleanDeadVersions: for version 0.0.1
2016-05-06 06:53:02> ApplyReleasesImpl: cleanDeadVersions: exclude folder app-0.0.1

Build info:

OS: OSX 10.11.3
node: v5.4.1
electron: 0.37.3 (also tested with 0.37.8)
electron-packager: 6.0.2
electron-winstaller: 2.3.0
wine: wine-1.8
mono: Mono JIT compiler version 4.2.1 (Stable 4.2.1.102/6dd2d0d Wed Dec 2 14:02:18 PST 2015)

electron-winstaller config:

{
  appDirectory: sourcePath,
  outputDirectory: destPath,
  authors: `${orgname}`,
  exe: target,
  noMsi: true,
  description: `The desktop distribution of ${appname}`,
  title: appname,
  setupIcon: `assets/icons/${iconname}.ico`,
  setupExe: `${appname}_setup.exe`,
  loadingGif: `assets/gif7.gif`
}

The app and installer are currently both unsigned as I'm waiting on a cert from our director.

file path cannot longer than 260

Hi.all:
I used a lot of third party package from npm in my project, which will make the file path get very deep even longer than 260 characters and then it will emit an error.How can I fix it,THX

FooBarSetup.exe installing screen appears all the time.

The .exe is generated correctly although it has a "Setup" extension and every time I open it there's a weird greenish installing screen that appears. Is there a way to simply obtain the .exe of everything? Also it's unclear what the installer actually does.

installer doesn't copy extra resources directories during installation

Hi! I have an issue with creating windows installer with electron-builder (see electron-userland/electron-builder#252) but electron-builder developer asked me to recreate issue here.
The problem is: I use two-package.json project layout (package.json and app/package.json) and extra resources folders (for example with dlls) are not copied to installation path during installer run. Extra files are copied, there is no problems with them, but extra folders are not.

Also tried to move folders with dlls into app folder, but haven't succeed: dlls folders are packaged into resources/app.asar but can't be found and loaded on electron application startup.

ES6 import of 'electron-winstaller' doesn't work

//import winstaller from 'electron-winstaller'; <-- doesn't work
var winstaller = require('electron-winstaller'); <-- works

Otherwise createWindowsInstaller is not visible. I wan't to use ES6 convention, is there a workaround? Not sure if that's a feature request, bug or simply my lack of knowledge. Thanks

System.NotSupportedException: No data is available for encoding 936

[luncher@localhost build]$ ./build_installer.sh
Failed with exit code: 255
Output:
System.NotSupportedException: No data is available for encoding 936.
at System.Text.Encoding.GetEncoding (Int32 codepage) <0x7fe0f36b27e0 + 0x004b9> in :0
at ICSharpCode.SharpZipLib.Zip.ZipConstants.ConvertToString (System.Byte[] data, Int32 count) <0x4175d6e0 + 0x00033> in :0
at ICSharpCode.SharpZipLib.Zip.ZipConstants.ConvertToStringExt (Int32 flags, System.Byte[] data, Int32 count) <0x4175d4f0 + 0x00063> in :0
at ICSharpCode.SharpZipLib.Zip.ZipFile.ReadEntries () <0x4175c1c0 + 0x0064f> in :0
at ICSharpCode.SharpZipLib.Zip.ZipFile..ctor (System.String name) <0x4175bd20 + 0x00153> in :0

[luncher@localhost build]$ cat build_installer.sh

!/usr/bin/env node

var electronInstaller = require('electron-winstaller');

electronInstaller.createWindowsInstaller({
appDirectory: './package/HolaStudio-win32-x64/',
outputDirectory: './installer/',
authors: 'Holaverse Tech Inc. ',
exe: 'HolaStudio.exe'
}).then(function() {
console.log("build done");
}, function(err) {
console.log(err.message);
});
[luncher@localhost build]$

"'Default' tag requires a nonempty 'Extension' attribute" on Win10

I'm trying to build an installer, but when I try to run it the installation fails with 'Default' tag requires a nonempty 'Extension' attribute:

2016-02-25 08:03:31> IEnableLogger: Failed to create uninstaller registry entry: System.Xml.XmlException: 'Default' tag requires a nonempty 'Extension' attribute. Line 10, position 4.

I've done some googling around and it appears to be an issue with files without extensions.

The template.nuspec tries to create a LICENSE file. Removing the relevant line from <files> seems to resolve the problem.

If you think it's ok to not have that LICENSE file, I can easily submit a PR.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.