From 75df70235a3f1dc8b4ff4774070306c461067c34 Mon Sep 17 00:00:00 2001 From: shenmo Date: Thu, 13 Oct 2022 22:52:30 +0800 Subject: [PATCH] =?UTF-8?q?Unix=E8=BD=ACDos=E8=B7=AF=E5=BE=84=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E5=BA=94=E7=94=A8=E4=B8=8D?= =?UTF-8?q?=E6=94=AF=E6=8C=81Linux=E8=B7=AF=E5=BE=84=EF=BC=88=E8=B7=9F?= =?UTF-8?q?=E8=BF=9B=20deepin-wine-helper=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../deepinwine/tools/spark_run_v4.sh | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh b/spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh index 6ba7b90..0a3763b 100755 --- a/spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh +++ b/spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh @@ -428,11 +428,21 @@ CallIE8() #####专属优化段结束 +UnixUriToDosPath() +{ + OPEN_FILE="$1" + if [ -f "$OPEN_FILE" ]; then + OPEN_FILE=$(realpath "$OPEN_FILE") + OPEN_FILE="z:$OPEN_FILE" + OPEN_FILE=$(echo $OPEN_FILE | sed -e 's/\//\\\\/g') + fi + echo $OPEN_FILE +} + #arg 1: exec file path #arg 2: autostart ,or exec arg 1 #arg 3: exec arg 2 - #### CallApp段,根据容器名找专属优化,没有就走通用启动 CallApp() { @@ -601,10 +611,14 @@ ParseArgs() { if [ $# -eq 4 ];then RunApp "$3" - elif [ $# -eq 5 ];then - RunApp "$3" "$5" + elif [ -f "$5" ];then + if [ -n "$MIME_EXEC" ];then + RunApp "$MIME_EXEC" "$(UnixUriToDosPath "$5")" "${@:6}" + else + RunApp "$3" "$(UnixUriToDosPath "$5")" "${@:6}" + fi else - RunApp "$3" "$5" "$6" + RunApp "$3" "${@:5}" fi }