From 5432d289dc1ed3ad80b099130012f957fff6aa9a Mon Sep 17 00:00:00 2001 From: Htylol Date: Thu, 15 Aug 2024 19:04:44 +0500 Subject: [PATCH 1/4] Added support upper case format files --- data_from_portwine/scripts/functions_helper | 12 ++++++------ data_from_portwine/scripts/start.sh | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index dc6cbfb..1d31cef 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -1393,7 +1393,7 @@ check_nvidia_rtx () { pw_init_db () { if [[ -f "${portwine_exe}" ]] ; then - PORTWINE_DB="$(basename "${portwine_exe}" .exe)" + PORTWINE_DB="$(basename "${portwine_exe%.[Ee][Xx][Ee]}")" export PORTWINE_DB if echo "${PORTWINE_DB}" | grep -i "_vo_\|_gv_" &>/dev/null ; then print_warning "Force use gamesvoice.ppdb file!" @@ -1735,7 +1735,7 @@ pw_create_gui_png () { then PORTPROTON_NAME="$PW_PRODUCTNAME" else - PORTPROTON_NAME="$(basename "${portwine_exe}" .exe)" + PORTPROTON_NAME="$(basename "${portwine_exe%.[Ee][Xx][Ee]}")" fi fi @@ -3093,17 +3093,17 @@ portwine_launch () { fi case "$portwine_exe" in - *.exe) + *.[Ee][Xx][Ee]) pw_run ${PW_VD_TMP[@]} ${WINE_WIN_START} "$portwine_exe" ;; - *.bat) + *.[Bb][Aa][Tt]) PW_USE_TERMINAL=1 pw_run ${PW_VD_TMP[@]} cmd /c "$portwine_exe" ;; - *.msi) + *.[Mm][Ss][Ii]) pw_run ${PW_VD_TMP[@]} msiexec /i "$portwine_exe" ;; - *.reg) + *.[Rr][Ee][Gg]) pw_run ${PW_VD_TMP[@]} regedit "$portwine_exe" ;; *) diff --git a/data_from_portwine/scripts/start.sh b/data_from_portwine/scripts/start.sh index 024b9a1..37669f0 100755 --- a/data_from_portwine/scripts/start.sh +++ b/data_from_portwine/scripts/start.sh @@ -30,14 +30,14 @@ export orig_IFS="$IFS" MISSING_DESKTOP_FILE="0" unset PW_NO_RESTART_PPDB PW_DISABLED_CREATE_DB -if [[ "$1" == *.ppack ]] ; then +if [[ "$1" == *.[Pp][Pp][Aa][Cc][Kk] ]] ; then export PW_NO_RESTART_PPDB="1" export PW_DISABLED_CREATE_DB="1" portwine_exe="$1" elif [[ -f "$1" ]] ; then portwine_exe="$(realpath "$1")" elif [[ -f "$OLDPWD/$1" ]] \ -&& [[ "$1" == *.exe || "$1" == *.bat || "$1" == *.reg || "$1" == *.msi ]] +&& [[ "$1" == *.[Ee][Xx][Ee] || "$1" == *.[Bb][Aa][Tt] || "$1" == *.[Rr][Ee][Gg] || "$1" == *.[Mm][Ss][Ii] ]] then portwine_exe="$(realpath "$OLDPWD/$1")" elif [[ "$1" == "--debug" ]] \ @@ -46,10 +46,10 @@ then portwine_exe="$(realpath "$2")" elif [[ "$1" == "--debug" ]] \ && [[ -f "$OLDPWD/$2" ]] \ -&& [[ "$2" == *.exe || "$2" == *.bat || "$2" == *.reg || "$2" == *.msi ]] +&& [[ "$2" == *.[Ee][Xx][Ee] || "$2" == *.[Bb][Aa][Tt] || "$2" == *.[Rr][Ee][Gg] || "$2" == *.[Mm][Ss][Ii] ]] then portwine_exe="$(realpath "$OLDPWD/$2")" -elif [[ "$1" == *.exe || "$1" == *.bat || "$1" == *.msi || "$1" == *.reg ]] +elif [[ "$1" == *.[Ee][Xx][Ee] || "$1" == *.[Bb][Aa][Tt] || "$1" == *.[Mm][Ss][Ii] || "$1" == *.[Rr][Ee][Gg] ]] then portwine_exe="$1" MISSING_DESKTOP_FILE=1 From c9406e131cf651a525f36f02e62ddae20250378d Mon Sep 17 00:00:00 2001 From: Mikhail Tergoev Date: Wed, 21 Aug 2024 16:06:56 +0300 Subject: [PATCH 2/4] skip pw_auto_create_shortcut for vkPlay --- data_from_portwine/scripts/functions_helper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index 1d31cef..e76ef1e 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -4824,7 +4824,7 @@ portwine_create_shortcut () { pw_auto_create_shortcut () { if [[ "${PW_CHECK_AUTOINSTALL}" == 1 ]] \ - || echo "${portwine_exe}" | grep "gc_api.exe" &>/dev/null # skip lgc and wgc api + || echo "${portwine_exe}" | grep "gc_api.exe\|VKPlay" &>/dev/null then return 0 fi From 8ef7672d03e88b778570aa5206d3d61402189694 Mon Sep 17 00:00:00 2001 From: Htylol Date: Fri, 16 Aug 2024 09:50:35 +0500 Subject: [PATCH 3/4] Fixed combobox gpu when there is no vulkan driver --- data_from_portwine/scripts/functions_helper | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index e76ef1e..be7b1aa 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -562,22 +562,34 @@ debug_timer () { print_warning "It took $DIFF milliseconds" fi fi + return 0 } combobox_fix () { - if [[ -z "$1" ]] || [[ -z "$2" && "$1" != "--empty" ]] ; then + if [[ -z "$1" ]] ; then print_error "no argument specified for combobox_fix" return 1 else - if [[ "$1" == "--disabled" ]] || [[ "$1" == "--empty" ]] ; then + if [[ "$1" == "--disabled" ]] ; then if [[ -z "$3" ]] ; then - print_error "no argument specified for combobox_fix" - return 1 + echo "disabled" + return 0 + fi + name1="$2" + name2="$3" + elif [[ "$1" == "--empty" ]] ; then + if [[ -z "$3" ]] ; then + echo "" + return 0 fi name1="$2" name2="$3" else name1="$1" + if [[ -z "$2" ]] ; then + echo "${name1}" + return 0 + fi name2="$2" fi name3="${name2//\!${name1}\!/\!}" From 9266de678686471e07e2c17b3b61252ea0c5a0b7 Mon Sep 17 00:00:00 2001 From: Htylol Date: Thu, 15 Aug 2024 23:23:10 +0500 Subject: [PATCH 4/4] Faster and fix spellcheck --- data_from_portwine/scripts/start.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/data_from_portwine/scripts/start.sh b/data_from_portwine/scripts/start.sh index 37669f0..d92fe94 100755 --- a/data_from_portwine/scripts/start.sh +++ b/data_from_portwine/scripts/start.sh @@ -65,9 +65,12 @@ then MISSING_DESKTOP_FILE="0" fi -cd "$(dirname "$(readlink -f "$0")")" && PORT_SCRIPTS_PATH="$(pwd)" || fatal -cd "${PORT_SCRIPTS_PATH}/../../" && PORT_WINE_PATH="$(pwd)" || fatal -export PORT_SCRIPTS_PATH PORT_WINE_PATH +if PORT_SCRIPTS_PATH="$(readlink -f "${0%/*}")" ; then + export PORT_SCRIPTS_PATH + export PORT_WINE_PATH="${PORT_SCRIPTS_PATH%/*/*}" +else + fatal +fi export TEXTDOMAIN="PortProton" export TEXTDOMAINDIR="${PORT_WINE_PATH}/data/locales"