File: subtitlecomposer.sh

package info (click to toggle)
subtitlecomposer 0.8.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,980 kB
  • sloc: cpp: 36,722; sh: 1,366; javascript: 1,029; xml: 937; ansic: 10; makefile: 6
file content (47 lines) | stat: -rwxr-xr-x 1,391 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/sh

appdir="$(dirname "$(readlink -f "$0")")"

export PATH="${appdir}/usr/bin:$PATH"
export LD_LIBRARY_PATH="${appdir}/usr/lib:$LD_LIBRARY_PATH"
export XDG_DATA_DIRS="${appdir}/usr/share:$XDG_DATA_DIRS"

export QT_PLUGIN_PATH="${appdir}/usr/plugins"
# QT_PLUGIN_PATH - setting system's plugin path will cause crashes on many platforms
# echo export QT_PLUGIN_PATH="${appdir}/usr/plugins:$QT_PLUGIN_PATH:/usr/lib/qt/plugins:/usr/lib/$(uname -m)-linux-gnu/qt5/plugins"
# echo QT_PLUGIN_PATH=$QT_PLUGIN_PATH

# export QT_DEBUG_PLUGINS=1

# Arch Linux KDE; KUbuntu 18.04/20.04/20.10/21.04 LiveCD
# XDG_SESSION_DESKTOP="KDE"
# XDG_CURRENT_DESKTOP="KDE"

# Ubuntu 18.04/20.04/20.10/21.04 LiveCD - had to QT_QPA_PLATFORMTHEME=gtk3 for file dialogs and -style=breeze|oxygen
# XDG_SESSION_DESKTOP="ubuntu"
# XDG_CURRENT_DESKTOP="ubuntu:GNOME"

# Ubuntu Mate 21.04 LiveCD - had to QT_QPA_PLATFORMTHEME=gtk3 for file dialogs and -style=breeze|oxygen
# XDG_SESSION_DESKTOP="mate"
# XDG_CURRENT_DESKTOP="MATE"

# ICON THEME:
# https://openapplibrary.org/dev-tutorials/qt-icon-themes

app="${appdir}/usr/bin/subtitlecomposer"

case "$XDG_CURRENT_DESKTOP" in
"MATE")
	exec "${app}" -platformtheme gtk3 -style=adwaita "$@"
	;;
"ubuntu:GNOME")
	exec "${app}" -platformtheme gtk3 -style=adwaita "$@"
	;;
"KDE")
	exec "${app}" "$@"
	;;
*)
	exec "${app}" -platformtheme gtk2 -style=oxygen "$@"
	;;
esac