From c26da5cf7289eb5952376b8bf5ce5e05e00e0b41 Mon Sep 17 00:00:00 2001 From: liangxu Date: Thu, 7 May 2026 13:54:04 +0800 Subject: [PATCH] feat(installer): add custom install and uninstall macros for Shengxintui protocol --- apps/desktop-client/build/installer.nsh | 12 ++++++++++++ apps/desktop-client/electron-builder.yml | 1 + 2 files changed, 13 insertions(+) create mode 100644 apps/desktop-client/build/installer.nsh diff --git a/apps/desktop-client/build/installer.nsh b/apps/desktop-client/build/installer.nsh new file mode 100644 index 0000000..324e39e --- /dev/null +++ b/apps/desktop-client/build/installer.nsh @@ -0,0 +1,12 @@ +!macro customInstall + WriteRegStr SHELL_CONTEXT "Software\Classes\shengxintui" "" "URL:Shengxintui Protocol" + WriteRegStr SHELL_CONTEXT "Software\Classes\shengxintui" "URL Protocol" "" + WriteRegStr SHELL_CONTEXT "Software\Classes\shengxintui\DefaultIcon" "" "$appExe,0" + WriteRegStr SHELL_CONTEXT "Software\Classes\shengxintui\shell" "" "open" + WriteRegStr SHELL_CONTEXT "Software\Classes\shengxintui\shell\open" "" "Open" + WriteRegStr SHELL_CONTEXT "Software\Classes\shengxintui\shell\open\command" "" `"$appExe" "%1"` +!macroend + +!macro customUnInstall + DeleteRegKey SHELL_CONTEXT "Software\Classes\shengxintui" +!macroend diff --git a/apps/desktop-client/electron-builder.yml b/apps/desktop-client/electron-builder.yml index 1dbe828..63bc095 100644 --- a/apps/desktop-client/electron-builder.yml +++ b/apps/desktop-client/electron-builder.yml @@ -76,6 +76,7 @@ nsis: oneClick: false perMachine: false allowToChangeInstallationDirectory: true + include: build/installer.nsh linux: category: Office target: