cicy-desktop 2.1.183 → 2.1.185
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -36,6 +36,26 @@ jobs:
|
|
|
36
36
|
- name: Install Electron build dependencies
|
|
37
37
|
run: npm install --save-dev --no-audit electron@41.0.2 electron-builder@26.7.0
|
|
38
38
|
|
|
39
|
+
# 主人(2026-06 关键修复): runner 是 x64,npm 只装 linux-x64 的 cicy-code/mihomo →
|
|
40
|
+
# linux-arm64 用户的包里塞的是 x64 二进制。强制把两个 linux 架构都装进 node_modules,
|
|
41
|
+
# electron-builder 两架构都打包,localbin 按用户机器选。必须在所有 npm install 之后。
|
|
42
|
+
- name: Bundle BOTH linux arches of cicy-code/mihomo (runner is single-arch)
|
|
43
|
+
shell: bash
|
|
44
|
+
run: |
|
|
45
|
+
set -e
|
|
46
|
+
# npm pack(不看 os/cpu/lockfile)+ 解压,绕开 `npm install --force` 在已有 lockfile 上的 no-op。
|
|
47
|
+
for pkg in cicy-code-linux-x64 cicy-code-linux-arm64 cicy-mihomo-linux-x64 cicy-mihomo-linux-arm64; do
|
|
48
|
+
ver=$(node -e "const o=require('./package.json').optionalDependencies||{}; process.stdout.write(o['$pkg']||'')")
|
|
49
|
+
[ -z "$ver" ] && { echo "skip $pkg"; continue; }
|
|
50
|
+
bin=cicy-code; case "$pkg" in cicy-mihomo*) bin=mihomo;; esac
|
|
51
|
+
if [ -f "node_modules/$pkg/$bin" ]; then echo "$pkg present"; continue; fi
|
|
52
|
+
echo "npm pack $pkg@$ver → node_modules/$pkg"
|
|
53
|
+
tmp=$(mktemp -d); ( cd "$tmp" && npm pack "$pkg@$ver" --silent ); tar -xzf "$tmp"/*.tgz -C "$tmp"
|
|
54
|
+
rm -rf "node_modules/$pkg"; mkdir -p "node_modules/$pkg"; cp -R "$tmp/package/." "node_modules/$pkg/"; rm -rf "$tmp"
|
|
55
|
+
done
|
|
56
|
+
ls node_modules | grep -E 'cicy-(code|mihomo)-linux' || true
|
|
57
|
+
for a in x64 arm64; do test -f "node_modules/cicy-code-linux-$a/cicy-code" || { echo "::error::cicy-code-linux-$a missing"; exit 1; }; done
|
|
58
|
+
|
|
39
59
|
# NOTE: the homepage SPA is rebuilt automatically by the prebuild:linux npm
|
|
40
60
|
# hook (scripts/build-homepage.cjs) right before `npm run build:linux` below,
|
|
41
61
|
# so the AppImage can never ship a stale homepage. No explicit step needed.
|
|
@@ -38,6 +38,29 @@ jobs:
|
|
|
38
38
|
- name: Install Electron build dependencies in project directory
|
|
39
39
|
run: npm install --save-dev --no-audit electron@41.0.2 electron-builder@26.7.0
|
|
40
40
|
|
|
41
|
+
# 主人(2026-06 关键修复): macos-latest runner 是 arm64,`npm install` 的 os/cpu
|
|
42
|
+
# 过滤只装 arm64 的 cicy-code/mihomo 子包 → x64(Intel)的 .pkg 里塞的也是 arm64
|
|
43
|
+
# 二进制 → Intel fresh 装没 :8008(实测 josephs)。这里强制把 BOTH darwin 架构都
|
|
44
|
+
# 装进 node_modules(--force 绕过 EBADPLATFORM),让 electron-builder 两架构都打包,
|
|
45
|
+
# localbin 按用户机器选对应那份。必须在所有 npm install 之后(否则被剪枝)。
|
|
46
|
+
- name: Bundle BOTH macOS arches of cicy-code/mihomo (runner is single-arch)
|
|
47
|
+
shell: bash
|
|
48
|
+
run: |
|
|
49
|
+
set -e
|
|
50
|
+
# `npm install --force` 在已有 lockfile 的项目里会判 "up to date" 跳过非本机架构
|
|
51
|
+
# → 改用 `npm pack`(纯按名下 tarball,不看 os/cpu/lockfile)+ 解压进 node_modules。
|
|
52
|
+
for pkg in cicy-code-darwin-x64 cicy-code-darwin-arm64 cicy-mihomo-darwin-x64 cicy-mihomo-darwin-arm64; do
|
|
53
|
+
ver=$(node -e "const o=require('./package.json').optionalDependencies||{}; process.stdout.write(o['$pkg']||'')")
|
|
54
|
+
[ -z "$ver" ] && { echo "skip $pkg (not pinned)"; continue; }
|
|
55
|
+
bin=cicy-code; case "$pkg" in cicy-mihomo*) bin=mihomo;; esac
|
|
56
|
+
if [ -f "node_modules/$pkg/$bin" ]; then echo "$pkg present (native arch)"; continue; fi
|
|
57
|
+
echo "npm pack $pkg@$ver → node_modules/$pkg"
|
|
58
|
+
tmp=$(mktemp -d); ( cd "$tmp" && npm pack "$pkg@$ver" --silent ); tar -xzf "$tmp"/*.tgz -C "$tmp"
|
|
59
|
+
rm -rf "node_modules/$pkg"; mkdir -p "node_modules/$pkg"; cp -R "$tmp/package/." "node_modules/$pkg/"; rm -rf "$tmp"
|
|
60
|
+
done
|
|
61
|
+
echo "--- bundled darwin subpackages ---"; ls node_modules | grep -E 'cicy-(code|mihomo)-darwin' || true
|
|
62
|
+
for a in x64 arm64; do test -f "node_modules/cicy-code-darwin-$a/cicy-code" || { echo "::error::cicy-code-darwin-$a binary missing"; exit 1; }; done
|
|
63
|
+
|
|
41
64
|
# NOTE: the homepage SPA is rebuilt automatically by the prebuild:mac npm
|
|
42
65
|
# hook (scripts/build-homepage.cjs) right before `npm run build:mac` below,
|
|
43
66
|
# so the dmg can never ship a stale homepage. No explicit step needed.
|