adopted-ember-addons / ember-electron

:zap: Build, test, compile and package desktop apps with Ember and Electron
https://ember-electron.js.org/
Other
805 stars 109 forks source link

Packaged Windows app fails to load native dependencies #174

Closed gitmitch closed 7 years ago

gitmitch commented 7 years ago

I am using ember-electron 1.12.7 and electron 1.6.1. My app is cross-platform. My primary development environment is on Mac. Building, running, packaging and signing on Mac for a Mac app works beautifully. On Windows, I can build and run, but packaging a Windows app on Windows fails due to #130 .

In an effort to get a packaged Windows app, I installed Wine on my Mac and tried packaging for Windows on Mac. A directory was generated with a bunch of files in it, including an EXE. I copied the entire directory to my Windows machine, and ran the EXE.

The packaged app runs fine on Windows, except when it tries to call any code in a native dependency. The native dependency I am using is node-keytar. When I take an action in the app that uses node-keytar, I get this error in the console:

index.html:65 Error: error: 193\?\C:\temp\agilist-win32-x64\resources\app\node_modules\keytar\build\Release\keytar.node(…)

I understand #130 is going to be resolved in 2.0, so I'm fine waiting for that to be able to package a Windows app on Windows. But packaging for Windows on Mac should be working in 1.12.7, correct? Can someone suggest something in my configuration I might have wrong that would prevent native modules from being packaged correctly in the Windows app?

Here is the output of ember electron:package when packaging for Windows on Mac:

⠸ BuildingWARN: Output exceeds 32000 characters
WARN: Output exceeds 32000 characters
[WARN] (broccoli-uglify-sourcemap) Minifying: `assets/vendor.js` took: 22992ms (more than 20,000ms)
WARN: Output exceeds 32000 characters
cleaning up...
Built project successfully. Stored in "./tmp/electron-build-tmp/dist".

