wojtkowiak / meteor-desktop

Build a Meteor's desktop client with hot code push.
MIT License
449 stars 85 forks source link

build-installer on Linux doesn't attempt build for other platforms #195

Open lunafi-evan opened 5 years ago

lunafi-evan commented 5 years ago

I'm trying to build for Windows on a Linux machine, but no matter what I do it always builds for Linux only.

The documentation is unclear of where the --win flag should go, I've tried both of these below:

meteor-desktop -- build-installer localhost:3000 --win,
meteor-desktop -- build-installer --win localhost:3000

According to the electron-builder documentation:

On macOS/Linux you can build Electron app for Windows locally, except Appx for Windows Store (in the future (feel free to file issue) electron-build-service will support Appx target).

But I only ever get the build for the Linux target. This is the build output below


METEOR-DESKTOP v1.6.0

package/build-installer implies setting --production, setting it for you
REMINDER: your Meteor project should be running now on port 3000

INFO  index:  initializing
INFO  electronApp:  scaffolding
VERBOSE  desktop:  checking .desktop existence
VERBOSE  meteorApp:  updating .meteor/.gitignore
VERBOSE  meteorApp:  desktopHCP is enabled, checking for required packages
VERBOSE  electronAppScaffold:  clearing desktop-build
VERBOSE  electronAppScaffold:  creating /home/myuser/devel/myapp/webapp/.meteor/desktop-build/app
VERBOSE  electronAppScaffold:  copying skeleton app
VERBOSE  electronAppScaffold:  writing package.json
VERBOSE  electronApp:  updating package.json fields
DEBUG  electronApp:  writing updated package.json
INFO  electronApp:  updating list of package.json's dependencies
DEBUG  electronApp:  merging settings.json[dependencies]
DEBUG  electronApp:  merging settings.json[plugins]
DEBUG  electronApp:  merging dependencies from modules
DEBUG  electronApp:  writing updated package.json
VERBOSE  electronApp:  calculating compatibility version
DEBUG  electronApp:  meteor-desktop compatibility version is  1
DEBUG  electronApp:  .desktop compatibility version is  0
INFO  electronApp:  clearing node_modules because this is a production build
INFO  electronApp:  issuing node_modules install from electron-builder
VERBOSE  electronApp:  rebuilding for x64
DEBUG  electronBuilder:  calling installOrRebuild from electron-builder for arch x64
  • installing production dependencies platform=linux arch=x64 appDir=/home/myuser/devel/myapp/webapp/.meteor/desktop-build
INFO  electronApp:  packing skeleton app and node_modules to asar archive
VERBOSE  binaryModulesDetector:  detecting node modules with binary files
DEBUG  electronApp:  moving node_modules to app dir
DEBUG  electronApp:  packing
DEBUG  electronApp:  moving node_modules back from app dir
DEBUG  electronApp:  deleting source files
VERBOSE  electronApp:  copying .desktop to temporary location
DEBUG  electronApp:  updating settings.json fields
INFO  desktop:  calculating hash version from .desktop contents
VERBOSE  desktop:  calculated .desktop hash version is 03848c4fd5346013da33bc2d0a0ea258f89158e5
INFO  electronApp:  excluding files from packing
INFO  electronApp:  transpiling and uglifying
INFO  electronApp:  packing .desktop to asar
VERBOSE  electronApp:  clearing temporary .desktop
INFO  meteorApp:  checking for any mobile platform
INFO  meteorApp:  building meteor app
DEBUG  meteorApp:  clearing build dir
INFO  meteorApp:  acquiring index.html
(node:26682) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
INFO  meteorApp:  successfully downloaded index.html from running meteor app
VERBOSE  meteorApp:  copying mobile build
INFO  meteorApp:  acquiring manifest.json
INFO  meteorApp:  successfully downloaded manifest.json from running meteor app
INFO  meteorApp:  mobile build copied to electron app
DEBUG  meteorApp:  copy cordova.js to meteor build
INFO  meteorApp:  injecting isDesktop
INFO  meteorApp:  injected successfully
INFO  meteorApp:  successfully updated ddp string in the runtime config of a mobile build to --win/
INFO  meteorApp:  packing meteor app to asar archive
VERBOSE  meteorApp:  clearing meteor app after packing
INFO  meteorApp:  meteor build finished
INFO  electronApp:  built
DEBUG  electronBuilder:  calling build from electron-builder
  • electron-builder version=20.23.1
  • writing effective config file=.desktop-installer/builder-effective-config.yaml
DEBUG  electronBuilder:  moving node_modules out, because we have them already in app.asar
mv /home/myuser/devel/myapp/webapp/.meteor/desktop-build/node_modules /home/myuser/devel/myapp/webapp/.meteor/.desktop_node_modules
  • packaging       platform=linux arch=x64 electron=2.0.5 appOutDir=.desktop-installer/linux-unpacked
DEBUG  electronBuilder:  moving node_modules back
DEBUG  electronBuilder:  node_modules moved back
  • building        target=AppImage arch=x64 file=.desktop-installer/Coygo.AppImage
trukhilio commented 5 years ago

Hey, @lunafi-evan! You can use this command for building the Windows app: meteor-desktop build-installer -- localhost:3000 --win --build-meteor --meteor-settings settings.json If you don't have any meteor settings you can remove --meteor-settings settings.json I hope it would help you to build the app!

Coygo commented 5 years ago

@lunafi-evan - If you put the meteor-desktop in a separate script and then run meteor npm run it should fix your issue.

script: {
   "desktop": "meteor-desktop"
   "build": "meteor npm run desktop -- build-installer ......."

This way arguments are being correctly passed in.