cicy-desktop 2.1.149 → 2.1.151
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
|
-
|
|
216
|
-
|
|
217
|
-
|
|
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
|
@@ -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
|
package/src/main.js
CHANGED
|
@@ -1081,13 +1081,18 @@ electronApp.whenReady().then(async () => {
|
|
|
1081
1081
|
}
|
|
1082
1082
|
|
|
1083
1083
|
// Periodic WHOLE-desktop snapshot → ~/cicy-files/desktop-snapshot/desktop.b64
|
|
1084
|
-
//
|
|
1085
|
-
//
|
|
1086
|
-
//
|
|
1087
|
-
//
|
|
1088
|
-
//
|
|
1089
|
-
// it's
|
|
1090
|
-
|
|
1084
|
+
// so the cloud (cicy-code) can read the screen via the `desktop_snapshot` tool.
|
|
1085
|
+
// Windows uses a --disable-gpu child (GDI, no prompt); linux uses scrot.
|
|
1086
|
+
//
|
|
1087
|
+
// macOS: this spawns `screencapture`, which DOES trigger the Screen-Recording TCC
|
|
1088
|
+
// prompt — and on an ad-hoc-signed build (no Apple cert) the grant never sticks, so
|
|
1089
|
+
// the prompt fires over and over. So it's OFF by default on macOS (most users —
|
|
1090
|
+
// docker/team management — don't need the agent to watch their screen). Opt in with
|
|
1091
|
+
// CICY_DESKTOP_SNAPSHOT=1. Other platforms stay on (opt out with =0).
|
|
1092
|
+
const __snapOn = process.platform === "darwin"
|
|
1093
|
+
? process.env.CICY_DESKTOP_SNAPSHOT === "1"
|
|
1094
|
+
: process.env.CICY_DESKTOP_SNAPSHOT !== "0";
|
|
1095
|
+
if (!global.__cicyDesktopSnapStarted && __snapOn) {
|
|
1091
1096
|
global.__cicyDesktopSnapStarted = true;
|
|
1092
1097
|
try {
|
|
1093
1098
|
const info = require("./utils/desktop-snapshot").startDesktopSnapshots();
|