cicy-desktop 2.1.149 → 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.
@@ -211,8 +211,11 @@ jobs:
211
211
  SCR="pkgscripts-$ARCH"; rm -rf "$SCR"; mkdir -p "$SCR"
212
212
  cp scripts/mac-allinone/postinstall "$SCR/postinstall"; chmod +x "$SCR/postinstall"
213
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))"
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
218
221
  done
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cicy-desktop",
3
- "version": "2.1.149",
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"
@@ -8,4 +8,16 @@ APP="/Applications/CiCy Desktop.app"
8
8
  /usr/bin/xattr -dr com.apple.quarantine "$APP" 2>/dev/null || true
9
9
  /usr/bin/xattr -cr "$APP" 2>/dev/null || true
10
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
11
23
  exit 0