electron-builder
electron-builder copied to clipboard
How can I specify different build options for arm64 and x64 packages
- Electron-Builder Version: v23.3.1
- Node Version: v16.14.0
- Electron Version: v19.0.10
- Target: MacOS universal (arm64 and x64)
I want to add own extra file to universal Mac package
extraFiles: [ { from: "native/target/release/", to: "./Frameworks", filter: ["auxtool"], }, ]
However on x64 and arm64 packages merge I get the error below
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: /Users/admin/apps/workspace/temp/buildTmp/electron-universal-81hBIr/Tmp.app/Contents/Frameworks/auxtool and /Users/admin/apps/workspace/UMA/dist/mac-universal--arm64/UniversalMacApp.app/Contents/Frameworks/auxtool have the same architectures (arm64) and can't be in the same fat output file
Is there a way to provide different build options for arm64 and x64 packages?
I think you can use either x64ArchFiles or singleArchFiles
https://www.electron.build/configuration/mac
@semenov-oleg were you able to get it to work with x64ArchFiles? I tried this flag yet builder still tries to bundle it
same issue, any solution?
I finally got it resolved. I found that using x64ArchFiles in lower versions of electron-builder resulted in an error, and then I updating electron-builder to version 24 or higher resolved the issue. similar issue like: https://github.com/electron-userland/electron-builder/issues/7303