Giter Site home page Giter Site logo

electron-userland / electron-builder Goto Github PK

View Code? Open in Web Editor NEW
13.4K 151.0 1.7K 133.04 MB

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box

Home Page: https://www.electron.build

License: MIT License

JavaScript 3.41% Smarty 0.01% Shell 0.55% TypeScript 88.58% NSIS 6.98% Dockerfile 0.28% Handlebars 0.18%
electron builder auto-update squirrel nsis macos linux deb rpm appx

electron-builder's People

Contributors

adam-lynch avatar beyondkmp avatar codeudan avatar csett86 avatar davej avatar demetris-manikas avatar develar avatar devinbinnie avatar ezekg avatar ffflorian avatar filfreire avatar gaodeng avatar github-actions[bot] avatar greenkeeperio-bot avatar indutny-signal avatar jebibot avatar jviotti avatar lutzroeder avatar mariadima avatar mifi avatar mkaz avatar mmaietta avatar nokel81 avatar panther7 avatar quanglam2807 avatar renovate[bot] avatar stefanjudis avatar t3chguy avatar wojtkowiak avatar xseignard 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  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

electron-builder's Issues

TypeError: Cannot call method 'normalize' of undefined

I get this error trying to build windows.

This is the full log:

electron-builder dist/win/myapp --platform=win --out=./installers/win --config=config.json
- Starting build for ´win´ -

/usr/local/lib/node_modules/electron-builder/lib/win.js:127
  p = path.win32.normalize( p );
                 ^
TypeError: Cannot call method 'normalize' of undefined
    at _windowsify (/usr/local/lib/node_modules/electron-builder/lib/win.js:127:18)
    at Object.WinBuilder.build (/usr/local/lib/node_modules/electron-builder/lib/win.js:31:17)
    at Object.Builder.build (/usr/local/lib/node_modules/electron-builder/index.js:59:42)
    at Object.<anonymous> (/usr/local/lib/node_modules/electron-builder/cli.js:26:9)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)

Error on running electron builder

This is the output after doing electron-builder myApp.app --platform =osx --output=./output --overwrite --config=./assets/config.json

Please help :/

  • Starting build for ´osx´ -
    Writing temporary ´appdmg.json´
    Wrote temporary ´appdmg.json´
    Kicking off ´appdmg´
    module.js:338
    throw err;
    ^
    Error: Cannot find module 'appdmg'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.OSXBuilder.build (/usr/local/lib/node_modules/electron-builder/lib/osx.js:52:18)
    at Object.Builder.build (/usr/local/lib/node_modules/electron-builder/index.js:59:42)
    at Object. (/usr/local/lib/node_modules/electron-builder/cli.js:26:9)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)

npm run build:macos ouputs nothing

npm run build:macos produces no output. Is this command possible on windows?

C:\git\fileSharp>npm run build:macos

> [email protected] build:macos C:\git\fileSharp
> npm run clean:macos && electron-packager ./app "fileSharp" --out=dist/macos --platform=darwin --arch=x64 --version=0.25.3 --icon=assets/macos/icon.icns


> [email protected] clean:macos C:\git\fileSharp
> rm -rf ./dist/macos

Packaging app for platform darwin x64 using electron v0.25.3

"Error: Building for ´osx´ is not supported" when I run "npm run pack:osx"

Hi,
when I try to run npm run pack:osx i get the following error error:

MLGBXXXXXX-2:ElectronTest jurgo.boemo$ npm run pack:osx

> [email protected] pack:osx /Users/jurgo.boemo/Workspace/ElectronTest
> npm run build:osx && electron-builder "dist/osx/Loopline Systems.app" --platform=osx --out="dist/osx" --config=packager.json


> [email protected] build:osx /Users/jurgo.boemo/Workspace/ElectronTest
> npm run clean:osx && electron-packager ./app "Loopline Systems" --out=dist/osx --platform=darwin --arch=x64 --version=0.25.3 --icon=assets/osx/loopline.icns


