VoyagerXHF's picture
Upload folder using huggingface_hub (part 7)
e5a3ec0 verified
Raw History Blame Contribute Delete
1.53 kB
#!/usr/bin/env bash
# Launch script for DB Browser for SQLite (sqlitebrowser).
# Native Qt5 application: exposes AT-SPI through the Qt/ATK bridge, so
# NO_AT_BRIDGE must be 0 and no Chromium/Electron accessibility flags apply.
# Standalone: does not require build.sh to have been sourced.
set -euo pipefail
INSTALL_PREFIX="/workspace/install"
APP="${INSTALL_PREFIX}/bin/sqlitebrowser"
# --- Runtime library path (in case anything was installed under the prefix) ---
export LD_LIBRARY_PATH="${INSTALL_PREFIX}/lib:${INSTALL_PREFIX}/lib/x86_64-linux-gnu:${LD_LIBRARY_PATH:-}"
# --- Qt runtime ---
# Point at the system Qt plugin directory so platform plugins (xcb) load.
QT_PLUGINS="$(qmake -query QT_INSTALL_PLUGINS 2>/dev/null || echo /usr/lib/x86_64-linux-gnu/qt5/plugins)"
export QT_PLUGIN_PATH="${QT_PLUGINS}:${QT_PLUGIN_PATH:-}"
export QT_QPA_PLATFORM="${QT_QPA_PLATFORM:-xcb}"
# --- Accessibility: enable the Qt/ATK -> AT-SPI bridge on the shared bus ---
export QT_ACCESSIBILITY=1
export NO_AT_BRIDGE=0
# --- Display ---
export DISPLAY="${DISPLAY:-:0}"
# --- XDG data dirs so icons/desktop resources resolve ---
export XDG_DATA_DIRS="${INSTALL_PREFIX}/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
# Ensure a writable runtime dir (avoids QStandardPaths warnings / failures when
# the ambient XDG_RUNTIME_DIR is not owned by the launching user).
if [ -z "${XDG_RUNTIME_DIR:-}" ] || [ ! -w "${XDG_RUNTIME_DIR:-/nonexistent}" ]; then
XDG_RUNTIME_DIR="$(mktemp -d)"
export XDG_RUNTIME_DIR
fi
exec "${APP}" "$@"