cicy-desktop 2.1.146 → 2.1.147

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.
@@ -171,3 +171,39 @@ jobs:
171
171
  gh release upload "${{ steps.meta.outputs.tag }}" dist/latest-mac.yml \
172
172
  --repo "$GITHUB_REPOSITORY" --clobber
173
173
  fi
174
+
175
+ # Offline all-in-one: prebuilt .app (ad-hoc signed) + docker base disk + cicy-code
176
+ # image + install.command. No Apple cert needed (the installer strips quarantine +
177
+ # re-ad-hoc-signs locally), no network at docker-install time (images pre-staged).
178
+ - name: Build offline all-in-one bundles (.app + docker + installer)
179
+ continue-on-error: true # extra artifact — never fail the dmg/zip release
180
+ shell: bash
181
+ env:
182
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
183
+ run: |
184
+ set -euo pipefail
185
+ OSS="https://cicy-1372193042-cn.oss-cn-shanghai.aliyuncs.com"
186
+ VER="${{ steps.meta.outputs.version }}"
187
+ mkdir -p payload
188
+ # cicy-code image is amd64 for both arches (runs via rosetta on arm64) → fetch once.
189
+ curl -fSL "$OSS/images/cicy-code-latest.tar.gz" -o payload/cicy-code-latest.tar.gz
190
+ for ARCH in x64 arm64; do
191
+ [ "$ARCH" = x64 ] && DTAG=amd64 || DTAG=arm64
192
+ # locate the .app for this arch (electron-builder leaves it under dist/mac*/)
193
+ APP=""
194
+ for d in $(find dist -maxdepth 2 -type d -name "*.app"); do
195
+ if lipo -archs "$d/Contents/MacOS/"* 2>/dev/null | grep -qw "$([ "$ARCH" = x64 ] && echo x86_64 || echo arm64)"; then APP="$d"; break; fi
196
+ done
197
+ [ -n "$APP" ] || { echo "::warning::no $ARCH .app found, skipping all-in-one"; continue; }
198
+ echo "all-in-one $ARCH ← $APP"
199
+ curl -fSL "$OSS/colima-base/ubuntu-2404-$DTAG-docker.raw.gz" -o "payload/ubuntu-2404-$DTAG-docker.raw.gz"
200
+ B="allinone-$ARCH"; rm -rf "$B"; mkdir -p "$B/docker"
201
+ cp -R "$APP" "$B/CiCy Desktop.app"
202
+ cp payload/cicy-code-latest.tar.gz "$B/docker/"
203
+ cp "payload/ubuntu-2404-$DTAG-docker.raw.gz" "$B/docker/"
204
+ cp scripts/mac-allinone/install.command "$B/"; chmod +x "$B/install.command"
205
+ OUT="cicy-desktop-allinone-$VER-$ARCH.tar.gz"
206
+ tar -czf "$OUT" -C "$B" .
207
+ gh release upload "${{ steps.meta.outputs.tag }}" "$OUT" --repo "$GITHUB_REPOSITORY" --clobber
208
+ echo "uploaded $OUT ($(du -h "$OUT" | cut -f1))"
209
+ done
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cicy-desktop",
3
- "version": "2.1.146",
3
+ "version": "2.1.147",
4
4
  "description": "CiCy - AI-powered operating system browser",
5
5
  "main": "src/main.js",