> [email protected] clean:osx /Users/jurgo.boemo/Workspace/ElectronTest
> rm -rf ./dist/osx

Packaging app for platform darwin x64 using electron v0.25.3
Wrote new app to dist/osx/Loopline Systems.app
/Users/jurgo.boemo/Workspace/ElectronTest/node_modules/electron-builder/cli.js:30
    throw error;
          ^
Error: Building for ´osx´ is not supported
    at Object.Builder.build (/Users/jurgo.boemo/Workspace/ElectronTest/node_modules/electron-builder/index.js:55:9)
    at Object.<anonymous> (/Users/jurgo.boemo/Workspace/ElectronTest/node_modules/electron-builder/cli.js:26:9)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

npm ERR! Darwin 14.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "run" "pack:osx"
npm ERR! node v0.12.2
npm ERR! npm  v2.7.4
npm ERR! code ELIFECYCLE
npm ERR! [email protected] pack:osx: `npm run build:osx && electron-builder "dist/osx/Loopline Systems.app" --platform=osx --out="dist/osx" --config=packager.json`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] pack:osx script 'npm run build:osx && electron-builder "dist/osx/Loopline Systems.app" --platform=osx --out="dist/osx" --config=packager.json'.
npm ERR! This is most likely a problem with the ElectronTest package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build:osx && electron-builder "dist/osx/Loopline Systems.app" --platform=osx --out="dist/osx" --config=packager.json
npm ERR! You can get their info via:
npm ERR!     npm owner ls ElectronTest
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/jurgo.boemo/Workspace/ElectronTest/npm-debug.log

you can find my code here: https://github.com/jurgob/electron-builder-seed

Support windows?

We are interested in using this project for building installers for our app. You mention on the readme to volunteer to help with this, so here I am :)

Specifically I would like to be able to run the installers on linux, so they can be built while running in travis and ideally windows also. I can contribute and help run, I also have appveyor for windows builds going so I can test it in a CI build.

Any direction to get started would help.

Arguments to path.resolve must be strings

Hi, I'm using this package with this npm-script

"pack:win": "npm run build:win && electron-builder \"dist/win/MyApp-win32\" --platform=win --out=\"dist/win\" --config=pack.json"

and I get this error (the packaging with electron-packager goes well):

...
Packaging app for platform win32 x64 using electron v0.28.1
Wrote new app to dist/win/MyApp-win32
- Starting build for ´win´ - 
path.js:422
      throw new TypeError('Arguments to path.resolve must be strings');
      ^
TypeError: Arguments to path.resolve must be strings
    at Object.posix.resolve (path.js:422:13)
    at _copyAssetsToTmpFolder (/.../.../MyApp/node_modules/electron-builder/lib/win.js:112:10)
    at Object.WinBuilder.build (/.../.../MyApp/node_modules/electron-builder/lib/win.js:36:5)
    at Object.Builder.build (/.../.../MyApp/node_modules/electron-builder/index.js:59:42)
    at Object.<anonymous> (/.../.../MyApp/node_modules/electron-builder/cli.js:26:9)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)

What am I doing wrong?

Can't open output file

I have tried to use Electron Builder to build Windows installer. However, I just can build one time, but when I install it throws error:

error

I tried to build it again, but this time it throws error:

makensis: 
Output: "\Users\hoangha\HaLink\service-oriented-architecture-assignment\desktopApp\~Desktop\\SOA Library Setup.exe"

makensis: Can't open output file
Error - aborting creation process

Finished makensis with code 1
/usr/local/lib/node_modules/electron-builder/cli.js:30
    throw error;
          ^
Error: makensis failed
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/electron-builder/lib/win.js:81:26)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Socket.<anonymous> (child_process.js:1183:11)
    at Socket.emit (events.js:107:17)
    at Pipe.close (net.js:485:12)

And here is my config.json file:

