0

I want to create my electron app installer for windows, mac and linux however currectly it's only creating .exe file:

enter image description here

and some win-unpacked directory and some other files which I don't even know why I need because .exe file is installing my app and creating desktop shortcut and I don't even need those extra files to get app to work.

In other word - when I just copy .exe and run on other machine then it's succesfully installing therefore why I even need those other files?


So it's working correctly with windows but it does not create any files that I could run on macOS and linux like .dmg.

This is my package.json

{ "name": "screenrecorder", "version": "1.0.0", "description": "Electron application to record screen", "main": "./src/js/main/index.js", "scripts": { "start": "electron ./src/js/main/index.js", "compile:sass": "node-sass src/style/scss/main.scss src/style/css/output.css -w", "build": "electron-builder" }, "repository": { "type": "git", "url": "https://github.com/d0peCode/screenRecorder" }, "build": { "appId": "screenrecorder", "mac": { "category": "your.app.category.type", "target": "dmg" } }, "author": "Borys Tyminski", "license": "ISC", "homepage": "https://github.com/d0peCode/screenRecorder#readme", "dependencies": { "angular": "^1.6.5", "angular-route": "^1.6.5" }, "devDependencies": { "electron": "^6.0.2", "electron-builder": "^21.2.0", "node-sass": "^4.9.2" } } 

And this is my log from terminal after running npm run build

C:\Users\Borys\Documents\work\screenRecorder\desktop>npm run build

[email protected] build >C:\Users\Borys\Documents\work\screenRecorder\desktop

electron-builder

• electron-builder version=21.2.0 os=10.0.18362

• loaded configuration file=package.json ("build" field)

• writing effective config file=dist\builder-effective-config.yaml

• packaging platform=win32 arch=x64 electron=6.0.6 appOutDir=dist\win-unpacked

• default Electron icon is used reason=application icon is not set

• building target=nsis file=dist\screenrecorder Setup 1.0.0.exe archs=x64 oneClick=true perMachine=false

• building block map blockMapFile=dist\screenrecorder Setup 1.0.0.exe.blockmap

Why it doesn't create macOS installer? And what are steps to make it do so?

2
  • What OS are you using for development? Also could we see the log output of your build process? Commented Sep 18, 2019 at 0:40
  • I use windows 10, I'll edit question with the log Commented Sep 18, 2019 at 13:35

1 Answer 1

0

You can not build macOS executables with Electron on Windows as it requires the Apple SDK and XCode tools. Linux works but you need to specify the format and architecture in your build configuration.

For example to build a Linux executable in AppImage format for ARMv7l CPUs you can use this configuration:

linux: { target: { target: 'appimage', arch: ['armv7l'] } } 

The full documentation on Linux build options is available here.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.