electron / universal

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

Universal build fails with warning SHAs are not identical #10

Closed NielsLeenheer closed 3 years ago

NielsLeenheer commented 3 years ago
Error: Expected all non-binary files to have identical SHAs when creating a universal build but "Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/vk_swiftshader_icd.json" did not

Which is weird, since when running shasum manually it tells me that the files are identical:

shasum Salonhub-darwin-*64/Salonhub.app/Contents/Frameworks/Electron\ Framework.framework/Versions/A/Libraries/vk_swiftshader_icd.json 
8734c383f004e365904068c9cde7999aab0b54c6  Salonhub-darwin-arm64/Salonhub.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/vk_swiftshader_icd.json
8734c383f004e365904068c9cde7999aab0b54c6  Salonhub-darwin-x64/Salonhub.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/vk_swiftshader_icd.json
NielsLeenheer commented 3 years ago

It appears the problem is present in 1.0.2 and 1.0.3. Rolling back to 1.0.1 fixes the issue.

MarshallOfSound commented 3 years ago

Hm, I wonder if my rewrite to make the sha method async by using streams has a flaw. It worked with my local apps

NielsLeenheer commented 3 years ago

A fix is available in PR #11 😀

MarshallOfSound commented 3 years ago

Fixed in 477a52e

ishowshao commented 3 years ago

Contents/_CodeSignature/CodeResources always different

NielsLeenheer commented 3 years ago

Are you perhaps signing the binaries first? That would cause them to be different.

The universal binary should be created from unsigned arm64 and x64 binaries. And finally the universal binary needs to be signed and notarized.

ishowshao commented 3 years ago

it seems electron-builder will sign...

ishowshao commented 3 years ago

but, how can i get the .app before electron-builder build

jwoo0122 commented 3 years ago

but, how can i get the .app before electron-builder build

You can use electron-packager for generate .app file.