{
  "osx" : {
    "title": "SOA Library",
    "background": "assets/osx/installer.png",
    "icon": "assets/osx/mount.icns",
    "icon-size": 80,
    "contents": [
      { "x": 438, "y": 344, "type": "link", "path": "/Applications" },
      { "x": 192, "y": 344, "type": "file" }
    ]
  },
  "win" : {
    "title" : "SOA Library",
    "icon" : "icon.ico"
  }
}

Do anybody know how to solve this problem? Where did I do wrong.

Change behaviour of the --out cli param

[Enhancement request]
Hi.
Any chance we could change the behaviour of the --out param from specifying the output directory, to specifying the output file (and path)?

e.g.

--out=packaged (Creates ./packaged/MyApp Setup.exe)
to
--out=packaged/MyApp_currentVersion_setup.exe (creates ./packaged/MyApp_currentVersion_setup.exe)

This has the following benefits:

  • Allows for templating of the resulting setup filename. This is useful when creating beta builds etc..
  • More consistent with other related packagers such as appDmg, or just plain old zip.

How to define custom nsisconf.nsh?

As far I can see nsis takes by default nsisconf.nsh within its program folder (on windows). Is it possible to point to a custom nsisconf.nsh from packager.json? I need this to define symbols for installer like version company and so on.

Can't install wine

I know this is not probably the right place but I can't install wine when executing the command provided in the readme. Anyone knows why?

==> Installing dependencies for wine: libpng, freetype, jpeg, pkg-config,
==> Installing wine dependency: libpng
==> Downloading https://downloads.sourceforge.net/project/libpng/libpng16/1.6.17

curl: (22) The requested URL returned error: 404 Not Found
Trying a mirror...
==> Downloading ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng16/libpng-1

curl: (78) RETR response: 550
Error: Failed to download resource "libpng"
Download failed: ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng16/libpng-1.6.17.tar.xz

Feedback

Some quick things I noticed:

  • macos => osx. It used to be Mac OS X, but now it's just OS X. It's never been Mac OS.
  • Instead of a packager.json file, why not just put it in package.json under a packager field?
  • The config is very verbose: https://github.com/loopline-systems/electron-builder#how-we-use-it-so-far It needs better defaults. Make it as easy as possible to do normal things like package for all platforms and rather have more advanced verbose config available if needed, which most probably don't need. You're also duplicating a lot of metadata from electron-packager. Maybe we need a simple wrapper tool for all these modules?

Small typo in example

Hey,

first thanks for this awesome project!
There is a small confusion in the example package.json
It refers to assets/macos/loopline.icns but the directory structure says mount.icns

Thanks again!

Wrong Shortcut Icon after building on windows

Hello,

