Skip to content

Commit 6feda5f

Browse files
committed
fix(build): stage libopentui.so after build script clears DIST_DIR
1 parent e313dca commit 6feda5f

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

scripts/build-opencode.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,6 @@ IDXEOF
111111
fi
112112
done
113113

114-
# Also stage libopentui.so into dist so make-packages.sh can ship it
115-
mkdir -p "$DIST_DIR"
116-
cp "$ARM64_LIBOPENTUI" "$DIST_DIR/libopentui.so"
117-
echo ">>> Staged ARM64 libopentui.so for packaging"
118-
119114
# Run the TypeScript build script
120115
# Copy it into the OpenCode tree so Bun can resolve @opentui/solid/bun-plugin
121116
# from node_modules (Bun resolves bare imports relative to the script file's location)
@@ -214,6 +209,13 @@ else
214209
echo " (run 'ninja bun-profile' in the bun-build dir to enable it)"
215210
fi
216211

212+
# Stage ARM64 libopentui.so for packaging. This MUST happen after the
213+
# TypeScript build script because build-opencode-android.ts clears OUTPUT_DIR
214+
# (which is DIST_DIR) at the start of its run.
215+
mkdir -p "$DIST_DIR"
216+
cp "$ARM64_LIBOPENTUI" "$DIST_DIR/libopentui.so"
217+
echo ">>> Staged ARM64 libopentui.so for packaging"
218+
217219
# Verify output
218220
OPENCODE_BINARY="$DIST_DIR/opencode"
219221
if [ ! -f "$OPENCODE_BINARY" ]; then

0 commit comments

Comments
 (0)