Copying files into Electron Build folder
Copying electron.js
Copying package.json
Copying electron-aio-lib/auto-updates.js
Copying electron-aio-lib/ipcHandlers
Copying electron-aio-lib/licensing.js
Copying electron-aio-lib/recent-files-list.js
Copying agilist.icns
Copying icon-64x64.ico
Installing production dependencies into Electron Build Package
agilist@1.3.0 /Users/mitch/agilist/agilist/tmp/electron-build-tmp
├─┬ agilist-lib@1.0.1  (git+ssh://git@bitbucket.org/mitchio/agilist-lib.git#a886d3c04a318c1573d3d5ea723dc373911ab106)
│ ├─┬ async@2.1.5
│ │ └── lodash@4.17.4
│ ├─┬ babel-preset-es2015@6.22.0
│ │ ├─┬ babel-plugin-check-es2015-constants@6.22.0
│ │ │ └─┬ babel-runtime@6.23.0
│ │ │   ├── core-js@2.4.1
│ │ │   └── regenerator-runtime@0.10.3
│ │ ├── babel-plugin-transform-es2015-arrow-functions@6.22.0
│ │ ├── babel-plugin-transform-es2015-block-scoped-functions@6.22.0
│ │ ├─┬ babel-plugin-transform-es2015-block-scoping@6.23.0
│ │ │ ├─┬ babel-template@6.23.0
│ │ │ │ └── lodash@4.17.4
│ │ │ ├─┬ babel-traverse@6.23.1
│ │ │ │ ├── globals@9.16.0
│ │ │ │ ├─┬ invariant@2.2.2
│ │ │ │ │ └── loose-envify@1.3.1
│ │ │ │ └── lodash@4.17.4
│ │ │ ├─┬ babel-types@6.23.0
│ │ │ │ ├── esutils@2.0.2
│ │ │ │ ├── lodash@4.17.4
│ │ │ │ └── to-fast-properties@1.0.2
│ │ │ └── lodash@4.17.4
│ │ ├─┬ babel-plugin-transform-es2015-classes@6.23.0
│ │ │ ├─┬ babel-helper-define-map@6.23.0
│ │ │ │ └── lodash@4.17.4
│ │ │ ├── babel-helper-function-name@6.23.0
│ │ │ ├── babel-helper-optimise-call-expression@6.23.0
│ │ │ ├── babel-helper-replace-supers@6.23.0
│ │ │ └── babel-messages@6.23.0
│ │ ├── babel-plugin-transform-es2015-computed-properties@6.22.0
│ │ ├── babel-plugin-transform-es2015-destructuring@6.23.0
│ │ ├── babel-plugin-transform-es2015-duplicate-keys@6.22.0
│ │ ├── babel-plugin-transform-es2015-for-of@6.23.0
│ │ ├── babel-plugin-transform-es2015-function-name@6.22.0
│ │ ├── babel-plugin-transform-es2015-literals@6.22.0
│ │ ├── babel-plugin-transform-es2015-modules-amd@6.22.0
│ │ ├─┬ babel-plugin-transform-es2015-modules-commonjs@6.23.0
│ │ │ └── babel-plugin-transform-strict-mode@6.22.0
│ │ ├─┬ babel-plugin-transform-es2015-modules-systemjs@6.23.0
│ │ │ └── babel-helper-hoist-variables@6.22.0
│ │ ├── babel-plugin-transform-es2015-modules-umd@6.23.0
│ │ ├── babel-plugin-transform-es2015-object-super@6.22.0
│ │ ├─┬ babel-plugin-transform-es2015-parameters@6.23.0
│ │ │ ├── babel-helper-call-delegate@6.22.0
│ │ │ └── babel-helper-get-function-arity@6.22.0
│ │ ├── babel-plugin-transform-es2015-shorthand-properties@6.22.0
│ │ ├── babel-plugin-transform-es2015-spread@6.22.0
│ │ ├─┬ babel-plugin-transform-es2015-sticky-regex@6.22.0
│ │ │ └─┬ babel-helper-regex@6.22.0
│ │ │   └── lodash@4.17.4
│ │ ├── babel-plugin-transform-es2015-template-literals@6.22.0
│ │ ├── babel-plugin-transform-es2015-typeof-symbol@6.23.0
│ │ ├─┬ babel-plugin-transform-es2015-unicode-regex@6.22.0
│ │ │ └─┬ regexpu-core@2.0.0
│ │ │   ├── regenerate@1.3.2
│ │ │   ├── regjsgen@0.2.0
│ │ │   └─┬ regjsparser@0.1.5
│ │ │     └── jsesc@0.5.0
│ │ └─┬ babel-plugin-transform-regenerator@6.22.0
│ │   └── regenerator-transform@0.9.8
│ ├─┬ babelify@7.3.0
│ │ ├─┬ babel-core@6.23.1
│ │ │ ├─┬ babel-code-frame@6.22.0
│ │ │ │ ├─┬ chalk@1.1.3
│ │ │ │ │ ├── ansi-styles@2.2.1
│ │ │ │ │ ├── escape-string-regexp@1.0.5
│ │ │ │ │ ├─┬ has-ansi@2.0.0
│ │ │ │ │ │ └── ansi-regex@2.1.1
│ │ │ │ │ ├── strip-ansi@3.0.1
│ │ │ │ │ └── supports-color@2.0.0
│ │ │ │ └── js-tokens@3.0.1
│ │ │ ├─┬ babel-generator@6.23.0
│ │ │ │ ├─┬ detect-indent@4.0.0
│ │ │ │ │ └─┬ repeating@2.0.1
│ │ │ │ │   └─┬ is-finite@1.0.2
│ │ │ │ │     └── number-is-nan@1.0.1
│ │ │ │ ├── jsesc@1.3.0
│ │ │ │ ├── lodash@4.17.4
│ │ │ │ └── trim-right@1.0.1
│ │ │ ├── babel-helpers@6.23.0
│ │ │ ├─┬ babel-register@6.23.0
│ │ │ │ ├─┬ home-or-tmp@2.0.0
│ │ │ │ │ ├── os-homedir@1.0.2
│ │ │ │ │ └── os-tmpdir@1.0.2
│ │ │ │ ├── lodash@4.17.4
│ │ │ │ ├─┬ mkdirp@0.5.1
│ │ │ │ │ └── minimist@0.0.8
│ │ │ │ └── source-map-support@0.4.11
│ │ │ ├── babylon@6.16.1
│ │ │ ├── convert-source-map@1.4.0
│ │ │ ├── json5@0.5.1
│ │ │ ├── lodash@4.17.4
│ │ │ ├─┬ minimatch@3.0.3
│ │ │ │ └─┬ brace-expansion@1.1.6
│ │ │ │   ├── balanced-match@0.4.2
│ │ │ │   └── concat-map@0.0.1
│ │ │ ├── path-is-absolute@1.0.1
│ │ │ ├── private@0.1.7
│ │ │ ├── slash@1.0.0
│ │ │ └── source-map@0.5.6
│ │ └── object-assign@4.1.1
│ ├── jStat@1.5.3
│ ├── lodash@4.17.4
│ ├── moment@2.17.1
│ ├─┬ moment-timezone@0.5.11
│ │ └── moment@2.17.1
│ ├─┬ superagent@2.3.0
│ │ ├── component-emitter@1.2.1
│ │ ├── cookiejar@2.1.0
│ │ ├─┬ debug@2.6.1
│ │ │ └── ms@0.7.2
│ │ ├── extend@3.0.0
│ │ ├─┬ form-data@1.0.0-rc4
│ │ │ ├── async@1.5.2
│ │ │ ├─┬ combined-stream@1.0.5
│ │ │ │ └── delayed-stream@1.0.0
│ │ │ └─┬ mime-types@2.1.14
│ │ │   └── mime-db@1.26.0
│ │ ├── formidable@1.1.1
│ │ ├── methods@1.1.2
│ │ ├── mime@1.3.4
│ │ ├── qs@6.4.0
│ │ └─┬ readable-stream@2.2.3
│ │   ├── buffer-shims@1.0.0
│ │   ├── core-util-is@1.0.2
│ │   ├── inherits@2.0.3
│ │   ├── isarray@1.0.0
│ │   ├── process-nextick-args@1.0.7
│ │   ├── string_decoder@0.10.31
│ │   └── util-deprecate@1.0.2
│ └── underscore@1.8.3
└── dotenv@2.0.0

Installed and bundled agilist-lib@git+ssh://git@bitbucket.org:mitchio/agilist-lib.git#a886d3c
agilist@1.3.0 /Users/mitch/agilist/agilist/tmp/electron-build-tmp
└── d3@3.5.17

Installed and bundled d3@3.5.17
agilist@1.3.0 /Users/mitch/agilist/agilist/tmp/electron-build-tmp
└── electron-default-menu@1.0.0

Installed and bundled electron-default-menu@1.0.0
agilist@1.3.0 /Users/mitch/agilist/agilist/tmp/electron-build-tmp
└─┬ electron-settings@2.2.2
  ├── clone@1.0.2
  ├── deep-equal@1.0.1
  ├── deep-extend@0.4.1
  ├── file-exists@2.0.0
  ├─┬ fs-extra@0.30.0
  │ ├── graceful-fs@4.1.11
  │ ├── jsonfile@2.4.0
  │ ├── klaw@1.3.1
  │ └─┬ rimraf@2.6.1
  │   └─┬ glob@7.1.1
  │     ├── fs.realpath@1.0.0
  │     ├─┬ inflight@1.0.6
  │     │ └── wrappy@1.0.2
  │     └── once@1.4.0
  └── key-path-helpers@0.4.0

Installed and bundled electron-settings@2.2.2
agilist@1.3.0 /Users/mitch/agilist/agilist/tmp/electron-build-tmp
├─┬ ember-bootstrap@0.11.0
│ ├─┬ broccoli-funnel@1.1.0
│ │ ├── array-equal@1.0.0
│ │ ├── blank-object@1.0.2
│ │ ├─┬ broccoli-plugin@1.3.0
│ │ │ └─┬ quick-temp@0.1.8
│ │ │   ├── mktemp@0.4.0
│ │ │   └─┬ underscore.string@3.3.4
│ │ │     └── sprintf-js@1.0.3
│ │ ├── exists-sync@0.0.4
│ │ ├── fast-ordered-set@1.0.3
│ │ ├── fs-tree-diff@0.5.6
│ │ ├─┬ heimdalljs@0.2.3
│ │ │ └── rsvp@3.2.1
│ │ ├── path-posix@1.0.0
│ │ ├── symlink-or-copy@1.1.8
│ │ └─┬ walk-sync@0.3.1
│ │   ├── ensure-posix-path@1.0.2
│ │   └── matcher-collection@1.0.4
│ ├─┬ broccoli-merge-trees@1.2.4
│ │ ├─┬ can-symlink@1.0.0
│ │ │ └── tmp@0.0.28
│ │ └── heimdalljs-logger@0.1.8
│ ├── ember-runtime-enumerable-includes-polyfill@1.0.4
│ └── ember-wormhole@0.4.1
├─┬ ember-cli-babel@5.2.4
│ ├─┬ broccoli-babel-transpiler@5.6.2
│ │ ├─┬ babel-core@5.8.38
│ │ │ ├── babel-plugin-constant-folding@1.0.1
│ │ │ ├── babel-plugin-dead-code-elimination@1.0.2
│ │ │ ├── babel-plugin-eval@1.0.1
│ │ │ ├── babel-plugin-inline-environment-variables@1.0.1
│ │ │ ├── babel-plugin-jscript@1.0.4
│ │ │ ├── babel-plugin-member-expression-literals@1.0.1
│ │ │ ├── babel-plugin-property-literals@1.0.1
│ │ │ ├─┬ babel-plugin-proto-to-assign@1.0.4
│ │ │ │ └── lodash@3.10.1
│ │ │ ├── babel-plugin-react-constant-elements@1.0.3
│ │ │ ├── babel-plugin-react-display-name@1.0.3
│ │ │ ├── babel-plugin-remove-console@1.0.1
│ │ │ ├── babel-plugin-remove-debugger@1.0.1
│ │ │ ├── babel-plugin-runtime@1.0.7
│ │ │ ├─┬ babel-plugin-undeclared-variables-check@1.0.2
│ │ │ │ └── leven@1.0.2
│ │ │ ├── babel-plugin-undefined-to-void@1.1.6
│ │ │ ├── babylon@5.8.38
│ │ │ ├── bluebird@2.11.0
│ │ │ ├── core-js@1.2.7
│ │ │ ├─┬ detect-indent@3.0.1
│ │ │ │ ├── get-stdin@4.0.1
│ │ │ │ └── minimist@1.2.0
│ │ │ ├── fs-readdir-recursive@0.1.2
│ │ │ ├── globals@6.4.1
│ │ │ ├─┬ home-or-tmp@1.0.0
│ │ │ │ └── user-home@1.1.1
│ │ │ ├── is-integer@1.0.6
│ │ │ ├── js-tokens@1.0.1
│ │ │ ├── json5@0.4.0
│ │ │ ├── lodash@3.10.1
│ │ │ ├── minimatch@2.0.10
│ │ │ ├── output-file-sync@1.1.2
│ │ │ ├── path-exists@1.0.0
│ │ │ ├─┬ regenerator@0.8.40
│ │ │ │ ├─┬ commoner@0.10.8
│ │ │ │ │ ├─┬ commander@2.9.0
│ │ │ │ │ │ └── graceful-readlink@1.0.1
│ │ │ │ │ ├─┬ detective@4.5.0
│ │ │ │ │ │ ├── acorn@4.0.11
│ │ │ │ │ │ └── defined@1.0.0
│ │ │ │ │ ├── glob@5.0.15
│ │ │ │ │ ├── iconv-lite@0.4.15
│ │ │ │ │ ├── q@1.4.1
│ │ │ │ │ └─┬ recast@0.11.22
│ │ │ │ │   ├── ast-types@0.9.5
│ │ │ │ │   └── esprima@3.1.3
│ │ │ │ ├─┬ defs@1.1.1
│ │ │ │ │ ├─┬ alter@0.2.0
│ │ │ │ │ │ └── stable@0.1.5
│ │ │ │ │ ├── ast-traverse@0.1.1
│ │ │ │ │ ├── breakable@1.0.0
│ │ │ │ │ ├── simple-fmt@0.1.0
│ │ │ │ │ ├── simple-is@0.2.0
│ │ │ │ │ ├── stringmap@0.2.2
│ │ │ │ │ ├── stringset@0.2.1
│ │ │ │ │ ├── tryor@0.1.2
│ │ │ │ │ └─┬ yargs@3.27.0
│ │ │ │ │   ├── camelcase@1.2.1
│ │ │ │ │   ├─┬ cliui@2.1.0
│ │ │ │ │   │ ├─┬ center-align@0.1.3
│ │ │ │ │   │ │ ├─┬ align-text@0.1.4
│ │ │ │ │   │ │ │ ├─┬ kind-of@3.1.0
│ │ │ │ │   │ │ │ │ └── is-buffer@1.1.4
│ │ │ │ │   │ │ │ ├── longest@1.0.1
│ │ │ │ │   │ │ │ └── repeat-string@1.6.1
│ │ │ │ │   │ │ └── lazy-cache@1.0.4
│ │ │ │ │   │ ├── right-align@0.1.3
│ │ │ │ │   │ └── wordwrap@0.0.2
│ │ │ │ │   ├── decamelize@1.2.0
│ │ │ │ │   ├─┬ os-locale@1.4.0
│ │ │ │ │   │ └─┬ lcid@1.0.0
│ │ │ │ │   │   └── invert-kv@1.0.0
│ │ │ │ │   ├── window-size@0.1.4
│ │ │ │ │   └── y18n@3.2.1
│ │ │ │ ├── esprima-fb@15001.1001.0-dev-harmony-fb
│ │ │ │ ├─┬ recast@0.10.33
│ │ │ │ │ └── ast-types@0.8.12
│ │ │ │ └── through@2.3.8
│ │ │ ├─┬ regexpu@1.3.0
│ │ │ │ └── esprima@2.7.3
│ │ │ ├── repeating@1.1.3
│ │ │ ├── shebang-regex@1.0.0
│ │ │ ├─┬ source-map-support@0.2.10
│ │ │ │ └─┬ source-map@0.1.32
│ │ │ │   └── amdefine@1.0.1
│ │ │ └── try-resolve@1.0.1
│ │ └── clone@0.2.0
│ ├── clone@2.1.0
│ ├─┬ ember-cli-version-checker@1.2.0
│ │ └── semver@5.3.0
│ └─┬ resolve@1.3.2
│   └── path-parse@1.0.5
└─┬ ember-cli-htmlbars@1.1.1
  ├─┬ broccoli-persistent-filter@1.2.13
  │ ├─┬ async-disk-cache@1.0.9
  │ │ └─┬ istextorbinary@2.1.0
  │ │   ├── binaryextensions@2.0.0
  │ │   ├── editions@1.3.3
  │ │   └── textextensions@2.0.1
  │ ├─┬ md5-hex@1.3.0
  │ │ └── md5-o-matic@0.1.1
  │ ├── promise-map-series@0.2.3
  │ └── rsvp@3.4.0
  ├─┬ hash-for-dep@1.1.2
  │ └─┬ broccoli-kitchen-sink-helpers@0.3.1
  │   └── glob@5.0.15
  ├─┬ json-stable-stringify@1.0.1
  │ └── jsonify@0.0.0
  └─┬ strip-bom@2.0.0
    └── is-utf8@0.2.1

Installed and bundled ember-bootstrap@0.11.0
agilist@1.3.0 /Users/mitch/agilist/agilist/tmp/electron-build-tmp
└── ember-c3@0.3.0

Installed and bundled ember-c3@0.3.0
agilist@1.3.0 /Users/mitch/agilist/agilist/tmp/electron-build-tmp
└─┬ ember-cli-moment-shim@2.1.0
  ├── broccoli-stew@1.4.0
  ├── exists-sync@0.0.3
  ├── lodash.defaults@4.2.0
  └── moment@2.17.1

Installed and bundled ember-cli-moment-shim@2.1.0
agilist@1.3.0 /Users/mitch/agilist/agilist/tmp/electron-build-tmp
├─┬ ember-cli-moment-shim@2.1.0
│ └── moment@2.17.1
└── ember-pikaday@2.1.0

Installed and bundled ember-pikaday@2.1.0
agilist@1.3.0 /Users/mitch/agilist/agilist/tmp/electron-build-tmp
├─┬ ember-cli-moment-shim@2.1.0
│ └── moment@2.17.1
└─┬ json2csv@3.7.3
  ├─┬ cli-table@0.3.1
  │ └── colors@1.0.3
  ├── flat@2.0.1
  ├── lodash.clonedeep@4.5.0
  ├── lodash.flatten@4.4.0
  ├── lodash.get@4.4.2
  ├── lodash.set@4.3.2
  └── lodash.uniq@4.5.0

Installed and bundled json2csv@3.7.3
  CXX(target) Release/obj.target/keytar/src/main.o
In file included from ../src/main.cc:1:
In file included from ../../nan/nan.h:196:
../../nan/nan_maybe_43_inl.h:220:17: warning: 'CloneElementAt' is deprecated
      [-Wdeprecated-declarations]
  return array->CloneElementAt(GetCurrentContext(), index);
                ^
/Users/mitch/.node-gyp/6.9.1/include/node/v8.h:3032:36: note: 'CloneElementAt' has been
      explicitly marked deprecated here
                MaybeLocal<Object> CloneElementAt(Local<Context> context,
                                   ^
In file included from ../src/main.cc:1:
In file included from ../../nan/nan.h:202:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:40:29: warning: 'New' is deprecated
      [-Wdeprecated-declarations]
  return v8::BooleanObject::New(value).As<v8::BooleanObject>();
                            ^
/Users/mitch/.node-gyp/6.9.1/include/node/v8.h:4007:56: note: 'New' has been explicitly
      marked deprecated here
  V8_DEPRECATED("Pass an isolate", static Local<Value> New(bool value));
                                                       ^
In file included from ../src/main.cc:1:
../../nan/nan.h:2017:15: warning: 'SetAccessor' is deprecated [-Wdeprecated-declarations]
  return obj->SetAccessor(
              ^
/Users/mitch/.node-gyp/6.9.1/include/node/v8.h:2751:22: note: 'SetAccessor' has been
      explicitly marked deprecated here
                bool SetAccessor(Local<Name> name,
                     ^
3 warnings generated.
  CXX(target) Release/obj.target/keytar/src/keytar_mac.o
  SOLINK_MODULE(target) Release/keytar.node
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9
agilist@1.3.0 /Users/mitch/agilist/agilist/tmp/electron-build-tmp
├─┬ ember-cli-moment-shim@2.1.0
│ └── moment@2.17.1
└─┬ keytar@3.0.2
  └── nan@2.3.2

Installed and bundled keytar@3.0.2
agilist@1.3.0 /Users/mitch/agilist/agilist/tmp/electron-build-tmp
├─┬ ember-cli-moment-shim@2.1.0
│ └── moment@2.17.1
└── lodash@4.17.4

Installed and bundled lodash@4.17.4
agilist@1.3.0 /Users/mitch/agilist/agilist/tmp/electron-build-tmp
├─┬ ember-cli-moment-shim@2.1.0
│ └── moment@2.17.1
├── lodash@4.17.4
└── moment@2.17.1

Installed and bundled moment@2.17.1
agilist@1.3.0 /Users/mitch/agilist/agilist/tmp/electron-build-tmp
├─┬ ember-cli-moment-shim@2.1.0
│ └── moment@2.17.1
├── lodash@4.17.4
├── moment@2.17.1
└─┬ superagent@3.5.0
  └─┬ form-data@2.1.2
    └── asynckit@0.4.0

Installed and bundled superagent@3.5.0
agilist@1.3.0 /Users/mitch/agilist/agilist/tmp/electron-build-tmp
├─┬ ember-cli-moment-shim@2.1.0
│ └── moment@2.17.1
├── lodash@4.17.4
├── moment@2.17.1
└─┬ threads@0.7.2
  ├── eventemitter3@2.0.2
  └── native-promise-only@0.8.1

Installed and bundled threads@0.7.2
agilist@1.3.0 /Users/mitch/agilist/agilist/tmp/electron-build-tmp
├─┬ ember-cli-moment-shim@2.1.0
│ └── moment@2.17.1
├── lodash@4.17.4
├── moment@2.17.1
└── underscore@1.8.3

Installed and bundled underscore@1.8.3
agilist@1.3.0 /Users/mitch/agilist/agilist/tmp/electron-build-tmp
├─┬ ember-cli-moment-shim@2.1.0
│ └── moment@2.17.1
├── lodash@4.17.4
├── moment@2.17.1
├── underscore@1.8.3
└── uuid@2.0.3

Installed and bundled uuid@2.0.3
Recompiling native dependencies
WARNING: The version parameter is deprecated, use electronVersion (or --electron-version in the CLI) instead
Downloading electron-v0.37.5-win32-x64.zip
[============================================>] 100.0% of 47.05 MB (2.09 MB/s)
Packaging app for platform win32 x64 using electron v0.37.5

This is the command I run to package for Windows:

ember electron:package --platform=win32 --icon=icon-64x64.ico

This is my package.json:

{
  "name": "agilist",
  "productName": "Agilist",
  "version": "1.3.0",
  "description": "Agilist",
  "private": true,
  "directories": {
    "doc": "doc",
    "test": "tests"
  },
  "scripts": {
    "build": "ember build",
    "start": "ember server",
    "test": "ember test",
    "test_electron": "find ./tests_electron -name '*.spec.js' | xargs ./node_modules/.bin/electron-mocha",
    "test_ember_lib": "find ./tests_ember_lib -name '*.spec.js' | xargs ./node_modules/.bin/electron-mocha"
  },
  "repository": "",
  "engines": {
    "node": "= 6.9.1"
  },
  "author": "Agilist.IO, LLC",
  "devDependencies": {
    "agilist-common": "git+ssh://git@bitbucket.org/mitchio/agilist-common.git#edd9553",
    "broccoli-asset-rev": "2.5.0",
    "browserify": "14.1.0",
    "chai": "3.5.0",
    "chai-as-promised": "6.0.0",
    "devtron": "1.4.0",
    "dotenv": "2.0.0",
    "electron": "1.6.1",
    "electron-mocha": "3.3.0",
    "electron-packager": "8.5.2",
    "electron-rebuild": "1.5.7",
    "ember-ajax": "2.5.6",
    "ember-browserify": "1.1.13",
    "ember-c3": "0.3.0",
    "ember-c3-shim": "0.0.6",
    "ember-cli": "2.9.1",
    "ember-cli-app-version": "2.0.1",
    "ember-cli-babel": "5.2.4",
    "ember-cli-dependency-checker": "1.3.0",
    "ember-cli-dotenv": "1.2.0",
    "ember-cli-htmlbars": "1.1.1",
    "ember-cli-htmlbars-inline-precompile": "0.3.6",
    "ember-cli-inject-live-reload": "1.6.1",
    "ember-cli-jshint": "1.0.5",
    "ember-cli-moment-shim": "2.1.0",
    "ember-cli-qunit": "3.1.1",
    "ember-cli-release": "0.2.9",
    "ember-cli-sass": "5.5.1",
    "ember-cli-sri": "2.1.1",
    "ember-cli-test-loader": "1.1.1",
    "ember-cli-uglify": "1.2.0",
    "ember-d3": "0.2.0",
    "ember-data": "2.11.3",
    "ember-electron": "1.12.7",
    "ember-export-application-global": "1.1.1",
    "ember-font-awesome": "2.2.0",
    "ember-inspector": "2.0.4",
    "ember-load-initializers": "0.5.1",
    "ember-moment": "6.1.0",
    "ember-power-select": "1.0.0-beta.29",
    "ember-resolver": "2.1.1",
    "ember-sinon": "0.5.1",
    "ember-test-selectors": "0.0.4",
    "ember-welcome-page": "1.0.4",
    "loader.js": "4.2.2",
    "mocha": "3.2.0",
    "replay": "2.1.2",
    "sinon": "1.17.7",
    "sinon-as-promised": "4.0.2",
    "sinon-chai": "2.8.0",
    "superagent-mocker": "0.5.2"
  },
  "main": "electron.js",
  "ember-electron": {
    "WHAT IS THIS?": "Please see the README.md",
    "copy-files": [
      "electron.js",
      "package.json",
      "electron-aio-lib/*",
      "agilist.icns",
      "icon-64x64.ico"
    ],
    "osx-sign": true,
    "name": null,
    "platform": "darwin",
    "arch": "x64",
    "electronVersion": "1.6.1",
    "app-bundle-id": "io.agilist.agilist",
    "app-category-type": null,
    "app-copyright": null,
    "app-version": "1.3.0",
    "asar": null,
    "asar-unpack": null,
    "asar-unpack-dir": null,
    "build-version": "1.3.0.0",
    "cache": null,
    "extend-info": null,
    "extra-resource": null,
    "helper-bundle-id": null,
    "icon": "agilist.icns",
    "ignore": null,
    "out": null,
    "overwrite": null,
    "prune": null,
    "strict-ssl": null,
    "version-string": {
      "CompanyName": "Agilist.IO, LLC",
      "FileDescription": "Agilist.IO App",
      "OriginalFilename": null,
      "ProductName": "Agilist",
      "InternalName": "Agilist"
    }
  },
  "dependencies": {
    "agilist-lib": "git+ssh://git@bitbucket.org:mitchio/agilist-lib.git#a886d3c",
    "d3": "3.5.17",
    "electron-default-menu": "1.0.0",
    "electron-settings": "2.2.2",
    "ember-bootstrap": "0.11.0",
    "ember-c3": "0.3.0",
    "ember-cli-moment-shim": "2.1.0",
    "ember-pikaday": "2.1.0",
    "json2csv": "3.7.3",
    "keytar": "3.0.2",
    "lodash": "4.17.4",
    "moment": "2.17.1",
    "superagent": "3.5.0",
    "threads": "0.7.2",
    "underscore": "1.8.3",
    "uuid": "2.0.3"
  }
}

Thank you for any help you can provide!

gitmitch commented 7 years ago

Hmmm, I just found issue #284 in electron-packager:

This is because, as far as I know, there is no way to cross-compile native node modules. You would need to recreate a build environment entirely in Wine.

Maybe what I'm trying to do--build an Electron app for Windows on Mac that uses native modules--is impossible.

felixrieseberg commented 7 years ago

It's not impossible (Wine might help), but in my experience, getting macOS to compile windows binaries is a bigger pain than just to use a virtual machine (you can grab a free one over at modern.ie).

felixrieseberg commented 7 years ago

Follow-up: AppVeyor can also help.