From 3182d20b7c6cff61881ab269f6807c30bef58ce1 Mon Sep 17 00:00:00 2001 From: MystiPanda Date: Sun, 10 Dec 2023 17:14:48 +0800 Subject: [PATCH] build: Update Depends --- scripts/portable.mjs | 2 +- scripts/updater.mjs | 16 ++++++++++++++-- src-tauri/Cargo.lock | 12 ++++++------ src-tauri/Cargo.toml | 2 +- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/scripts/portable.mjs b/scripts/portable.mjs index 1d99f14..560a9b4 100644 --- a/scripts/portable.mjs +++ b/scripts/portable.mjs @@ -9,6 +9,7 @@ const target = process.argv.slice(2)[0]; const ARCH_MAP = { "i686-pc-windows-msvc": "x86", "x86_64-pc-windows-msvc": "x64", + "aarch64-pc-windows-msvc": "arm64", }; /// Script for ci @@ -31,7 +32,6 @@ async function resolvePortable() { const zip = new AdmZip(); zip.addLocalFile(path.join(releaseDir, "Clash Verge.exe")); - // zip.addLocalFile(path.join(releaseDir, "clash.exe")); zip.addLocalFile(path.join(releaseDir, "clash-meta.exe")); zip.addLocalFile(path.join(releaseDir, "clash-meta-alpha.exe")); zip.addLocalFolder(path.join(releaseDir, "resources"), "resources"); diff --git a/scripts/updater.mjs b/scripts/updater.mjs index 9f375ab..3db530f 100644 --- a/scripts/updater.mjs +++ b/scripts/updater.mjs @@ -47,8 +47,10 @@ async function resolveUpdater() { "linux-x86_64": { signature: "", url: "" }, "linux-i686": { signature: "", url: "" }, "linux-aarch64": { signature: "", url: "" }, + "linux-armv7": { signature: "", url: "" }, "windows-x86_64": { signature: "", url: "" }, "windows-i686": { signature: "", url: "" }, + "windows-aarch64": { signature: "", url: "" }, }, }; @@ -77,6 +79,16 @@ async function resolveUpdater() { updateData.platforms["windows-i686"].signature = sig; } + // win arm url + if (name.endsWith("arm64-setup.nsis.zip")) { + updateData.platforms["windows-aarch64"].url = browser_download_url; + } + // win arm signature + if (name.endsWith("arm64-setup.nsis.zip.sig")) { + const sig = await getSignature(browser_download_url); + updateData.platforms["windows-aarch64"].signature = sig; + } + // darwin url (intel) if (name.endsWith(".app.tar.gz") && !name.includes("aarch")) { updateData.platforms.darwin.url = browser_download_url; @@ -107,7 +119,7 @@ async function resolveUpdater() { updateData.platforms["linux-x86_64"].url = browser_download_url; // 暂时使用x64版本的url和sig,使得可以检查更新,但aarch64版本还不支持构建appimage updateData.platforms["linux-aarch64"].url = browser_download_url; - // updateData.platforms["linux-armv7"].url = browser_download_url; + updateData.platforms["linux-armv7"].url = browser_download_url; } // linux x64 signature if (name.endsWith("amd64.AppImage.tar.gz.sig")) { @@ -116,7 +128,7 @@ async function resolveUpdater() { updateData.platforms["linux-x86_64"].signature = sig; // 暂时使用x64版本的url和sig,使得可以检查更新,但aarch64版本还不支持构建appimage updateData.platforms["linux-aarch64"].signature = sig; - // updateData.platforms["linux-armv7"].signature = sig; + updateData.platforms["linux-armv7"].signature = sig; } // linux x86 url diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index a3557bf..8e031e5 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -3653,27 +3653,27 @@ dependencies = [ [[package]] name = "rquickjs" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db7788c2818f4546daabe9ae2d1ee2f4db61ab1998d4b483494c4193cc38dab" +checksum = "de83ea57beee293520e2f93ac6d34a5596411e7841846a8e179a3623ea17e4e2" dependencies = [ "rquickjs-core", ] [[package]] name = "rquickjs-core" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b12cf8646fe0af5bcff2822ccd162990f0679a1f9287c7257f4f4193a9d31ea9" +checksum = "9a0af23e8116333509584b539f0cb65bcdbe5db019abe86e1159ad4f87f27f5e" dependencies = [ "rquickjs-sys", ] [[package]] name = "rquickjs-sys" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b747058afd4d988d056e4972ec8516a5a86fdfc103c1c1485bfee8966a0743ae" +checksum = "9cb4766d7b7b291041d458ce3d587c61c365ddc6dc27e6827786e0daef2fd61b" dependencies = [ "cc", ] diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 6ce6d09..4c6dde5 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -25,7 +25,7 @@ log4rs = "1" nanoid = "0.4" chrono = "0.4" sysinfo = "0.29" -rquickjs = "0.3" +rquickjs = "0.4" serde_json = "1.0" serde_yaml = "0.9" auto-launch = "0.5"