After successfully building on windows, I get the wrong shortcut icon for the application. The icon of the application is the same as the one I assigned from the config file; but that of the shortcut of the application is an atom picture. (logo of atom electron). When I enter the properties of that shortcut (or any shortcut I create from the original application file then change icon, I get the correct one (This means that the actual icon showing is an atom icon, different from that showing in the properties of that shortcut).
A few more notes:

  • When the user uses copy/paste from the original application with the correct icon, the icon stays the same.
  • The properties of that shortcut showing in resource hacker are the correct ones. (Although the shortcut has the wrong atom icon)
  • Any shortcut that is created from the original exe file has also the wrong icon.

Any help is appreciated.

Add ability to specify your own installer.nsi.tpl

If i want my app on windows to run only as admin i would need to add

WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" \
                   "$INSTDIR\${APP_NAME}.exe" "RUNASADMIN"

to the installer.nsi, but at the moment it's only possible to do by modifying the template file inside of the module.
It would be great to have a possibility to specify a path to your own template to be able to make any customisations you want.

If you're interested in this functionality I'll be able to submit a PR around the weekend.

Default screen when building app

Hey all,

I created a small app using Electron, which is working just fine.
However, when I try to build it, I get some weird results.

The building itself works fine, but when I open the .app, I see the "Welcome to Electron" title instead of the app.

screen shot 2015-11-19 at 11 02 07

I created a repo here with just the basic files, and I get the same results:
https://github.com/dietlev/electron-build-demo

I'm on
OS X 10.10.5
node v5.1.0
npm 3.4.0

Am I missing something here?
Thanks in advance

Building on windows - nsis not found

hello,

I'm making a windows only app for the first time. I'm building with this command :
electron-builder "dist/win/somename-win32-ia32" --platform=win --out="dist/win" --config=packager.json

But it keeps failing on nsis. Nsis is correctly installed. What can I do to fix this ?
this is my packager.json file :
{
"osx" : {
"title": "SomeName",
"background": "assets/osx/installer.png",
"icon": "assets/osx/mount.icns",
"icon-size": 80,
"contents": [
{ "x": 438, "y": 344, "type": "link", "path": "/Applications" },
{ "x": 192, "y": 344, "type": "file" }
]
},
"win" : {
"title" : "SomeName",
"icon" : "assets/win/icon.ico"
}
}

  • Running electron-builder 2.1.1

  • Starting creation of installer for ´win

  • makensis not found.
    Please install "nullsoft scriptable install system"
    http://nsis.sourceforge.net/Download

    C:\Users\nick smet\AppData\Roaming\npm\node_modules\electron-builder\cli.js:30
    throw error;
    ^

    Error: makensis failed
    at ChildProcess. (C:\Users\nick smet\AppData\Roaming\npm\node_modules\electron-builder\lib\win.js:74:26)
    at emitOne (events.js:77:13)
    at ChildProcess.emit (events.js:169:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
    at onErrorNT (internal/child_process.js:344:16)
    at doNTCallback2 (node.js:441:9)
    at process._tickCallback (node.js:355:17)
    at Function.Module.runMain (module.js:469:11)
    at startup (node.js:136:18)
    at node.js:963:3

Add example application

I've been struggling with windows' build/packaging processes for days! Finally I managed to package the app (note the use of rimraf instead of rm --rf because it wasn't working, someone should make a PR for it), the installer gets built but the application itself always run /default_app instead of my real /app (although I want to use asar technology and by the way, I don't know how because I don't understand the readme.md file, and there is no example written about it).
The installed app also doesn't properly start. I can see its process after some seconds but it never starts.

Just in case, I'm running this on windows 7 x86.

Add Linux .deb and .rpm support using FPM

There's an awesome project called FPM that allows you to generate .deb and .rpm packages.

It's written in Ruby, so users will need to install it on their own, but that's already the case for NSIS.

There's an Electron starter project that already uses it, called Electron SuperKit. Here's how they are using FPM: https://github.com/Aluxian/electron-superkit/blob/master/tasks/pack.coffee#L69-L116
There's also a basic grunt task that uses it, at: https://www.npmjs.com/package/grunt-fpm-package

A general guide on FPM can be found at: https://www.digitalocean.com/community/tutorials/how-to-use-fpm-to-easily-create-packages-in-multiple-formats

What do you think about using it for packaging apps for the Linux platform?

Icon problem After installing on windows from created installer:

Issue is for WINDOWS 7: Icon shortcut is electron not my app's icon (my app is called anghami)
The exe in Program Files looks fine
If u look in the description of that file (bottom of that window) u can see electron icon which is not the case
If u look at shortcuts they have electron icon
Finally if u look at the output of resource hacker it shows Anghami's icon and not electron's icon

My config.json:

{
"osx" : {
"title": "Anghami",
"background": "desktop.png",
"icon": "anghami-white.png",
"icon-size": 128,
"contents": [
{ "x": 438, "y": 10, "type": "link", "path": "/Applications" },
{ "x": 192, "y": 10, "type": "file" }
]
},
"win" : {
"title" : "Anghami",
"icon" : "assets/IconAnghami.ico"
}
}

My package.json:

{
"name" : "anghami",
"productName": "Anghami",
"version" : "0.1.0",
"main" : "main.js"
}

files used:
icons and pictures inside the assets folder, a main javascript file (main.js) and the preloader (preload.js), config.json (above), index.html (background image for the app), package.json (shown above).

packaging command used:
electron-packager ./assets/ Anghami --platform=win32 --arch=ia32 --icon=./assets/IconAnghami.ico --version=0.33.0 --overwrite

building command used:
electron-builder ./Anghami-win32-ia32/ --platform=win --out=./output --config=./assets/config.json

on a final note, after performing the packaging, the icon is CORRECT and nothing is wrong with any shortcut I make out of the exe file. So I think the problem is from the builder.

The output of the two commands seem fine (see attached images).

node version: 0.12.7
npm version: 2.11.3

Obviously I am on a windows 7 32 bit machine.
output1
output2

Thank you for your time.

More info on osx.contents

I would like to dive deeper into the config.osx.contents stuff, but I can't find where to read about additional options to put in there. Like I would like to change the zoom of the window, and things of that nature. Any ideas on where I can go for help on this?

Exception during running the command from another folder

Hi, during running the script not from the folder where electron is located, I've got

makensis: File: "path\to\my\app\*" -> no files found.
Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
   /oname=outfile one_file_only)
Error in script "/tmp/1hyau9no6zxccgo88o8wo.tpl" on line 59 -- aborting creation process

Could you @stefanjudis assist to find the correct place where fix should be added?

Building on Windows

Guys how do I build on windows ?
I installed NSIS but it is still giving me an error that makensis is not recognized and NSIS is not found.
Please help :(

Error running `tiffutil`! Exit code was 5

npm run pack:osx

package.json

{
  "name": "hummingbird",
  "version": "1.0.0",
  "description": "",
  "main": "main.js",
  "scripts": {
    "dev": "electron ./app",

    "clean": "rm -rf ./dist",
    "clean:osx": "rm -rf ./dist/osx",
    "clean:win": "rm -rf ./dist/win",

    "build": "npm run clean && npm run build:osx && npm run build:win",
    "build:osx": "npm run clean:osx && electron-packager ./app \"Loopline Systems\" --out=dist/osx --platform=darwin --arch=x64 --version=0.25.3 --icon=assets/osx/icon.icns",
    "build:win": "npm run clean:win && electron-packager ./app \"Loopline Systems\" --out=dist/win --platform=win32 --arch=ia32 --version=0.25.3 --icon=assets/win/icon.ico",

    "pack": "npm run pack:osx && npm run pack:win",
    "pack:osx": "npm run build:osx && electron-builder \"dist/osx/Loopline Systems.app\" --platform=osx --out=\"dist/osx\" --config=packager.json",
    "pack:win": "npm run build:win && electron-builder \"dist/win/Loopline Systems-win32\" --platform=win --out=\"dist/win\" --config=packager.json"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/stormtea123/hummingbird.git"
  },
  "author": "stormtea123",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/stormtea123/hummingbird/issues"
  },
  "homepage": "https://github.com/stormtea123/hummingbird#readme",
  "dependencies": {
    "imagemin": "^3.2.0",
    "imagemin-mozjpeg": "^5.1.0",
    "imagemin-pngquant": "^4.2.0",
    "imagemin-webp": "^3.1.0",
    "nconf": "^0.8.2"
  },
  "devDependencies": {
    "electron-packager": "^4.0.2",
    "electron-prebuilt": "^0.25.2",
    "electron-builder": "^1.0.0"
  }
}

packager.json

{
  "osx" : {
    "title": "Hummingbird",
    "background": "/Library/WebServer/Documents/hummingbird/assets/osx/background.png",
    "icon": "assets/osx/icon.icns",
    "icon-size": 80,
    "contents": [
      { "x": 200, "y": 20, "type": "link", "path": "/Applications" },
      { "x": 20, "y": 20, "type": "file" }
    ]
  },
  "win" : {
    "title" : "Hummingbird",
    "icon" : "assets/win/icon.ico"
  }
}
- Starting build for ´osx´ -
Writing temporary ´appdmg.json´
Wrote temporary ´appdmg.json´
Kicking off ´appdmg´
appdmg: [1] Looking for target
appdmg: [2] Reading JSON Specification
appdmg: [3] Parsing JSON Specification
appdmg: [4] Validating JSON Specification
appdmg: [5] Looking for files
appdmg: [6] Calculating size of image
appdmg: [7] Creating temporary image
appdmg: [8] Mounting temporary image
appdmg: [9] Making hidden background folder
appdmg: [10] Copying background
appdmg: [11] Unmounting temporary image
appdmg: [12] Removing temporary image
/Library/WebServer/Documents/hummingbird/node_modules/electron-builder/cli.js:30
    throw error;
          ^
Error: ENOENT, open '/Library/WebServer/Documents/hummingbird/Library/WebServer/Documents/hummingbird/assets/osx/background.png'
    at Error (native)

npm ERR! Darwin 14.5.0
npm ERR! argv "/Users/admin/.nvm/versions/node/v0.12.0/bin/node" "/Users/admin/.nvm/versions/node/v0.12.0/bin/npm" "run" "pack:osx"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] pack:osx: `electron-builder "dist/osx/Hummingbird.app" --platform=osx --out="dist/osx" --config=packager.json`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] pack:osx script 'electron-builder "dist/osx/Hummingbird.app" --platform=osx --out="dist/osx" --config=packager.json'.
npm ERR! This is most likely a problem with the hummingbird package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     electron-builder "dist/osx/Hummingbird.app" --platform=osx --out="dist/osx" --config=packager.json
npm ERR! You can get their info via:
npm ERR!     npm owner ls hummingbird
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Library/WebServer/Documents/hummingbird/npm-debug.log

