From 01761b00abb9ecc019663a7f50280a5fc589bbee Mon Sep 17 00:00:00 2001 From: shenmo Date: Tue, 31 May 2022 22:27:40 +0800 Subject: [PATCH] =?UTF-8?q?=09=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20=20=20=20sp?= =?UTF-8?q?ark-dwine-helper/pkg/DEBIAN/control=20=09=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=9A=20=20=20=20=20spark-dwine-helper/pkg/opt/deepinwine/t?= =?UTF-8?q?ools/spark=5Frun=5Fv4.sh=20=09=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20?= =?UTF-8?q?=20=20=20spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/?= =?UTF-8?q?set-dwine-scale.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spark-dwine-helper/pkg/DEBIAN/control | 2 +- .../pkg/opt/deepinwine/tools/spark_run_v4.sh | 13 ++++++------- .../durapps/spark-dwine-helper/set-dwine-scale.sh | 9 ++++++--- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/spark-dwine-helper/pkg/DEBIAN/control b/spark-dwine-helper/pkg/DEBIAN/control index 4d51f01..e4fd7e9 100644 --- a/spark-dwine-helper/pkg/DEBIAN/control +++ b/spark-dwine-helper/pkg/DEBIAN/control @@ -1,5 +1,5 @@ Package: spark-dwine-helper -Version: 1.5 +Version: 1.5.1 Architecture: all Maintainer: shenmo Installed-Size: 2293 diff --git a/spark-dwine-helper/pkg/opt/deepinwine/tools/spark_run_v4.sh b/spark-dwine-helper/pkg/opt/deepinwine/tools/spark_run_v4.sh index b0cfbf2..089b5bf 100755 --- a/spark-dwine-helper/pkg/opt/deepinwine/tools/spark_run_v4.sh +++ b/spark-dwine-helper/pkg/opt/deepinwine/tools/spark_run_v4.sh @@ -8,7 +8,7 @@ # # Modifier: shenmo # -# diff: Now will run set-dwine-scale.sh in stage RunApp before CallApp +# diff: Now will run set-dwine-scale.sh in stage CallProcess before CallApp # Deleted Deepin-* to simplify the script # WINEPREFIX="$HOME/.deepinwine/@public_bottle_name@" @@ -171,7 +171,8 @@ CallProcess() fi debug_log_to_file "Starting process $* ..." - + ############# WARNING: Here is the modified content: Now will run set-dwine-scale.sh + /opt/durapps/spark-dwine-helper/set-dwine-scale.sh "$WINEPREFIX" env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$@" & #start autobottle @@ -377,14 +378,14 @@ CallTHS() xdg-mime default "$DEB_PACKAGE_NAME".desktop "$MIME_TYPE" fi - env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$@" & + CallProcess "$@" } CallQQGameV2() { debug_log "run $1" $SHELL_DIR/kill.sh QQMicroGameBox block - env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$1" -action:force_download -appid:${2} -pid:8 -bin_version:1.1.2.4 -loginuin: & + CallProcess "$1" -action:force_download -appid:${2} -pid:8 -bin_version:1.1.2.4 -loginuin: } CallPsCs6() @@ -410,7 +411,7 @@ CallPsCs6() debug_log_to_file "Starting process $* ..." - env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$@" & + CallProcess "$@" } #arg 1: exec file path @@ -562,8 +563,6 @@ RunApp() else DeployApp | progressbar $BOTTLENAME "初始化$BOTTLENAME中..." fi -############# WARNING: Here is the modified content: Now will run set-dwine-scale.sh - /opt/durapps/spark-dwine-helper/set-dwine-scale.sh "$WINEPREFIX" CallApp "$@" } diff --git a/spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/set-dwine-scale.sh b/spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/set-dwine-scale.sh index eee54ae..efb9772 100755 --- a/spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/set-dwine-scale.sh +++ b/spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/set-dwine-scale.sh @@ -52,7 +52,7 @@ fi if [ "$appointed_scale_factor" = "" ];then #########未指定下,读取$CONTAINER_PATH/scale.txt。如果没有,优先$DEEPIN_WINE_SCALE设置,然后是手动 -if [ !-f "$CONTAINER_PATH/scale.txt" ];then +if [ ! -f "$CONTAINER_PATH/scale.txt" ];then echo "E: No SCALE profile found. try to use DEEPIN_WINE_SCALE" echo "错误:没有检测到缩放设置,读取DEEPIN_WINE_SCALE" @@ -71,11 +71,14 @@ if [ !-f "$CONTAINER_PATH/scale.txt" ];then fi else wine_scale=`cat $CONTAINER_PATH/scale.txt` +if [ -n "$DEEPIN_WINE_SCALE" ] && [ "$DEEPIN_WINE_SCALE" != "$wine_scale" ];then +zenity --info --text="检测到您的缩放设置和Deepin默认的不同。这可能是您的个人设置,因此不会自动同步\n您可以删除$CONTAINER_PATH/scale.txt来同步设置" --width=500 --height=150 --timeout=5 & +fi echo "检测到的缩放倍数为:$wine_scale" echo "Scale is $wine_scale" + + fi - - #####非deepin发行版似乎没有这个变量,暂时不清楚这个变量是哪个组件做的