Merge branch 'lnk' of github.com:alex2844/PortWINE into alex2844-lnk

This commit is contained in:
Mikhail Tergoev
2024-12-01 13:30:42 +03:00
3 changed files with 35 additions and 34 deletions

View File

@ -52,7 +52,7 @@ if [[ "${1,,}" =~ .ppack$ ]] ; then
export PW_NO_RESTART_PPDB="1"
export PW_DISABLED_CREATE_DB="1"
portwine_exe="$1"
elif [[ "${1,,}" =~ .(exe|bat|msi|reg)$ ]] ; then
elif [[ "${1,,}" =~ .(exe|bat|msi|reg|lnk)$ ]] ; then
if [[ -f "$1" ]] ; then
portwine_exe="$(realpath -s "$1")"
elif [[ -f "$OLDPWD/$1" ]] ; then
@ -61,6 +61,10 @@ elif [[ "${1,,}" =~ .(exe|bat|msi|reg)$ ]] ; then
portwine_exe="$1"
MISSING_DESKTOP_FILE="1"
fi
if [[ -n "${portwine_exe}" && "${1,,}" =~ .lnk$ ]] ; then
get_lnk "${portwine_exe}"
portwine_exe="$(realpath "${link_path}" 2>/dev/null)"
fi
elif [[ "$1" =~ ^--(debug|launch|edit-db)$ && "${2,,}" =~ .(exe|bat|msi|reg)$ ]] ; then
if [[ -f "$2" ]] ; then
portwine_exe="$(realpath -s "$2")"