From 4636c75dbd94571133afd80f38b68a98c1344067 Mon Sep 17 00:00:00 2001
From: Htylol <dixperm909@yandex.ru>
Date: Mon, 30 Sep 2024 19:21:53 +0500
Subject: [PATCH 1/2] Added fixes for pw_find_exe

---
 data_from_portwine/scripts/start.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/data_from_portwine/scripts/start.sh b/data_from_portwine/scripts/start.sh
index 7ea1881e..c51b32a4 100755
--- a/data_from_portwine/scripts/start.sh
+++ b/data_from_portwine/scripts/start.sh
@@ -830,6 +830,14 @@ fi
         else
             export TAB_MAIN_MENU="4"
         fi
+        ;;
+    pw_find_exe)
+        if [[ -z "${PW_ALL_DF}" ]] ; then
+            export TAB_MAIN_MENU="5"
+        else
+            export TAB_MAIN_MENU="1"
+        fi
+        ;;
 esac
 
 [[ -n "$PW_YAD_SET" ]] && case "$PW_YAD_SET" in

From 03747a78c0df448e9a395479c4433fbe1bc64004 Mon Sep 17 00:00:00 2001
From: Htylol <dixperm909@yandex.ru>
Date: Mon, 30 Sep 2024 20:33:06 +0500
Subject: [PATCH 2/2] Fixes for flatpak

---
 data_from_portwine/scripts/functions_helper | 1 +
 data_from_portwine/scripts/start.sh         | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper
index 955bbaee..78858fcd 100755
--- a/data_from_portwine/scripts/functions_helper
+++ b/data_from_portwine/scripts/functions_helper
@@ -1007,6 +1007,7 @@ init_wine_ver () {
 }
 
 pw_init_runtime () {
+    check_flatpak && export PW_USE_RUNTIME="0"
     if [[ "$PW_USE_RUNTIME" != "1" ]] \
     || [[ "$PW_WINE_USE" == "USE_SYSTEM_WINE" ]]
     then
diff --git a/data_from_portwine/scripts/start.sh b/data_from_portwine/scripts/start.sh
index c51b32a4..79f7b59a 100755
--- a/data_from_portwine/scripts/start.sh
+++ b/data_from_portwine/scripts/start.sh
@@ -284,7 +284,6 @@ fi
 
 if check_flatpak ; then
     try_remove_dir "${PORT_WINE_TMP_PATH}/libs${PW_LIBS_VER}"
-    export PW_USE_RUNTIME="0"
 else pw_download_libs
 fi