Grunt plugin?

Great tool, thanks 👍
Are there any grunt plugins for this?

Building win32 on Mac

Hi,
When I try to run pack:win, i get the following error:

makensis: Error while loading icon from "icon.ico": invalid icon file
Error in macro MUI_INTERFACE on macroline 64
Error in macro MUI_PAGE_INIT on macroline 3

makensis: Error in macro MUI_PAGE_WELCOME on macroline 5
Error in script "/var/folders/gl/lfyn6py57qxdj6695y2sfyjm0000gn/T/49geudg9a5k48gosss0ko.tpl" on line 24 -- aborting creation process

Finished makensis with code 1
/Users/xwartz/work/project/web/task/src/main/webapp/static/node_modules/electron-builder/cli.js:40
    throw error;
    ^

Error: makensis failed
    at ChildProcess.<anonymous> (/Users/xwartz/work/project/web/task/src/main/webapp/static/node_modules/electron-builder/lib/win.js:84:26)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:817:16)
    at Socket.<anonymous> (internal/child_process.js:319:11)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:469:12)

npm scripts:

"build:win": "electron-packager ./ DiDaWin --out=dist/win --platform=win32 --arch=ia32 --version=0.36.0 --icon=img/icon_128.png --overwrite",
"pack:win": "npm run build:win && electron-builder \"dist/osx/DiDaWin-win32-ia32/DiDaWin.app\" --platform=win32 --out=\"dist/win\" --config=packager.json"

