From 8466dfdab29389a6aff83ee84f4fb6182420ab23 Mon Sep 17 00:00:00 2001 From: SimonLaux Date: Mon, 17 Jun 2024 13:20:21 +0200 Subject: [PATCH 1/2] skip `requestSingleInstanceLock` on mac appstore builds (mas), because it made it unable to start the app on older macOS devices. closes #3938 --- CHANGELOG.md | 3 +++ src/main/index.ts | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd24507613..9140367866 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## [Unreleased][unreleased] +### Fixed +- skip `requestSingleInstanceLock` on mac appstore builds (mas), because it made it unable to start the app on older macOS devices. + ## [v1.46.0] - 2024-06-10 diff --git a/src/main/index.ts b/src/main/index.ts index 3626e05140..afe5e87d4f 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -70,7 +70,10 @@ protocol.registerSchemesAsPrivileged([ const app = rawApp as ExtendedAppMainProcess app.rc = rc -if (!app.requestSingleInstanceLock()) { +// requestSingleInstanceLock always returns false on mas (mac app store) builds +// due to electron issue https://github.com/electron/electron/issues/35540 +// dc-desktop issue: https://github.com/deltachat/deltachat-desktop/issues/3938 +if (!process.mas && !app.requestSingleInstanceLock()) { /* ignore-console-log */ console.error('Only one instance allowed. Quitting.') app.quit() From 972a9b59605372ea965e01afab06fd97fc9a8b28 Mon Sep 17 00:00:00 2001 From: SimonLaux Date: Mon, 17 Jun 2024 14:08:53 +0200 Subject: [PATCH 2/2] Add pr number to changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9140367866..c13d22089e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## [Unreleased][unreleased] ### Fixed -- skip `requestSingleInstanceLock` on mac appstore builds (mas), because it made it unable to start the app on older macOS devices. +- skip `requestSingleInstanceLock` on mac appstore builds (mas), because it made it unable to start the app on older macOS devices. #3946