build: Add portable for fixed webview2

This commit is contained in:
MystiPanda
2024-05-06 19:13:08 +08:00
parent bcd5e935e7
commit b4b2e67260
5 changed files with 119 additions and 25 deletions

View File

@@ -13,6 +13,12 @@ const ARCH_MAP = {
"aarch64-pc-windows-msvc": "arm64",
};
const PROCESS_MAP = {
x64: "x64",
ia32: "x86",
arm64: "arm64",
};
const arch = target ? ARCH_MAP[target] : PROCESS_MAP[process.arch];
/// Script for ci
/// 打包绿色版/便携版 (only Windows)
async function resolvePortable() {
@@ -42,7 +48,7 @@ async function resolvePortable() {
const packageJson = require("../package.json");
const { version } = packageJson;
const zipFile = `Clash.Verge_${version}_${ARCH_MAP[target]}_portable.zip`;
const zipFile = `Clash.Verge_${version}_${arch}_portable.zip`;
zip.writeZip(zipFile);
console.log("[INFO]: create portable zip successfully");