|
|
|
@ -1890,7 +1890,8 @@ export -f wait_wineserver
|
|
|
|
|
|
|
|
|
|
kill_portwine () {
|
|
|
|
|
if [[ "${PW_WINE_USE}" != "USE_SYSTEM_WINE" ]] ; then
|
|
|
|
|
if check_flatpak && [[ "$ALPINE_FP" == "1" ]] ; then
|
|
|
|
|
check_flatpak
|
|
|
|
|
if [[ "$ALPINE_FP" == "1" ]] ; then
|
|
|
|
|
wine_pids=$(ls -l /proc/*/exe >/dev/null 2>&1 | grep -ie PortProton | grep -E 'wine(64)?-preloader|wineserver' | awk -F/ '{print $3}')
|
|
|
|
|
bwrap_pids=$(pgrep -f wrap | grep PortProton | head -n 1)
|
|
|
|
|
else
|
|
|
|
@ -1907,6 +1908,7 @@ kill_portwine () {
|
|
|
|
|
kill -n 9 "${pw_kill_pids}" &>/dev/null
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
export -f kill_portwine
|
|
|
|
@ -2797,9 +2799,6 @@ pw_skip_get_info () {
|
|
|
|
|
GET_AMD_VULKAN_DRIVER_LIST="amdvlk amdgpupro radv"
|
|
|
|
|
unset AMD_VULKAN_DRIVER_LIST
|
|
|
|
|
|
|
|
|
|
if ! check_flatpak \
|
|
|
|
|
&& [[ $(check_vendor_gpu) =~ amd ]]
|
|
|
|
|
then
|
|
|
|
|
for DRIVER in $GET_AMD_VULKAN_DRIVER_LIST; do
|
|
|
|
|
case "$DRIVER" in
|
|
|
|
|
"amdvlk")
|
|
|
|
@ -2832,10 +2831,13 @@ pw_skip_get_info () {
|
|
|
|
|
esac
|
|
|
|
|
done
|
|
|
|
|
export AMD_VULKAN_DRIVER_LIST
|
|
|
|
|
export AMD_VULKAN_CB=":CB"
|
|
|
|
|
|
|
|
|
|
if [[ -z "$AMD_VULKAN_DRIVER_LIST" ]] || check_flatpak ; then
|
|
|
|
|
AMD_VULKAN_CB=":DCB"
|
|
|
|
|
else
|
|
|
|
|
export AMD_VULKAN_CB=":DCB"
|
|
|
|
|
AMD_VULKAN_CB=":CB"
|
|
|
|
|
fi
|
|
|
|
|
export AMD_VULKAN_CB
|
|
|
|
|
|
|
|
|
|
logical_cores=$(grep -c ^"processor" /proc/cpuinfo)
|
|
|
|
|
if [[ "${logical_cores}" -le "4" ]] ; then
|
|
|
|
@ -4375,15 +4377,6 @@ portwine_launch () {
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
[[ $PW_LOG != 1 ]] && debug_timer --start -s "PW_TIME_IN_GAME"
|
|
|
|
|
if [[ -n "${LAUNCH_URI}" ]]; then
|
|
|
|
|
pw_run start /high /b "${LAUNCH_URI}" &
|
|
|
|
|
while true ; do
|
|
|
|
|
sleep 5
|
|
|
|
|
GAMEPID="$(pgrep -fa "$(basename "$portwine_exe")" | grep -v "start.sh" | grep -i "epic" | awk '{print $1}')"
|
|
|
|
|
[[ -n $GAMEPID ]] && break
|
|
|
|
|
done
|
|
|
|
|
while [[ -f "/proc/$GAMEPID/exe" ]] ; do sleep 5 ; done
|
|
|
|
|
else
|
|
|
|
|
case "${portwine_exe,,}" in
|
|
|
|
|
*.exe)
|
|
|
|
|
pw_run "${PW_VD_TMP[@]}" ${WINE_WIN_START} "$portwine_exe"
|
|
|
|
@ -4402,7 +4395,6 @@ portwine_launch () {
|
|
|
|
|
pw_run "${PW_VD_TMP[@]}" winefile
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pw_winecfg () {
|
|
|
|
@ -6184,7 +6176,8 @@ portwine_output_yad_shortcut () {
|
|
|
|
|
|
|
|
|
|
export PW_NEW_DESKTOP="1"
|
|
|
|
|
|
|
|
|
|
if [[ "$PW_NO_RESTART_PPDB" != "1" ]] ; then
|
|
|
|
|
if [[ "$PW_NO_RESTART_PPDB" != "1" ]] \
|
|
|
|
|
|| [[ -z ${LINKS[1]} ]] ; then
|
|
|
|
|
print_info "Restarting PP..."
|
|
|
|
|
[[ "$PW_GUI_START" == "NOTEBOOK" ]] && unset PW_YAD_FORM_TAB
|
|
|
|
|
restart_pp
|
|
|
|
@ -6199,21 +6192,18 @@ portwine_output_yad_shortcut () {
|
|
|
|
|
|
|
|
|
|
parse_lnk () {
|
|
|
|
|
prefix_name=$(echo "$1" | awk -F"/prefixes/" '{print $2}' | awk -F"/" '{print $1}')
|
|
|
|
|
if fix_icon_name=$(grep -i "Icon File Name" "${PW_TMPFS_PATH}/exiftool.tmp" 2>/dev/null) && [[ "${fix_icon_name//*.exe/true}" == "true" ]] ; then
|
|
|
|
|
exe_path=$(sed -n 's/^Icon File Name\s*:\s*//p' "${PW_TMPFS_PATH}/exiftool.tmp")
|
|
|
|
|
if fix_icon_name=$(grep -i "Icon File Name" "${PW_TMPFS_PATH}/exiftool.tmp" 2>/dev/null) \
|
|
|
|
|
&& [[ "${fix_icon_name//*.exe/true}" == "true" ]] ; then
|
|
|
|
|
link_drive=$(sed -n 's/^Icon File Name\s*:\s*//p' "${PW_TMPFS_PATH}/exiftool.tmp" | cut -d: -f1 | awk '{print tolower($0)}')
|
|
|
|
|
link_path=$(sed -n 's/^Icon File Name\s*:\s*//p' "${PW_TMPFS_PATH}/exiftool.tmp" | sed 's|%ProgramFiles(x86)%|C:\\Program Files (x86)|gi;s|%ProgramFiles%|C:\\Program Files|gi' | sed "s|^.|${PORT_WINE_PATH}/data/prefixes/${prefix_name:-DEFAULT}/dosdevices/$link_drive|g" | sed 's/\\/\//g')
|
|
|
|
|
else
|
|
|
|
|
exe_path=$(sed -n 's/^Local Base Path\s*:\s*//p' "${PW_TMPFS_PATH}/exiftool.tmp")
|
|
|
|
|
link_drive=$(sed -n 's/^Local Base Path\s*:\s*//p' "${PW_TMPFS_PATH}/exiftool.tmp" | cut -d: -f1 | awk '{print tolower($0)}')
|
|
|
|
|
link_path=$(sed -n 's/^Local Base Path\s*:\s*//p' "${PW_TMPFS_PATH}/exiftool.tmp" | sed 's|%ProgramFiles(x86)%|C:\\Program Files (x86)|gi;s|%ProgramFiles%|C:\\Program Files|gi' | sed "s|^.|${PORT_WINE_PATH}/data/prefixes/${prefix_name:-DEFAULT}/dosdevices/$link_drive|g" | sed 's/\\/\//g')
|
|
|
|
|
fi
|
|
|
|
|
get_lnk_path "${exe_path}"
|
|
|
|
|
link_name=$(sed -n 's/^File Name\s*:\s*//p' "${PW_TMPFS_PATH}/exiftool.tmp" | sed 's|\.lnk||')
|
|
|
|
|
link_cmd=$(sed -n 's/^Command Line Arguments\s*:\s*//p' "${PW_TMPFS_PATH}/exiftool.tmp")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get_lnk_path () {
|
|
|
|
|
link_drive=$(echo "$1" | cut -d: -f1 | awk '{print tolower($0)}')
|
|
|
|
|
link_path=$(echo "$1" | sed 's|%ProgramFiles(x86)%|C:\\Program Files (x86)|gi;s|%ProgramFiles%|C:\\Program Files|gi' | sed "s|^.|${PORT_WINE_PATH}/data/prefixes/${prefix_name:-${PW_PREFIX_NAME:-DEFAULT}}/dosdevices/${link_drive}|g" | sed 's/\\/\//g')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get_lnk () {
|
|
|
|
|
if command -v exiftool &>/dev/null ; then
|
|
|
|
|
if timeout 3 exiftool "$1" &> "${PW_TMPFS_PATH}/exiftool.tmp" ; then
|
|
|
|
@ -6238,30 +6228,6 @@ pw_auto_create_shortcut () {
|
|
|
|
|
return 0
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [[ "${portwine_exe}" =~ EpicGamesLauncher.exe$ ]]; then
|
|
|
|
|
for item_file in "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/ProgramData/Epic/EpicGamesLauncher/Data/Manifests/"*".item"; do
|
|
|
|
|
if [[ -f "${item_file}" ]]; then
|
|
|
|
|
exe_path=$(jq -r '.InstallLocation + "\\" + .LaunchExecutable' "${item_file}")
|
|
|
|
|
get_lnk_path "${exe_path}"
|
|
|
|
|
PORTWINE_CREATE_SHORTCUT_NAME=$(jq -r '.DisplayName' "${item_file}")
|
|
|
|
|
if ! exe_path="$(realpath "${link_path}" 2>/dev/null)" || [[ ! -f "${exe_path}" ]]; then
|
|
|
|
|
print_warning "Link broken for: ${PORTWINE_CREATE_SHORTCUT_NAME}"
|
|
|
|
|
elif [[ ! -f "${exe_path}.ppdb" ]]; then
|
|
|
|
|
unset FILE_SHA256SUM DESKTOP_NAME_FILE DESKTOP_CORRECT_FILE
|
|
|
|
|
item_id=$(jq -r '.AppName' "${item_file}")
|
|
|
|
|
portwine_exe="${exe_path}"
|
|
|
|
|
PORTWINE_DB_FILE="${portwine_exe}.ppdb"
|
|
|
|
|
LAUNCH_URI="com.epicgames.launcher://apps/${item_id}?action=launch&silent=true"
|
|
|
|
|
pw_init_db
|
|
|
|
|
export PW_NO_RESTART_PPDB="1"
|
|
|
|
|
edit_db_from_gui PW_PREFIX_NAME LAUNCH_URI
|
|
|
|
|
portwine_create_shortcut
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
return 0
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
unset LINKS
|
|
|
|
|
for link_file in "${PORT_WINE_PATH}"/data/prefixes/*/drive_c/users/*/Desktop/*.lnk ; do
|
|
|
|
|
link_file=$(readlink -f "$link_file")
|
|
|
|
|