# 防止循环调用
if [ "$KM_TRIAL_MODE_LAUNCHED" = "1" ]; then
    echo "Already in trial mode, skipping..."
    exit 0
fi

export KM_TRIAL_MODE_LAUNCHED=1

#设置环境变量
appDir=$1
runtimeDir=$2
baseDir=$3
arch=$4
exec="$5"

export LD_LIBRARY_PATH=${appDir}/files/lib:${appDir}/depends/usr/lib/${arch}:${runtimeDir}/files/usr/lib:${runtimeDir}/files/usr/lib/${arch}:${baseDir}/files/lib:"${baseDir}"/files/lib64:"${baseDir}"/files/usr/lib:"${baseDir}"/files/usr/lib64
#echo $LD_LIBRARY_PATH

#运行exec
binDir="${appDir}/files/bin"
cmd="${binDir}/${exec}"
eval "$cmd"

