summarylogtreecommitdiffstats
path: root/use-system-libs.patch
blob: 3d4042f92453e48276c6380e69de630a9437ff77 (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
33
34
35
--- smolvm	2026-05-15 12:01:49.000000000 +0300
+++ smolvm	2026-05-16 13:46:03.063347508 +0300
@@ -25,31 +25,12 @@
 
 # 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"
 
 if [[ -d "$SMOLVM_BUNDLED_ROOTFS" ]]; then
     export SMOLVM_AGENT_ROOTFS="${SMOLVM_AGENT_ROOTFS:-$SMOLVM_BUNDLED_ROOTFS}"
 fi
 
-# Check if binary exists
-if [[ ! -x "$SMOLVM_BIN" ]]; then
-    echo "Error: smolvm binary not found at $SMOLVM_BIN" >&2
-    echo "Make sure you extracted the full distribution." >&2
-    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
++export SMOLVM_AGENT_ROOTFS='/usr/lib/smolvm/agent-rootfs'
 
-# 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" "$@"