cicy-desktop 2.1.148 → 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.
@@ -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,16 @@ 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
+ 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))"
203
218
  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.149",
4
4
  "description": "CiCy - AI-powered operating system browser",
5
5
  "main": "src/main.js",
6
6
  "bin": {
@@ -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