From 08d12d068e788745d3287d068aae3a6240b71937 Mon Sep 17 00:00:00 2001 From: gfdgd_xi <3025613752@qq.com> Date: Tue, 16 Jul 2024 14:23:37 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=B0=86=E9=83=A8=E5=88=86=E7=BB=9D?= =?UTF-8?q?=E5=AF=B9=E8=B7=AF=E5=BE=84=E6=94=B9=E4=B8=BA=E7=9B=B8=E5=AF=B9?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E4=BB=A5=E6=96=B9=E4=BE=BF=E9=9B=86=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wine-app-launcher/wine-app-launcher.sh | 12 +++++++----- .../files/deepinwine/tools/spark_gl-wine/run_gl.sh | 4 +++- .../files/deepinwine/tools/spark_run_v4.sh | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark-dwine-helper/wine-app-launcher/wine-app-launcher.sh b/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark-dwine-helper/wine-app-launcher/wine-app-launcher.sh index 65e4dd2..0b7f2a7 100755 --- a/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark-dwine-helper/wine-app-launcher/wine-app-launcher.sh +++ b/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark-dwine-helper/wine-app-launcher/wine-app-launcher.sh @@ -1,5 +1,7 @@ #!/bin/bash +SHELL_DIR=$(dirname $(realpath $0)) + # 函数:获取所有应用列表 # 函数:获取所有应用列表 get_apps_list() { @@ -26,7 +28,7 @@ get_apps_list() { version="无法读取" fi - if grep -q "START_SHELL_PATH=\"/opt/deepinwine/tools/spark_run_v4.sh\"" "$run_script"; then + if grep -q "START_SHELL_PATH=\"$SHELL_DIR/../spark_run_v4.sh\"" "$run_script"; then use_spark="是" fi fi @@ -63,7 +65,7 @@ select_app() { local app_dir="/opt/apps/$app" local run_script="$app_dir/files/run.sh" local use_spark="否" - if grep -q "START_SHELL_PATH=\"/opt/deepinwine/tools/spark_run_v4.sh\"" "$run_script"; then + if grep -q "START_SHELL_PATH=\"$SHELL_DIR/../spark_run_v4.sh\"" "$run_script"; then use_spark="是" fi if [ "$use_spark" == "是" ]; then @@ -95,7 +97,7 @@ select_non_spark_action(){ local app_dir="/opt/apps/$app" local run_script="$app_dir/files/run.sh" local bottle_name=$(grep -oP 'BOTTLENAME="\K[^"]+' "$run_script") - /opt/deepinwine/tools/kill.sh ${bottle_name} + $SHELL_DIR/../kill.sh ${bottle_name} rm -rf /home/$(whoami)/.deepinwine/${bottle_name}/* zenity --info --width=300 --text="操作已完成,请重启Wine应用查看" ;; @@ -138,7 +140,7 @@ select_spark_action() { local app_dir="/opt/apps/$app" local run_script="$app_dir/files/run.sh" local bottle_name=$(grep -oP 'BOTTLENAME="\K[^"]+' "$run_script") - /opt/deepinwine/tools/spark_kill.sh ${bottle_name} + $SHELL_DIR/../spark_kill.sh ${bottle_name} rm -rf /home/$(whoami)/.deepinwine/${bottle_name}/* zenity --info --width=300 --text="操作已完成,请重启Wine应用查看" ;; @@ -181,7 +183,7 @@ select_scale_action() { if [ "$scale_factor" == "恢复默认" ];then rm $HOME/.deepinwine/$bottle_name/scale.txt else - /opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark-dwine-helper/scale-set-helper/set-wine-scale.sh -s "$scale_factor" "$HOME/.deepinwine/$bottle_name" + $SHELL_DIR/scale-set-helper/set-wine-scale.sh -s "$scale_factor" "$HOME/.deepinwine/$bottle_name" fi elif [ "$scale_type" == "全局" ]; then if [ "$scale_factor" == "恢复默认" ];then diff --git a/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_gl-wine/run_gl.sh b/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_gl-wine/run_gl.sh index 68118a9..34b38b8 100755 --- a/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_gl-wine/run_gl.sh +++ b/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_gl-wine/run_gl.sh @@ -2,7 +2,9 @@ cd $(dirname $0) -runtime_path=/opt/deepinwine/runtime-i386 +SHELL_DIR=$(dirname $(realpath $0)) +runtime_path=$SHELL_DIR/../../runtime-i386 +echo $runtime_path if [ -f "$runtime_path/init_runtime.sh" ];then source "$runtime_path/init_runtime.sh" diff --git a/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_run_v4.sh b/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_run_v4.sh index b3143e9..4d87919 100755 --- a/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_run_v4.sh +++ b/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_run_v4.sh @@ -178,7 +178,7 @@ DisableWrite() ########如果有该文件夹则删除,然后再创建一个不允许写入的 is_autostart() { - AUTOSTART="/opt/deepinwine/tools/autostart" + AUTOSTART="$SHELL_DIR/autostart" if [ -f "$AUTOSTART.all" ]&&[ -f "/opt/apps/$1/files/run.sh" ];then return 0 fi -- Gitee From 9cfa2f83272f4556483aeef1a53002966b2da763 Mon Sep 17 00:00:00 2001 From: gfdgd_xi <3025613752@qq.com> Date: Tue, 16 Jul 2024 22:09:14 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=85=B3=E9=94=AE?= =?UTF-8?q?=E8=AF=8D=E8=AF=86=E5=88=ABspark=5Frun=5Fv4.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../spark-dwine-helper/wine-app-launcher/wine-app-launcher.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark-dwine-helper/wine-app-launcher/wine-app-launcher.sh b/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark-dwine-helper/wine-app-launcher/wine-app-launcher.sh index 0b7f2a7..e0daa11 100755 --- a/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark-dwine-helper/wine-app-launcher/wine-app-launcher.sh +++ b/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark-dwine-helper/wine-app-launcher/wine-app-launcher.sh @@ -27,8 +27,8 @@ get_apps_list() { if [ -z "$version" ]; then version="无法读取" fi - - if grep -q "START_SHELL_PATH=\"$SHELL_DIR/../spark_run_v4.sh\"" "$run_script"; then + # START_SHELL_PATH=XXX/spark_run_v4.sh + if grep START_SHELL_PATH= "$run_script" | grep spark_run_v4.sh; then use_spark="是" fi fi -- Gitee From 0a203effd1d389a7024d010f4ceb06007483ebee Mon Sep 17 00:00:00 2001 From: gfdgd_xi <3025613752@qq.com> Date: Tue, 16 Jul 2024 22:10:47 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=BC=8F=E6=94=B9=E4=BA=86=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../spark-dwine-helper/wine-app-launcher/wine-app-launcher.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark-dwine-helper/wine-app-launcher/wine-app-launcher.sh b/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark-dwine-helper/wine-app-launcher/wine-app-launcher.sh index e0daa11..7fc07e8 100755 --- a/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark-dwine-helper/wine-app-launcher/wine-app-launcher.sh +++ b/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark-dwine-helper/wine-app-launcher/wine-app-launcher.sh @@ -65,7 +65,7 @@ select_app() { local app_dir="/opt/apps/$app" local run_script="$app_dir/files/run.sh" local use_spark="否" - if grep -q "START_SHELL_PATH=\"$SHELL_DIR/../spark_run_v4.sh\"" "$run_script"; then + if if grep START_SHELL_PATH= "$run_script" | grep spark_run_v4.sh; then use_spark="是" fi if [ "$use_spark" == "是" ]; then -- Gitee From cd1d78b64c29953d305a8f947780d27fb1b771dc Mon Sep 17 00:00:00 2001 From: gfdgd_xi <3025613752@qq.com> Date: Tue, 16 Jul 2024 22:13:13 +0800 Subject: [PATCH 4/6] =?UTF-8?q?runtime-i386=E7=9A=84=E4=BC=98=E5=85=88?= =?UTF-8?q?=E7=BA=A7=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../files/deepinwine/tools/spark_gl-wine/run_gl.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_gl-wine/run_gl.sh b/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_gl-wine/run_gl.sh index 34b38b8..abdf6d0 100755 --- a/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_gl-wine/run_gl.sh +++ b/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_gl-wine/run_gl.sh @@ -3,7 +3,11 @@ cd $(dirname $0) SHELL_DIR=$(dirname $(realpath $0)) -runtime_path=$SHELL_DIR/../../runtime-i386 +runtime_path=/opt/deepinwine/runtime-i386 +if [[ -d $SHELL_DIR/../../runtime-i386 ]]; then + # 如果该 helper 下含有 runtime-i386,则直接使用相对路径的 + runtime_path=$SHELL_DIR/../../runtime-i386 +fi echo $runtime_path if [ -f "$runtime_path/init_runtime.sh" ];then source "$runtime_path/init_runtime.sh" -- Gitee From cd2e804407fc03ec2ab0004025ad49ef720d8318 Mon Sep 17 00:00:00 2001 From: gfdgd_xi <3025613752@qq.com> Date: Tue, 16 Jul 2024 22:31:08 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=93=E5=8C=85?= =?UTF-8?q?=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../run.sh" | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git "a/\346\211\223\345\214\205\347\224\250\344\276\213/run.sh" "b/\346\211\223\345\214\205\347\224\250\344\276\213/run.sh" index d6f440a..901f1b3 100755 --- "a/\346\211\223\345\214\205\347\224\250\344\276\213/run.sh" +++ "b/\346\211\223\345\214\205\347\224\250\344\276\213/run.sh" @@ -40,11 +40,18 @@ BOTTLENAME="容器名" APPVER="版本号" EXEC_PATH="启动路径" ##### 软件在wine中的启动路径 -if [ -e "/opt/deepinwine/tools/spark_run_v4.sh"] ;then - START_SHELL_PATH="/opt/deepinwine/tools/spark_run_v4.sh" -else +SHELL_DIR=$(dirname $(realpath $0)) +START_SHELL_PATH="/opt/deepinwine/tools/run_v4.sh" +if [ -e "$SHELL_DIR/deepinwine/tools/spark_run_v4.sh" ] ;then + # 如果 helper 在 run.sh 相同目录的 deepinwine/tools/spark_run_v4.sh 则可以调用 + START_SHELL_PATH="$SHELL_DIR/deepinwine/tools/spark_run_v4.sh" +fi +if [ -e "/opt/deepinwine/tools/run_v4.sh" ] ;then START_SHELL_PATH="/opt/deepinwine/tools/run_v4.sh" fi +if [ -e "/opt/deepinwine/tools/spark_run_v4.sh" ] ;then + START_SHELL_PATH="/opt/deepinwine/tools/spark_run_v4.sh" +fi ENABLE_DOT_NET="" ####若使用spark-wine时需要用到.net,则请把ENABLE_DOT_NET设为true,同时在依赖中写spark-wine7-mono #export BOX86_EMU_CMD="/opt/spark-box86/box86" -- Gitee From 222b5f10a655339800bbcbc5b4212479716955ca Mon Sep 17 00:00:00 2001 From: gfdgd_xi <3025613752@qq.com> Date: Tue, 30 Jul 2024 12:44:25 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=80=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../files/deepinwine/tools/spark_gl-wine/run_gl.sh | 4 ---- .../files/deepinwine/tools/spark_run_v4.sh | 6 +++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_gl-wine/run_gl.sh b/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_gl-wine/run_gl.sh index abdf6d0..0d940e0 100755 --- a/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_gl-wine/run_gl.sh +++ b/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_gl-wine/run_gl.sh @@ -4,10 +4,6 @@ cd $(dirname $0) SHELL_DIR=$(dirname $(realpath $0)) runtime_path=/opt/deepinwine/runtime-i386 -if [[ -d $SHELL_DIR/../../runtime-i386 ]]; then - # 如果该 helper 下含有 runtime-i386,则直接使用相对路径的 - runtime_path=$SHELL_DIR/../../runtime-i386 -fi echo $runtime_path if [ -f "$runtime_path/init_runtime.sh" ];then source "$runtime_path/init_runtime.sh" diff --git a/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_run_v4.sh b/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_run_v4.sh index 4d87919..8aae271 100755 --- a/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_run_v4.sh +++ b/spark-dwine-helper/s-wine-helper/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_run_v4.sh @@ -178,7 +178,11 @@ DisableWrite() ########如果有该文件夹则删除,然后再创建一个不允许写入的 is_autostart() { - AUTOSTART="$SHELL_DIR/autostart" + AUTOSTART="/opt/deepinwine/tools/autostart" + if [[ -f "$SHELL_DIR/autostart" ]]; then + # 如果打包时自带 autostart,则使用自带的 + AUTOSTART="$SHELL_DIR/autostart" + fi if [ -f "$AUTOSTART.all" ]&&[ -f "/opt/apps/$1/files/run.sh" ];then return 0 fi -- Gitee