Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
94ec4b8feThis file is pinned to the selected release. Download the original to open it in your design tool.
#!/usr/bin/env sh
# Improve desktop integration:
# - Fixes automatic light/dark theme detection
# - Makes LibrePCB using native file dialogs instead of Qt fallback
export QT_QPA_PLATFORMTHEME=xdgdesktopportal
# Wrapper allowing to bundle both the GUI and the CLI in a single AppImage.
# If the called AppImage has "cli" in its name, the CLI executable is invoked.
# If not, the GUI executable is invoked.
# See https://discourse.appimage.org/t/call-alternative-binary-from-appimage/93.
HERE="$(dirname "$(readlink -f "${0}")")"
BINARY_NAME=$(basename "$ARGV0")
case $BINARY_NAME in
*cli*) exec "$HERE/usr/bin/librepcb-cli" "$@";;
*CLI*) exec "$HERE/usr/bin/librepcb-cli" "$@";;
*) exec "$HERE/usr/bin/librepcb" "$@";;
esac