cicy-desktop 2.1.147 → 2.1.149

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.
@@ -172,38 +172,47 @@ jobs:
172
172
  --repo "$GITHUB_REPOSITORY" --clobber
173
173
  fi
174
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)
175
+ # Lightweight app installer (~150MB): prebuilt ad-hoc-signed .app + install.command.
176
+ # No Apple cert (installer strips quarantine + re-ad-hoc-signs locally). Docker is
177
+ # NOT bundled the app downloads + reuses it at runtime (keeps this small). For a
178
+ # fully-offline install, drop the docker base disk + cicy-code image next to
179
+ # install.command in a docker/ subdir and it'll stage them instead.
180
+ - name: Build app installer bundles (.app + installer, no docker)
179
181
  continue-on-error: true # extra artifact — never fail the dmg/zip release
180
182
  shell: bash
181
183
  env:
182
184
  GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
183
185
  run: |
184
186
  set -euo pipefail
185
- OSS="https://cicy-1372193042-cn.oss-cn-shanghai.aliyuncs.com"
186
187
  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
188
  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*/)
189
+ WANT="$([ "$ARCH" = x64 ] && echo x86_64 || echo arm64)"
193
190
  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"
191
+ # NUL-delimited: the .app dir name has a space ("CiCy Desktop.app"), so a
192
+ # `for d in $(find …)` word-splits the path and breaks. read -d '' is safe.
193
+ while IFS= read -r -d '' d; do
194
+ bin="$(find "$d/Contents/MacOS" -maxdepth 1 -type f | head -1)"
195
+ if lipo -archs "$bin" 2>/dev/null | grep -qw "$WANT"; then APP="$d"; break; fi
196
+ done < <(find dist -maxdepth 2 -type d -name "*.app" -print0)
197
+ [ -n "$APP" ] || { echo "::warning::no $ARCH .app found, skipping"; continue; }
198
+ echo "app installer $ARCH ← $APP"
199
+ B="appbundle-$ARCH"; rm -rf "$B"; mkdir -p "$B"
201
200
  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
201
  cp scripts/mac-allinone/install.command "$B/"; chmod +x "$B/install.command"
205
- OUT="cicy-desktop-allinone-$VER-$ARCH.tar.gz"
202
+ OUT="cicy-desktop-app-$VER-$ARCH.tar.gz"
206
203
  tar -czf "$OUT" -C "$B" .
207
204
  gh release upload "${{ steps.meta.outputs.tag }}" "$OUT" --repo "$GITHUB_REPOSITORY" --clobber
208
205
  echo "uploaded $OUT ($(du -h "$OUT" | cut -f1))"
206
+
207
+ # Native .pkg installer (right-click Open once; the postinstall ad-hoc-signs
208
+ # + de-quarantines the installed app so it opens with no Apple cert).
209
+ ROOT="pkgroot-$ARCH"; rm -rf "$ROOT"; mkdir -p "$ROOT/Applications"
210
+ cp -R "$APP" "$ROOT/Applications/CiCy Desktop.app"
211
+ SCR="pkgscripts-$ARCH"; rm -rf "$SCR"; mkdir -p "$SCR"
212
+ cp scripts/mac-allinone/postinstall "$SCR/postinstall"; chmod +x "$SCR/postinstall"
213
+ PKG="cicy-desktop-$VER-$ARCH.pkg"
214
+ pkgbuild --root "$ROOT" --scripts "$SCR" --identifier com.cicy.desktop \
215
+ --version "$VER" --install-location / "$PKG"
216
+ gh release upload "${{ steps.meta.outputs.tag }}" "$PKG" --repo "$GITHUB_REPOSITORY" --clobber
217
+ echo "uploaded $PKG ($(du -h "$PKG" | cut -f1))"
209
218
  done
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cicy-desktop",
3
- "version": "2.1.147",
3
+ "version": "2.1.149",
4
4
  "description": "CiCy - AI-powered operating system browser",
5
5
  "main": "src/main.js",
6
6
  "bin": {
@@ -45,15 +45,23 @@ xattr -cr "$DEST_APP" 2>/dev/null || true
45
45
  codesign --force --deep --sign - "$DEST_APP" 2>/dev/null || \
46
46
  echo " (codesign 警告可忽略,quarantine 已清即可打开)"
47
47
 
48
- # ── 3) 预暂存 docker 包(让 app bootstrap reuse、零下载)──────────────────
49
- echo "==> 预暂存 docker 运行环境(基础盘 + 镜像)…"
50
- mkdir -p "$HOME/cicy-ai/colima" "$HOME/Downloads"
48
+ # ── 3) (可选)预暂存 docker 包 —— 仅当 bundle 里带了 docker/ 时(全离线包)
49
+ # app-only 包没有这个目录:跳过,docker app 运行时联网装(一次,之后复用)
51
50
  DISK_SRC="$HERE/docker/ubuntu-2404-$DTAG-docker.raw.gz"
52
51
  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 镜像已就位"
52
+ STAGED=0
53
+ if [ -f "$DISK_SRC" ] || [ -f "$IMG_SRC" ]; then
54
+ echo "==> 检测到离线 docker 包,预暂存以便零下载 …"
55
+ mkdir -p "$HOME/cicy-ai/colima" "$HOME/Downloads"
56
+ [ -f "$DISK_SRC" ] && ditto "$DISK_SRC" "$HOME/cicy-ai/colima/ubuntu-2404-$DTAG-docker.raw.gz" && echo " 基础盘已就位($DTAG)" && STAGED=1
57
+ [ -f "$IMG_SRC" ] && ditto "$IMG_SRC" "$HOME/Downloads/cicy-code-latest.tar.gz" && echo " cicy-code 镜像已就位" && STAGED=1
58
+ fi
55
59
 
56
60
  echo ""
57
61
  echo "✅ 安装完成 —— 打开「启动台」或 /Applications 里的「$APP_NAME」。"
58
- echo " docker 运行环境已预置,首次点安装直接复用、不下载。"
62
+ if [ "$STAGED" = 1 ]; then
63
+ echo " docker 运行环境已预置,首次点安装直接复用、不下载。"
64
+ else
65
+ echo " docker 首次点安装会联网下载运行环境(之后复用,不再重下)。"
66
+ fi
59
67
  open "$DEST_APP" || true
@@ -0,0 +1,11 @@
1
+ #!/bin/bash
2
+ # Runs as root right after the .pkg lays down /Applications/CiCy Desktop.app.
3
+ # The app is unsigned-but-ad-hoc (no Apple cert). pkg-installed files normally
4
+ # aren't quarantined, but strip any quarantine + re-ad-hoc-sign to be safe so the
5
+ # app opens without "已损坏 / unidentified developer". Best-effort — never fail install.
6
+ APP="/Applications/CiCy Desktop.app"
7
+ [ -d "$APP" ] || exit 0
8
+ /usr/bin/xattr -dr com.apple.quarantine "$APP" 2>/dev/null || true
9
+ /usr/bin/xattr -cr "$APP" 2>/dev/null || true
10
+ /usr/bin/codesign --force --deep --sign - "$APP" 2>/dev/null || true
11
+ exit 0