@squiggle.sh/cli-darwin-arm64 0.2.0 → 0.3.0
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.
- package/libsquiggleagent-mac.dylib +0 -0
- package/libsquiggleagent.dylib +0 -0
- package/package.json +1 -2
- package/squiggle +2 -2
- package/squiggle-host +0 -0
- package/install-macos-agent.sh +0 -62
|
Binary file
|
package/libsquiggleagent.dylib
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squiggle.sh/cli-darwin-arm64",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Squiggle CLI binary for darwin-arm64 — installed automatically by @squiggle.sh/cli",
|
|
5
5
|
"homepage": "https://squiggle.sh",
|
|
6
6
|
"os": [
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
"squiggle-host",
|
|
17
17
|
"libsquiggleagent.dylib",
|
|
18
18
|
"libsquiggleagent-mac.dylib",
|
|
19
|
-
"install-macos-agent.sh",
|
|
20
19
|
"LICENSE.md",
|
|
21
20
|
"THIRD-PARTY-NOTICES.md"
|
|
22
21
|
],
|
package/squiggle
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/squiggle
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 66232176 bytes
|
|
4
|
+
sha256: 6d50943748b5cc02feee8d828437d1a1307b433a691aced3be51a10eda0d4bc7
|
package/squiggle-host
CHANGED
|
Binary file
|
package/install-macos-agent.sh
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
TARGET="${1:-}"
|
|
5
|
-
if [ -z "$TARGET" ] || [ ! -d "$TARGET" ]; then
|
|
6
|
-
echo "usage: install-macos-agent.sh <path to your macos app target dir>" >&2
|
|
7
|
-
echo " e.g. install-macos-agent.sh macos/MyApp-macOS" >&2
|
|
8
|
-
exit 2
|
|
9
|
-
fi
|
|
10
|
-
|
|
11
|
-
HERE="$(cd "$(dirname "$0")" && pwd)"
|
|
12
|
-
DYLIB="$HERE/libsquiggleagent-mac.dylib"
|
|
13
|
-
if [ ! -f "$DYLIB" ]; then
|
|
14
|
-
echo "libsquiggleagent-mac.dylib is not beside this script ($HERE)." >&2
|
|
15
|
-
echo "It ships in the squiggle CLI's platform package; reinstall squiggle-cli." >&2
|
|
16
|
-
exit 1
|
|
17
|
-
fi
|
|
18
|
-
|
|
19
|
-
DEST_DIR="$TARGET/Squiggle"
|
|
20
|
-
mkdir -p "$DEST_DIR"
|
|
21
|
-
cp "$DYLIB" "$DEST_DIR/libsquiggleagent-mac.dylib"
|
|
22
|
-
echo "✓ copied libsquiggleagent-mac.dylib → $DEST_DIR/"
|
|
23
|
-
|
|
24
|
-
cat <<'STEPS'
|
|
25
|
-
|
|
26
|
-
Two steps left, in Xcode — they edit the project file, so they are yours to make:
|
|
27
|
-
|
|
28
|
-
1. Add a **Copy Files** build phase to the macOS app target:
|
|
29
|
-
Destination: Frameworks
|
|
30
|
-
Add: Squiggle/libsquiggleagent-mac.dylib
|
|
31
|
-
✅ Code Sign On Copy
|
|
32
|
-
Xcode signs it with the app's own identity, inside-out, at no cost. Without
|
|
33
|
-
this the dylib is not in the bundle and step 2 finds nothing to open.
|
|
34
|
-
|
|
35
|
-
2. Load it from the app, in AppDelegate.mm (or .swift), Debug only:
|
|
36
|
-
|
|
37
|
-
#if DEBUG
|
|
38
|
-
#import <dlfcn.h>
|
|
39
|
-
// …inside applicationDidFinishLaunching:
|
|
40
|
-
{
|
|
41
|
-
NSString *override = NSProcessInfo.processInfo.environment[@"SQUIGGLE_AGENT_DYLIB"];
|
|
42
|
-
NSString *bundled = [[NSBundle mainBundle] pathForResource:@"libsquiggleagent-mac"
|
|
43
|
-
ofType:@"dylib"
|
|
44
|
-
inDirectory:@"../Frameworks"];
|
|
45
|
-
NSString *path = override.length ? override : bundled;
|
|
46
|
-
if (path && !dlopen(path.fileSystemRepresentation, RTLD_NOW)) {
|
|
47
|
-
NSLog(@"[squiggle] agent dylib failed to load: %s", dlerror());
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
#endif
|
|
51
|
-
|
|
52
|
-
`SQUIGGLE_AGENT_DYLIB` is what `squiggle up` sets when it launches the app,
|
|
53
|
-
so honouring it first is what lets the CLI hand your app a freshly built
|
|
54
|
-
agent instead of whatever was bundled.
|
|
55
|
-
|
|
56
|
-
Then: squiggle up <your.bundle.id> --platform macos
|
|
57
|
-
It prints the injected dylib's Mach-O UUID, which is the proof it is in.
|
|
58
|
-
|
|
59
|
-
After you update Squiggle, run this script again and rebuild. A launch from the
|
|
60
|
-
Dock, Finder or Xcode loads the copy bundled in the app, and that copy stays the
|
|
61
|
-
version you installed; `squiggle doctor` flags it when it no longer matches.
|
|
62
|
-
STEPS
|