#!/usr/bin/env bash # Launch the Chanora v0.2.0-beta.1 desktop build. # # The Flutter app expects libchanora_bridge.so on the dynamic linker # search path. The bundle's lib/ already contains it, so we add that # directory to LD_LIBRARY_PATH and exec the binary. set -euo pipefail HERE="$(cd "$(dirname "$0")" && pwd)" BUNDLE="$HERE/apps/chanora_flutter/build/linux/x64/debug/bundle" if [[ ! -x "$BUNDLE/chanora_flutter" ]]; then echo "error: Flutter bundle not built. Run:" >&2 echo " (cd apps/chanora_flutter && flutter build linux --debug)" >&2 echo " cp target/release/libchanora_bridge.so $BUNDLE/lib/" >&2 exit 1 fi if [[ ! -e "$BUNDLE/lib/libchanora_bridge.so" ]]; then echo "error: libchanora_bridge.so missing from $BUNDLE/lib/." >&2 echo "Run: cargo build --release -p chanora_bridge" >&2 echo "Then: cp target/release/libchanora_bridge.so $BUNDLE/lib/" >&2 exit 1 fi export LD_LIBRARY_PATH="$BUNDLE/lib:${LD_LIBRARY_PATH:-}" exec "$BUNDLE/chanora_flutter" "$@"