From 14747cac1059cebf72c5e94268df04cdae5d05e3 Mon Sep 17 00:00:00 2001 From: alger Date: Wed, 1 Jan 2025 13:12:46 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E4=BC=98=E5=8C=96=E6=89=93?= =?UTF-8?q?=E5=8C=85=E5=92=8C=E7=89=88=E6=9C=AC=E6=9B=B4=E6=96=B0=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/installer.nsh | 13 +++ package.json | 42 ++++++--- .../components/common/UpdateModal.vue | 58 ++++-------- src/renderer/layout/components/SearchBar.vue | 13 ++- src/renderer/utils/index.ts | 44 +-------- src/renderer/utils/update.ts | 91 +++++++++++++++++++ src/renderer/views/set/index.vue | 23 +++-- 7 files changed, 173 insertions(+), 111 deletions(-) create mode 100644 build/installer.nsh create mode 100644 src/renderer/utils/update.ts diff --git a/build/installer.nsh b/build/installer.nsh new file mode 100644 index 0000000..4188a53 --- /dev/null +++ b/build/installer.nsh @@ -0,0 +1,13 @@ +# 设置 Windows 7 兼容性 +ManifestDPIAware true +ManifestSupportedOS all + +!macro customInit + # 检查系统版本 + ${If} ${AtLeastWin7} + # Windows 7 或更高版本 + ${Else} + MessageBox MB_OK|MB_ICONSTOP "此应用程序需要 Windows 7 或更高版本。" + Abort + ${EndIf} +!macroend \ No newline at end of file diff --git a/package.json b/package.json index 8f876ba..87810fa 100644 --- a/package.json +++ b/package.json @@ -93,35 +93,47 @@ "x64", "arm64" ] - }, - { - "target": "zip", - "arch": [ - "x64", - "arm64" - ] } - ] + ], + "artifactName": "${productName}-${version}-mac-${arch}.${ext}", + "darkModeSupport": true }, "win": { "icon": "resources/favicon.ico", "target": [ - "nsis", - "zip" - ] + { + "target": "nsis", + "arch": ["x64", "ia32"] + } + ], + "artifactName": "${productName}-${version}-win-${arch}.${ext}", + "requestedExecutionLevel": "asInvoker" }, "linux": { "icon": "resources/icon.png", "target": [ - "AppImage", - "deb" - ] + { + "target": "AppImage", + "arch": ["x64"] + }, + { + "target": "deb", + "arch": ["x64"] + } + ], + "artifactName": "${productName}-${version}-linux-${arch}.${ext}", + "category": "Audio", + "maintainer": "Alger " }, "nsis": { "oneClick": false, "allowToChangeInstallationDirectory": true, "installerIcon": "resources/favicon.ico", - "uninstallerIcon": "resources/favicon.ico" + "uninstallerIcon": "resources/favicon.ico", + "createDesktopShortcut": true, + "createStartMenuShortcut": true, + "shortcutName": "AlgerMusicPlayer", + "include": "build/installer.nsh" } } } diff --git a/src/renderer/components/common/UpdateModal.vue b/src/renderer/components/common/UpdateModal.vue index f7d4c19..1f52906 100644 --- a/src/renderer/components/common/UpdateModal.vue +++ b/src/renderer/components/common/UpdateModal.vue @@ -19,7 +19,6 @@
-
更新内容:
@@ -47,7 +46,7 @@