AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
fix: prevent launching EdgeEver from installer disk
tianma-if6e3a623e3b30
diff --git a/apps/desktop/README.md b/apps/desktop/README.mdindex 53a1473f..ec8e43ae 100644--- a/apps/desktop/README.md+++ b/apps/desktop/README.md@@ -31,6 +31,11 @@ CSC_IDENTITY_AUTO_DISCOVERY=false bun run --cwd apps/desktop dist -- --publish nThe resulting DMG, NSIS installer, or AppImage is written under`release/desktop`. The CI workflow accepts optional signing secrets:+On macOS, users must drag EdgeEver to `Applications`, eject the mounted DMG,+and launch the copy from `Applications`. The packaged app refuses to run+directly from the installer disk because macOS registers both copies in+file-association menus, which can make EdgeEver appear twice.+- `EDGEEVER_MAC_CERTIFICATE_BASE64` and `EDGEEVER_MAC_CERTIFICATE_PASSWORD`- `EDGEEVER_APPLE_ID`, `EDGEEVER_APPLE_APP_SPECIFIC_PASSWORD`, and `EDGEEVER_APPLE_TEAM_ID`- `EDGEEVER_WINDOWS_CERTIFICATE_BASE64` and `EDGEEVER_WINDOWS_CERTIFICATE_PASSWORD`diff --git a/apps/desktop/electron-builder.yml b/apps/desktop/electron-builder.ymlindex 8d26b90b..fb6a999b 100644--- a/apps/desktop/electron-builder.yml+++ b/apps/desktop/electron-builder.yml@@ -46,7 +46,7 @@ mac:- arm64artifactName: EdgeEver-${version}-mac-${arch}.${ext}dmg:- title: "EdgeEver: drag to Applications, then double-click"+ title: "EdgeEver: drag to Applications, eject this disk, then launch"backgroundColor: '#f5f7f6'iconSize: 112window:diff --git a/apps/desktop/src/main/index.mjs b/apps/desktop/src/main/index.mjsindex 1e5f58f5..c1692d85 100644--- a/apps/desktop/src/main/index.mjs+++ b/apps/desktop/src/main/index.mjs@@ -11,6 +11,7 @@ import { accountDataDirectory, accountScopeKey } from "./account-scope.mjs";import { rotateDiagnosticLog } from "./diagnostic-log.mjs";import { restrictDirectory, restrictFile } from "./file-permissions.mjs";import { normalizeStagedResourceInput } from "./staged-resource.mjs";+import { isMountedInstallerPath } from "./installation-location.mjs";import electronUpdater from "electron-updater";const { autoUpdater } = electronUpdater;@@ -444,6 +445,22 @@ const confirmMacInstallation = async () => {};app.whenReady().then(async () => {+ if (app.isPackaged && isMountedInstallerPath(app.getAppPath())) {+ const isChinese = app.getLocale().toLowerCase().startsWith("zh");+ await dialog.showMessageBox({+ type: "info",+ title: isChinese ? "请先安装 EdgeEver" : "Install EdgeEver first",+ message: isChinese+ ? "请先将 EdgeEver 拖入“应用程序”文件夹。"+ : "Please move EdgeEver to the Applications folder first.",+ detail: isChinese+ ? "请关闭此窗口,将 EdgeEver 拖入“应用程序”,然后推出安装盘,再从“应用程序”启动。这样可以避免 macOS 显示两个 EdgeEver。"+ : "Close this window, drag EdgeEver to Applications, eject the installer disk, and then launch it from Applications. This prevents macOS from showing duplicate EdgeEver entries.",+ buttons: [isChinese ? "知道了" : "Done"],+ });+ app.quit();+ return;+ }if (!hasSingleInstanceLock) {app.quit();return;diff --git a/apps/desktop/src/main/installation-location.mjs b/apps/desktop/src/main/installation-location.mjsnew file mode 100644index 00000000..b89237be--- /dev/null+++ b/apps/desktop/src/main/installation-location.mjs@@ -0,0 +1,4 @@+export const isMountedInstallerPath = (appPath, platform = process.platform) => {+ if (platform !== "darwin" || typeof appPath !== "string") return false;+ return appPath === "/Volumes" || appPath.startsWith("/Volumes/");+};diff --git a/apps/desktop/src/main/installation-location.test.mjs b/apps/desktop/src/main/installation-location.test.mjsnew file mode 100644index 00000000..69a54a32--- /dev/null+++ b/apps/desktop/src/main/installation-location.test.mjs@@ -0,0 +1,16 @@+import { describe, expect, test } from "bun:test";+import { isMountedInstallerPath } from "./installation-location.mjs";++describe("macOS installation location", () => {+ test("recognizes an app launched from a mounted volume", () => {+ expect(isMountedInstallerPath("/Volumes/EdgeEver/EdgeEver.app/Contents/Resources/app.asar", "darwin")).toBe(true);+ });++ test("does not reject the installed Applications copy", () => {+ expect(isMountedInstallerPath("/Applications/EdgeEver.app/Contents/Resources/app.asar", "darwin")).toBe(false);+ });++ test("does not apply the macOS rule on other platforms", () => {+ expect(isMountedInstallerPath("/Volumes/EdgeEver/EdgeEver.app/Contents/Resources/app.asar", "win32")).toBe(false);+ });+});