Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

fix(desktop): allow custom Windows install paths

tianma-ifc032612f97fd
diff --git a/apps/desktop/electron-builder.yml b/apps/desktop/electron-builder.yml
index 82ecde80..d04a1a56 100644
--- a/apps/desktop/electron-builder.yml
+++ b/apps/desktop/electron-builder.yml
@@ -69,6 +69,10 @@ win:
target:
- nsis
artifactName: EdgeEver-${version}-windows-${arch}.${ext}
+nsis:
+ oneClick: false
+ allowToChangeInstallationDirectory: true
+ perMachine: false
linux:
category: Utility
syncDesktopName: true
diff --git a/apps/desktop/src/main/desktop-update-flow.test.mjs b/apps/desktop/src/main/desktop-update-flow.test.mjs
index efa91345..09afc6d3 100644
--- a/apps/desktop/src/main/desktop-update-flow.test.mjs
+++ b/apps/desktop/src/main/desktop-update-flow.test.mjs
@@ -11,7 +11,7 @@ describe("desktop update flow", () => {
test("downloads updates in the background and relaunches after installation", () => {
expect(mainSource).toContain('autoUpdater.autoDownload = process.platform !== "win32"');
expect(mainSource).toContain("autoUpdater.autoRunAppAfterInstall = true");
- expect(mainSource).toContain("isQuitting = true;\n autoUpdater.quitAndInstall(false, true)");
+ expect(mainSource).toContain('autoUpdater.quitAndInstall(process.platform === "win32", true)');
expect(mainSource).toContain("result?.downloadPromise");
expect(mainSource).toContain("downloadTrustedDesktopUpdate(reason)");
});
diff --git a/apps/desktop/src/main/index.mjs b/apps/desktop/src/main/index.mjs
index 585de93b..f725f8b1 100644
--- a/apps/desktop/src/main/index.mjs
+++ b/apps/desktop/src/main/index.mjs
@@ -738,7 +738,9 @@ const installDownloadedUpdate = () => {
// The normal window close handler hides the app. Mark this as a real quit
// before electron-updater closes windows so installation can proceed.
isQuitting = true;
- autoUpdater.quitAndInstall(false, true);
+ // Fresh Windows installs use an assisted installer, while updates must stay
+ // silent and preserve the installation directory selected by the user.
+ autoUpdater.quitAndInstall(process.platform === "win32", true);
return { started: true };
};
diff --git a/scripts/desktop-build-workflow.test.mjs b/scripts/desktop-build-workflow.test.mjs
index d7bd496d..496c875b 100644
--- a/scripts/desktop-build-workflow.test.mjs
+++ b/scripts/desktop-build-workflow.test.mjs
@@ -6,6 +6,7 @@ const mobileWorkflow = readFileSync(new URL("../.github/workflows/mobile-build.y
const desktopPackageVerifier = readFileSync(new URL("./verify-desktop-package.mjs", import.meta.url), "utf8");
const packagedStartupVerifier = readFileSync(new URL("./verify-packaged-desktop-startup.mjs", import.meta.url), "utf8");
const cargoConfig = readFileSync(new URL("../.cargo/config.toml", import.meta.url), "utf8");
+const desktopBuilderConfig = readFileSync(new URL("../apps/desktop/electron-builder.yml", import.meta.url), "utf8");
function step(name) {
const start = workflow.indexOf(` - name: ${name}\n`);
@@ -92,6 +93,12 @@ describe("desktop release workflow", () => {
expect(desktopPackageVerifier).toContain("isVisualCppRuntimeDll");
expect(cargoConfig).toContain('target.x86_64-pc-windows-msvc');
expect(cargoConfig).toContain('target-feature=+crt-static');
+ expect(desktopBuilderConfig).toContain([
+ "nsis:",
+ " oneClick: false",
+ " allowToChangeInstallationDirectory: true",
+ " perMachine: false",
+ ].join("\n"));
expect(desktopPackageVerifier).toContain(
'path.replaceAll("\\\\", "/")',
);