cicy-desktop 2.1.148 → 2.1.150

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.
@@ -188,9 +188,12 @@ jobs:
188
188
  for ARCH in x64 arm64; do
189
189
  WANT="$([ "$ARCH" = x64 ] && echo x86_64 || echo arm64)"
190
190
  APP=""
191
- for d in $(find dist -maxdepth 2 -type d -name "*.app"); do
192
- if lipo -archs "$d/Contents/MacOS/"* 2>/dev/null | grep -qw "$WANT"; then APP="$d"; break; fi
193
- done
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)
194
197
  [ -n "$APP" ] || { echo "::warning::no $ARCH .app found, skipping"; continue; }
195
198
  echo "app installer $ARCH ← $APP"
196
199
  B="appbundle-$ARCH"; rm -rf "$B"; mkdir -p "$B"
@@ -200,4 +203,19 @@ jobs:
200
203
  tar -czf "$OUT" -C "$B" .
201
204
  gh release upload "${{ steps.meta.outputs.tag }}" "$OUT" --repo "$GITHUB_REPOSITORY" --clobber
202
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
+ if pkgbuild --root "$ROOT" --scripts "$SCR" --identifier com.cicy.desktop \
215
+ --version "$VER" --install-location / "$PKG"; then
216
+ gh release upload "${{ steps.meta.outputs.tag }}" "$PKG" --repo "$GITHUB_REPOSITORY" --clobber
217
+ echo "uploaded $PKG ($(du -h "$PKG" | cut -f1))"
218
+ else
219
+ echo "::warning::pkgbuild failed for $ARCH (other arch unaffected)"
220
+ fi
203
221
  done
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cicy-desktop",
3
- "version": "2.1.148",
3
+ "version": "2.1.150",
4
4
  "description": "CiCy - AI-powered operating system browser",
5
5
  "main": "src/main.js",
6
6
  "bin": {
@@ -45,6 +45,9 @@ 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
+ # 桌面快捷方式(主人: 要快捷方式)+ 启动台/Spotlight 已自动收录(在 /Applications 里)
49
+ ln -sfn "$DEST_APP" "$HOME/Desktop/$APP_NAME.app" 2>/dev/null && echo "==> 桌面快捷方式已建" || true
50
+
48
51
  # ── 3) (可选)预暂存 docker 包 —— 仅当 bundle 里带了 docker/ 时(全离线包)。
49
52
  # app-only 包没有这个目录:跳过,docker 由 app 运行时联网装(一次,之后复用)。
50
53
  DISK_SRC="$HERE/docker/ubuntu-2404-$DTAG-docker.raw.gz"
@@ -0,0 +1,23 @@
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
+
12
+ # Desktop shortcut for the logged-in user (postinstall runs as root, so resolve the
13
+ # console user + their home and chown the symlink to them). Launchpad/Spotlight pick
14
+ # the app up automatically from /Applications.
15
+ CUSER="$(/usr/bin/stat -f%Su /dev/console 2>/dev/null)"
16
+ if [ -n "$CUSER" ] && [ "$CUSER" != "root" ]; then
17
+ UHOME="$(/usr/bin/dscl . -read "/Users/$CUSER" NFSHomeDirectory 2>/dev/null | awk '{print $2}')"
18
+ if [ -d "$UHOME/Desktop" ]; then
19
+ /bin/ln -sfn "$APP" "$UHOME/Desktop/CiCy Desktop.app" 2>/dev/null || true
20
+ /usr/sbin/chown -h "$CUSER:staff" "$UHOME/Desktop/CiCy Desktop.app" 2>/dev/null || true
21
+ fi
22
+ fi
23
+ exit 0