packager.json

{
    "win" : {
        "title": "DiDa",
        "icon": "img/icon_128.png"
    }
}

What can I do to fix this ?

updates

have you guys come up with a solution to updating windows electron shell apps after they're installed?

fails if `--out` dir does not yet exist

The output directory should be created if it doesn't exist yet

Error: Error running `hdiutil`! Exit code was 1
    at ChildProcess.<anonymous> (electron-builder/node_modules/appdmg/lib/util.js:32:17)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:169:7)
    at Process.ChildProcess._handle.onexit (child_process.js:1009:12)

Problems with native modules

My workflow for an electron app is

# Install all dependencies, including native modules
npm install

# Ensure native modules are built to match electron
./node_modules/.bin/electron-rebuild

# Test the app
./node_modules/.bin/electron .

# package the app
./node_modules/.bin/electron-packager . \"MyApp\" --out=dist/osx --platform=darwin --arch=x64 --version=0.33.6  --icon=assets/osx/myicon.icn

# build a distribution
./node_modules/.bin/electron-builder \"dist/osx/MyApp-darwin-x64/MyApp.app\" --platform=osx --out=\"dist/osx\" --config=packager.json"

The last step is failing with the following error:

- Starting build for ´osx´ - 
Writing temporary ´appdmg.json´
Wrote temporary ´appdmg.json´
Kicking off ´appdmg´
module.js:355
  Module._extensions[extension](this, filename);
                               ^
