Files
GUI/scripts/GUI.sh
2021-10-20 15:55:15 +08:00

18 lines
483 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
# 运行
$dirname/$appname "$@"