Closed javierguzman closed 9 months ago
osxUniversal: {
x64ArchFiles: "*",
},
This is simply wrong, this is saying "btw you are wrong and every file is an x64 file do whatever you want" rather than letting universal warn you when files aren't correctly split between x64 and arm64. Remove that config line and universal should be warning you about your .node
files not being rebuilt as expected
And what should I do when I am warned about files not being rebuilt as expected?
Rebuild it for the correct architecture? To build a universal app you should be packaging for x64 and arm64 and then stitching them together. Tools like packager and forge will do this for you.
If you're using packager in isolation or spinning your own tooling you'll need to ensure you're calling @electron/rebuild before packaging your app for each architecture and rebuilding your native modules for the right architecture.
Thanks @MarshallOfSound , I am using electron forge. So if I leave only the package.json with what I had:
"mac": {
"entitlements": "./build/entitlements.plist",
"category": "public.app-category.utilities",
"target": [
{
"target": "dmg",
"arch": [
"universal"
]
}
]
}
Should that be enough? I am not trying myself because I am not anymore in that project and I ended up generating one executable for each architecture. I am curious for future.
That doesn't appear to be a forge config
That is within the package.json, I remember I saw that in an open source project which was using (presumably) electron/universal correctly. I have just taken another look at the readme of this project and it says to use it like so:
await makeUniversalApp({
x64AppPath: 'path/to/App_x64.app',
arm64AppPath: 'path/to/App_arm64.app',
outAppPath: 'path/to/App_universal.app',
});
Should that go on electron.config.js makers section or where? Thank you again Samuel
Hello all,
I have the following in the package.json:
My electron forge looks like this:
Then I get the error
Any clue what is it going on?
Thank you in advance and regards