Error: Module version mismatch. Expected 14, got 46.
    at Error (native)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/xxx/projects/myapp/myapp/electron/node_modules/electron-builder/node_modules/appdmg/node_modules/ds-store/node_modules/macos-alias/lib/create.js:7:13)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)

I believe this is happening because the electron-builder script is running using a node implementation incompatible with electron (which is why the electron-rebuild script is necessary):

$ npm --version
2.5.1
$ node --version
v0.12.0
$ ./node_modules/.bin/electron --version
v0.33.6

Is this a bug? What is the recommended way to build build distributions with native modules?

confusing readme

the example scripts part of the package.json is a bit confusing:

{
    "build": "npm run clean && npm run build:osx && npm run build:win",
    "build:osx": "npm run clean:osx && electron-packager ./app \"Loopline Systems\" --out=dist/osx --platform=darwin --arch=x64 --version=0.25.3 --icon=assets/osx/loopline.icns",
    "build:win": "npm run clean:win && electron-packager ./app \"Loopline Systems\" --out=dist/win --platform=win32 --arch=ia32 --version=0.25.3 --icon=assets/win/icon.ico",

    "pack": "npm run pack:osx && npm run pack:win",
    "pack:osx": "npm run build:osx && electron-builder \"dist/osx/Loopline Systems.app\" --platform=osx --out=\"dist/osx\" --config=packager.json",
    "pack:win": "npm run build:win && electron-builder \"dist/win/Loopline Systems-win32\" --platform=win --out=\"dist/win\" --config=packager.json"
}

it says pack to run electron-builder and build to use electron-packager.
Shouldn't this be reversed?

Add an option to set a start screen shortcut with a specific AppUserModelID

Windows notification support was added to Electron in v0.35. To make notifications work on Windows 8/8.1, you need to add a shortcut to the start screen that contains the same AppUserModelID as the one you set in your app using app.setAppUserModelId(id).
NSIS apparently supports setting AppUserModelID:
http://nsis.sourceforge.net/ApplicationID_plug-in

It would be awesome if we support that, so people can actually use the notification support on Windows 8/8.1.

macOS pkg installer

I'm writing a GUI application that requires root permissions to modify /etc/hosts. Based on the following issue, I found myself here:
electron/packager#87

Is it possible use this installer to ask for administrative permissions? I personally only need to suport OS X.

I believe that this would be a great feature. I've seen it asked for in the following places (without a satisfactory solution):
https://discuss.atom.io/t/performing-actions-that-require-superuser-privileges/16892
https://discuss.atom.io/t/start-application-with-root/18815

tiffutil error

This relates to #45

When I had either a blank background key or a non existing file I get a tiffutil error.
This was fixed by adding a background.

Improve documentation for makensis

Hi, I've installed nsis for windows, but still get

- makensis not found.
  Please install "nullsoft scriptable install system"
  http://nsis.sourceforge.net/Download

Should I add it also to path?

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.