electron / universal

Create Universal macOS applications from two x64 and arm64 Electron applications
MIT License
112 stars 43 forks source link

Universal build fail when app using native modules #14

Closed squalle0nhart closed 3 years ago

squalle0nhart commented 3 years ago

Error message:

Expected all non-binary files to have identical SHAs when creating a universal build but "Contents/Info.plist" did not

It seem that Contents/Info.plist current have AsarIntegrity value that contain checksum of app.asar file. However with some native modules app.asar contents is different. That make SHA check fail and universal build will fail.

Is there any way to ignore some files with SHA checking ?

MarshallOfSound commented 3 years ago

Is there any way to ignore some files with SHA checking ?

No, the "AsarIntegrity" feature of electron-builder is fundamentally a terrible idea and if possible you should just turn off that feature 👍 For example, this error is legit. If you choose a single AsarIntegrity hash the integrity check will failure dramatically on a universal binary because the content will be different. It's a not-great solution to a barely existent problem 😄

MarshallOfSound commented 3 years ago

To further clarify the SHA checking is key to the functional success of this module, if the SHAs don't match the resultant app will be unpredictable in behavior as you started two divergent apps.