summarylogtreecommitdiffstats
path: root/use-system-libs.patch
blob: c243e0bf130c52d133699566c94919c2a4cdb3a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
diff --git a/scripts/smolvm-wrapper.sh b/scripts/smolvm-wrapper.sh
index 1e7eeb0..e8f5176 100755
--- a/scripts/smolvm-wrapper.sh
+++ b/scripts/smolvm-wrapper.sh
@@ -25,8 +25,7 @@ SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_PATH")" && pwd)"
 
 # The actual binary and libraries are in the same directory
 SMOLVM_BIN="$SCRIPT_DIR/smolvm-bin"
-SMOLVM_LIB="$SCRIPT_DIR/lib"
-SMOLVM_BUNDLED_ROOTFS="$SCRIPT_DIR/agent-rootfs"
+SMOLVM_BUNDLED_ROOTFS='/usr/lib/smolvm/agent-rootfs'
 
 if [[ -d "$SMOLVM_BUNDLED_ROOTFS" ]]; then
     export SMOLVM_AGENT_ROOTFS="${SMOLVM_AGENT_ROOTFS:-$SMOLVM_BUNDLED_ROOTFS}"
@@ -39,17 +38,4 @@ if [[ ! -x "$SMOLVM_BIN" ]]; then
     exit 1
 fi
 
-# Check if libraries exist
-if [[ ! -d "$SMOLVM_LIB" ]]; then
-    echo "Error: library directory not found at $SMOLVM_LIB" >&2
-    echo "Make sure you extracted the full distribution." >&2
-    exit 1
-fi
-
-# Set library path based on OS and run
-if [[ "$(uname -s)" == "Darwin" ]]; then
-    export DYLD_LIBRARY_PATH="$SMOLVM_LIB${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}"
-else
-    export LD_LIBRARY_PATH="$SMOLVM_LIB${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
-fi
 exec "$SMOLVM_BIN" "$@"