Files
GUI/scripts/GUI.sh
2023-10-26 15:47:39 +08:00

27 lines
699 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
# debug标志可用于试运行的debug
export QT_DEBUG_PLUGINS=1
# 获取应用名称(如应用名称为app那么脚本为app.sh
appname=`basename $0 | sed s,\.sh$,,`
# 获取应用当前目录
dirname=`dirname $0`
tmp="${dirname#?}"
# 判断目录是不是根目录
if [ "${dirname%$tmp}" != "/" ];
then
dirname=$PWD/$dirname
fi
# 将当前目录(库所在目录)加入环境变量
LD_LIBRARY_PATH=$dirname
export LD_LIBRARY_PATH
# unset XDG_SESSION_DESKTOP
unset XDG_CURRENT_DESKTOP
unset KDE_FULL_SESSION
unset DESKTOP_SESSION
# unset KDE_SESSION_UID
# :wqunset KDE_SESSION_VERSION
# unset XDG_SEAT
# unset XDG_SEAT_PATH
# set XDG_SESSION_TYPE=tty
# 运
$dirname/$appname "$@"