6
6
  "bin": {
@@ -0,0 +1,59 @@
1
+ #!/bin/bash
2
+ # CiCy Desktop — offline all-in-one installer for macOS (NO Apple signing needed).
3
+ #
4
+ # Without an Apple Developer cert a DOWNLOADED .app/.dmg is Gatekeeper-quarantined
5
+ # ("已损坏 / 无法打开", hard-blocked on arm64). electron-builder already produces a
6
+ # working ad-hoc-signed CiCy Desktop.app (in the -mac.zip); the only thing stopping
7
+ # it from opening is the download quarantine flag. So this installer:
8
+ # 1. installs that prebuilt .app and strips the quarantine (xattr -cr) + re-ad-hoc-
9
+ # signs it locally (codesign --sign -, no cert) → opens normally, no signing.
10
+ # 2. pre-stages the docker base disk + cicy-code image so the app's docker
11
+ # bootstrap REUSES them → zero download, fully offline.
12
+ #
13
+ # Bundle layout (this file sits at the bundle root):
14
+ # CiCy Desktop.app — prebuilt app (from electron-builder)
15
+ # docker/ubuntu-2404-<arch>-docker.raw.gz — colima base disk (340MB)
16
+ # docker/cicy-code-latest.tar.gz — cicy-code image (167MB)
17
+ set -euo pipefail
18
+
19
+ HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
20
+ APP_NAME="CiCy Desktop"
21
+ DEST_APP="/Applications/$APP_NAME.app"
22
+ ARCH="$(uname -m)"; [ "$ARCH" = "x86_64" ] && DTAG="amd64" || DTAG="arm64"
23
+
24
+ echo "==> CiCy Desktop 离线安装(arch=$ARCH)"
25
+
26
+ SRC_APP="$HERE/$APP_NAME.app"
27
+ [ -d "$SRC_APP" ] || { echo "缺少 $APP_NAME.app(包损坏?)"; exit 1; }
28
+
29
+ # ── 1) 安装到 /Applications ─────────────────────────────────────────────────
30
+ echo "==> 安装到 $DEST_APP …"
31
+ if [ -w "/Applications" ] || [ ! -e "$DEST_APP" ]; then
32
+ rm -rf "$DEST_APP" 2>/dev/null || true
33
+ ditto "$SRC_APP" "$DEST_APP"
34
+ else
35
+ echo " 需要管理员权限覆盖旧版,请输入密码:"
36
+ sudo rm -rf "$DEST_APP"; sudo ditto "$SRC_APP" "$DEST_APP"
37
+ sudo chown -R "$(id -un)":staff "$DEST_APP" 2>/dev/null || true
38
+ fi
39
+
40
+ # ── 2) 清隔离 + 本地 ad-hoc 自签(免 Apple 证书的关键)──────────────────────
41
+ echo "==> 清隔离属性 + 本地 ad-hoc 自签 …"
42
+ xattr -dr com.apple.quarantine "$DEST_APP" 2>/dev/null || true
43
+ xattr -cr "$DEST_APP" 2>/dev/null || true
44
+ # 重新 ad-hoc 签整个 bundle(ditto 后保险起见;已签则等价覆盖)
45
+ codesign --force --deep --sign - "$DEST_APP" 2>/dev/null || \
46
+ echo " (codesign 警告可忽略,quarantine 已清即可打开)"
47
+
48
+ # ── 3) 预暂存 docker 包(让 app 的 bootstrap reuse、零下载)──────────────────
49
+ echo "==> 预暂存 docker 运行环境(基础盘 + 镜像)…"
50
+ mkdir -p "$HOME/cicy-ai/colima" "$HOME/Downloads"
51
+ DISK_SRC="$HERE/docker/ubuntu-2404-$DTAG-docker.raw.gz"
52
+ IMG_SRC="$HERE/docker/cicy-code-latest.tar.gz"
53
+ [ -f "$DISK_SRC" ] && ditto "$DISK_SRC" "$HOME/cicy-ai/colima/ubuntu-2404-$DTAG-docker.raw.gz" && echo " 基础盘已就位($DTAG)"
54
+ [ -f "$IMG_SRC" ] && ditto "$IMG_SRC" "$HOME/Downloads/cicy-code-latest.tar.gz" && echo " cicy-code 镜像已就位"
55
+
56
+ echo ""
57
+ echo "✅ 安装完成 —— 打开「启动台」或 /Applications 里的「$APP_NAME」。"
58
+ echo " docker 运行环境已预置,首次点安装直接复用、不下载。"
59
+ open "$DEST_APP" || true