Reputation: 3586
I'm trying to build my veu electron app using electron builder. I want to target macOS and windows with a portable release, anyway after click on electron:build
option in vue ui, it will only create the dmg for macOS. Here is my vue.config.js
file. I'm not very experienced with electron builder, can anyone help me?
module.exports = {
pluginOptions: {
electronBuilder: {
outputDir: 'build',
builderOptions: {
mac: {
target: 'dmg',
icon: 'build/icon.icns',
asar: true
},
win: {
target: 'portable',
icon: 'build/icon.icns',
asar: true
}
},
preload: 'src/preload.js'
}
}
}
Upvotes: 2
Views: 1466
Reputation: 2185
There is no simple answer for this. Generally, you can only build your app for the platform you are on. There are some exceptions to the rule that are shown in the documentation.
It seems the best way for you to do this would be to use a docker image such as electronuserland/builder:wine
via Docker for Mac.
After installing Docker for Mac, you should be able to use the steps provided in the docs.
Upvotes: 2