From e77132f5a72f247a6994d43eece6ce214e56fd14 Mon Sep 17 00:00:00 2001 From: shenmo Date: Wed, 22 Nov 2023 10:45:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A0=E6=B3=95=E8=A7=A3?= =?UTF-8?q?=E5=8C=85=E7=AA=97=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../deepinwine/tools/spark_run_v4.sh | 17 +++++++++++++---- 1 file changed, 13 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 a7e421d..5166e64 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 @@ -229,9 +229,18 @@ fi } ExtractApp() { +local tmp_log=$(mktemp) mkdir -p "$1" -# 7z x "$APPDIR/$APPTAR" -o"$1" -bsp1 -bb1 -bse2 | grep --line-buffered -oP "(\d+(\.\d+)?(?=%))" | zenity --progress --title="$BOTTLENAME" --text="${TRANSHELL_CONTENT_UNPACKING} $BOTTLENAME..." --width=400 --auto-close --no-cancel - 7z x "$APPDIR/$APPTAR" -o"$1" + (7z x "$APPDIR/$APPTAR" -o"$1" -bsp1 -bb1 -bse2 | grep --line-buffered -oP "(\d+(\.\d+)?(?=%))" > $tmp_log)& + + cmd_pid=$! +(while kill -0 $cmd_pid 2> /dev/null; do + cat "${tmp_log}" + sleep 1 + done)| zenity --progress --title="$BOTTLENAME" --text="${TRANSHELL_CONTENT_UNPACKING} $BOTTLENAME..." --width=400 --auto-close --no-cancel + + + mv "$1/drive_c/users/@current_user@" "$1/drive_c/users/$USER" sed -i "s#@current_user@#$USER#" $1/*.reg FixLink @@ -297,9 +306,9 @@ RunApp() exit 0 fi if [ -d "$WINEPREFIX" ]; then - UpdateApp | progressbar "$BOTTLENAME" "${TRANSHELL_CONTENT_UNPACKING} $BOTTLENAME..." + UpdateApp else - DeployApp | progressbar "$BOTTLENAME" "${TRANSHELL_CONTENT_UNPACKING} $BOTTLENAME..." + DeployApp fi CallApp "$@"