File indexing completed on 2025-01-05 04:33:33

0001 #!/bin/sh
0002 
0003 appdir="$(dirname "$(readlink -f "$0")")"
0004 
0005 export PATH="${appdir}/usr/bin:$PATH"
0006 export LD_LIBRARY_PATH="${appdir}/usr/lib:$LD_LIBRARY_PATH"
0007 export XDG_DATA_DIRS="${appdir}/usr/share:$XDG_DATA_DIRS"
0008 
0009 export QT_PLUGIN_PATH="${appdir}/usr/plugins"
0010 # QT_PLUGIN_PATH - setting system's plugin path will cause crashes on many platforms
0011 # echo export QT_PLUGIN_PATH="${appdir}/usr/plugins:$QT_PLUGIN_PATH:/usr/lib/qt/plugins:/usr/lib/$(uname -m)-linux-gnu/qt5/plugins"
0012 # echo QT_PLUGIN_PATH=$QT_PLUGIN_PATH
0013 
0014 # export QT_DEBUG_PLUGINS=1
0015 
0016 # Arch Linux KDE; KUbuntu 18.04/20.04/20.10/21.04 LiveCD
0017 # XDG_SESSION_DESKTOP="KDE"
0018 # XDG_CURRENT_DESKTOP="KDE"
0019 
0020 # Ubuntu 18.04/20.04/20.10/21.04 LiveCD - had to QT_QPA_PLATFORMTHEME=gtk3 for file dialogs and -style=breeze|oxygen
0021 # XDG_SESSION_DESKTOP="ubuntu"
0022 # XDG_CURRENT_DESKTOP="ubuntu:GNOME"
0023 
0024 # Ubuntu Mate 21.04 LiveCD - had to QT_QPA_PLATFORMTHEME=gtk3 for file dialogs and -style=breeze|oxygen
0025 # XDG_SESSION_DESKTOP="mate"
0026 # XDG_CURRENT_DESKTOP="MATE"
0027 
0028 # ICON THEME:
0029 # https://openapplibrary.org/dev-tutorials/qt-icon-themes
0030 
0031 app="${appdir}/usr/bin/subtitlecomposer"
0032 
0033 case "$XDG_CURRENT_DESKTOP" in
0034 "MATE")
0035         exec "${app}" -platformtheme gtk3 -style=adwaita "$@"
0036         ;;
0037 "ubuntu:GNOME")
0038         exec "${app}" -platformtheme gtk3 -style=adwaita "$@"
0039         ;;
0040 "KDE")
0041         exec "${app}" "$@"
0042         ;;
0043 *)
0044         exec "${app}" -platformtheme gtk2 -style=oxygen "$@"
0045         ;;
0046 esac
0047