Rewrite portwine_launch function and add reg support

This commit is contained in:
2024-08-10 12:05:50 +05:00
parent 223b35c7b2
commit 56cf101c7d
2 changed files with 20 additions and 11 deletions

View File

@ -36,13 +36,13 @@ if [[ "$1" == *.ppack ]] ; then
portwine_exe="$1"
elif [[ -f "$1" ]] ; then
portwine_exe="$(realpath "$1")"
elif [[ -f "$OLDPWD/$1" ]] && [[ "$1" == *.exe ]] ; then
elif [[ -f "$OLDPWD/$1" ]] && ([[ "$1" == *.exe ]] || [[ "$1" == *.bat ]]); then
portwine_exe="$(realpath "$OLDPWD/$1")"
elif [[ "$1" == "--debug" ]] && [[ -f "$2" ]] ; then
portwine_exe="$(realpath "$2")"
elif [[ "$1" == "--debug" ]] && [[ -f "$OLDPWD/$2" ]] && [[ "$2" == *.exe ]] ; then
elif [[ "$1" == "--debug" ]] && [[ -f "$OLDPWD/$2" ]] && ([[ "$2" == *.exe ]] || [[ "$2" == *.bat ]]); then
portwine_exe="$(realpath "$OLDPWD/$2")"
elif [[ "$1" == *.exe ]] ; then
elif [[ "$1" == *.exe ]] || [[ "$1" == *.bat ]]; then
portwine_exe="$1"
MISSING_DESKTOP_FILE=1
fi