Can't use extraFiles that contain Universal binaries
See original GitHub issue- Version: 22.10.4
- Electron Version: 11.2.0
- Electron Type (current, beta, nightly): current
- Target: macOS Universal
I have universal binaries built from another project which I want to include via extraFiles, and have been doing so a while, but I’ve since updated builds to create Universal binaries.
I’m specifying the folder for the binaries as:
"extraFiles": [
{
"from": "binaries/${arch}",
"to": "binaries"
}
],
So the configuration only expects to find files in x64 and arm64 folders, so it only attributes these files to one of those architectures.
Ideally, it should either test the contents of the files given in either folder, or have a new configuration option for a ‘universal’ arch to indicate the files are already universal, or additionally search the universal arch as well as x64 and arm64.
I’ve resorted to splitting the binaries with lipo -extract
for now so that builder is happy, but I don’t think this is an ideal solution.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:17 (2 by maintainers)
Top GitHub Comments
My prebuilt universals get lipo extracted before the build into binaries/arm64 and binaries/x64
Then included into the package with extraFiles:
The builder then uses lipo to recombine them back again.
Pretty sure any changes that could be made here for detecting whether a binary is already universal would be part of either @electron/electron-osx-sign or @electron/universal libraries.
I’d advocate for using this workaround https://github.com/electron-userland/electron-builder/issues/5552#issuecomment-805615861