Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardcoded path causes notarization to fail on arm64 (and generally different targets) #251

Open
nc7s opened this issue Oct 26, 2023 · 0 comments

Comments

@nc7s
Copy link
Contributor

nc7s commented Oct 26, 2023

Released .app is built for x86_64, electron-builder puts artifacts for it in release/mac. But on arm64 aka M1/2, it's release/mac-arm64. A rather cryptic spawn ditto ENOENT error is thus caused by this line:

appPath: `release/mac/BreakTimer.app`,

It can of course be fixed with a query into electron-builder, but there's another route: to build a universal binary. This would introduce yet another ~100MiB to the final .app (from Electron Framework), but it's already ~200 anyway. This can be achieved with:

--- a/package.json
+++ b/package.json
@@ -66,7 +66,12 @@
       "gatekeeperAssess": false,
       "hardenedRuntime": true,
       "target": [
-        "dmg"
+        {
+          "target": "dmg",
+          "arch": [
+            "universal"
+          ]
+        }
       ]
     },
     "dmg": {

By the way, electron-notarize has changed to @electron/notarize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant