diff --git a/package.json b/package.json index 924f3c3..084acfa 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@electron/universal", + "name": "@spotxyz/universal", "version": "0.0.0-development", "description": "Utility for creating Universal macOS applications from two x64 and arm64 Electron applications", "main": "dist/cjs/index.js", diff --git a/src/index.ts b/src/index.ts index dd0839c..17932c8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -117,6 +117,17 @@ export const makeUniversalApp = async (opts: MakeUniversalOpts): Promise = const first = await fs.realpath(path.resolve(tmpApp, machOFile.relativePath)); const second = await fs.realpath(path.resolve(opts.arm64AppPath, machOFile.relativePath)); + const x64Sha = await sha(path.resolve(opts.x64AppPath, machOFile.relativePath)); + const arm64Sha = await sha(path.resolve(opts.arm64AppPath, machOFile.relativePath)); + if (x64Sha === arm64Sha) { + d( + 'SHA for Mach-O file', + machOFile.relativePath, + `matches across builds ${x64Sha}===${arm64Sha}, skipping lipo`, + ); + continue; + } + d('joining two MachO files with lipo', { first, second,