Free public Electron Build Service is used to build Electron app for Linux on Windows. 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). I am using electron-builder to package my app for windows, mac, and linux. Resulting packages are all the same size but for Mac, the file is twice that size. There's a huge app.asar.unpacked/ folder with frameworks from the build stage that are not needed.
Info Don’t expect that you can build app for all platforms on one platform. If your app has native dependency, it can be compiled only on the target platform unless is not used.
Is a solution, but most node modules prebuilt binaries. macOS Code Signing works only on macOS. Free public is used to build Electron app for Linux on Windows.
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). You can use build servers — e.g. To build macOS/Linux apps and to build Windows app. By default build for current platform and current arch. Use CLI flags -mac, -win, -linux to specify platforms.
And -ia32, -x64 to specify arch. For example, to build app for MacOS, Windows and Linux. Image: Visual Studio 2017 platform: - x64 cache: - nodemodules - '%USERPROFILE%.electron' init: - git config -global core.autocrlf input install: - ps: Install-Product node 8 x64 - yarn buildscript: - yarn dist test: off macOS All required system dependencies (except rpm) will be downloaded automatically on demand on macOS 10.12+ (macOS Sierra). On Travis, please add osximage: xcode9.0 (see above sample.travis.yml).
To build rpm: brew install rpm. Linux You can use to avoid installing system dependencies. To build app in distributable format for Linux. Sudo apt-get install -no-install-recommends -y libopenjp2-tools To build rpm: sudo apt-get install -no-install-recommends -y rpm (or sudo yum install rpm-build).
To build pacman: sudo apt-get install -no-install-recommends -y bsdtar. To build snap: sudo apt-get install -no-install-recommends -y snapcraft. To build app for Windows on Linux: ( electronuserland/builder:wine) is recommended to avoid installing system dependencies. Install Wine (2.0+ is required) — see. Install (4.2+ is required) if you want to use Squirrel.Windows (NSIS, default target, doesn’t require mono).
To build app in 32 bit from a machine with 64 bit. Tip If you don’t need to build Windows, use image electronuserland/builder (wine is not installed in this image). Provided Docker Images. electronuserland/builder:base — Required system dependencies.
Not supposed to be used directly. electronuserland/builder:10 or builder — NodeJS 10 and required system dependencies. Based on builder:base. Use this image if you need to build only Linux targets.
electronuserland/builder:wine — Wine, NodeJS 10 and required system dependencies. Based on builder:10. Use this image if you need to build Windows targets. electronuserland/builder:wine-mono — Mono for Squirrel.Windows.
Based on builder:wine. Use this image if you need to build Squirrel.Windows target. electronuserland/builder:wine-chrome — google-chrome-stable and xvfb are available — you can use this image for headless testing of Electron application. Based on builder:wine.