Skip to content

Multi Platform Build

Max Claus Nunes edited this page Apr 16, 2016 · 22 revisions

Don't expect that you can build app for all platforms on one platform.

  • If your app has native dependencies, it can be compiled only on the target platform. prebuild is a solution, but most node modules don't provide prebuilt binaries.

  • OS Code Signing works only OS X. Cannot be fixed.

  • Windows Code Signing works only on Windows. We are going to fix it soon.

Don't think that mentioned issues are major, you should use build servers — e.g. AppVeyor to build Windows app and Travis to build OS X/Linux apps.

See sample appveyor.yml to build Electron app for Windows. And sample .travis.yml to build Electron app for OS X.

OS X

Use brew to install required packages.

To build app in distributable format for Windows on OS X:

brew install Caskroom/cask/xquartz wine mono

To build app in distributable format for Linux on OS X:

brew install ruby gnu-tar libicns graphicsmagick
gem install fpm

Linux

To build app in distributable format for Linux:

sudo apt-get install ruby-dev gcc make icnsutils graphicsmagick xz-utils
gem install fpm

To build app in distributable format for Windows on Linux:

  • Install Wine (1.8+ is required):

    sudo add-apt-repository ppa:ubuntu-wine/ppa
    sudo apt-get update
    sudo apt-get install wine1.8
    
  • Install Mono (4.2+ is required):

    sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
    echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
    sudo apt-get update
    sudo apt-get install mono-complete
    

To build app in 32 bit from a machine with 64 bit:

sudo apt-get install -y gcc-multilib g++-multilib

Windows

Not documented yet.

Clone this wiki locally