updated create shortcat from epic games
This commit is contained in:
parent
c26ca666c5
commit
723596bb16
@ -1890,8 +1890,7 @@ export -f wait_wineserver
|
||||
|
||||
kill_portwine () {
|
||||
if [[ "${PW_WINE_USE}" != "USE_SYSTEM_WINE" ]] ; then
|
||||
check_flatpak
|
||||
if [[ "$ALPINE_FP" == "1" ]] ; then
|
||||
if check_flatpak && [[ "$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
|
||||
@ -1908,7 +1907,6 @@ kill_portwine () {
|
||||
kill -n 9 "${pw_kill_pids}" &>/dev/null
|
||||
fi
|
||||
done
|
||||
|
||||
return 0
|
||||
}
|
||||
export -f kill_portwine
|
||||
@ -4378,34 +4376,13 @@ portwine_launch () {
|
||||
|
||||
[[ $PW_LOG != 1 ]] && debug_timer --start -s "PW_TIME_IN_GAME"
|
||||
if [[ -n "${LAUNCH_URI}" ]]; then
|
||||
WINEPROCESSES="^(start|winedbg|conhost|explorer|tabtip|services|rpcss|svchost|plugplay|winedevice).exe$"
|
||||
if [[ "${LAUNCH_URI}" =~ ^com.epicgames.launcher ]]; then
|
||||
WINEPROCESSES+="|^EOSOverlayRenderer|(EpicGamesLauncher|EpicWebHelper).exe$"
|
||||
fi
|
||||
pw_run start /high /b "${LAUNCH_URI}" &
|
||||
while true ; do
|
||||
sleep 5
|
||||
if [[ -z "${exe_pid}" || ! -e "/proc/${exe_pid}" ]]; then
|
||||
processes=$("${WINEDIR}/bin/winedbg" --command "info proc" 2>/dev/null)
|
||||
exe_path=$(echo "${processes}" | grep -oP "(?<=\s)'[^']+'" | sed "s/^'//;s/'$//" | grep -Ev "${WINEPROCESSES}" | head -n 1)
|
||||
echo "${processes}" > "${PORT_WINE_TMP_PATH}/processes"
|
||||
if [[ -n "${exe_path}" ]]; then
|
||||
unset exe_pid
|
||||
for pid in $(ls -lr /proc/*/exe | grep -E 'wine(64)?-preloader' | awk -F/ '{print $3}'); do
|
||||
if [[ "$(tr '\0' ' ' < "/proc/${pid}/cmdline" 2>/dev/null)" == *"${exe_path}"* ]]; then
|
||||
exe_pid="${pid}"
|
||||
elif grep -q "${exe_path}" "/proc/${pid}/maps" 2>/dev/null; then
|
||||
exe_pid="${pid}"
|
||||
else
|
||||
continue
|
||||
fi
|
||||
break
|
||||
done
|
||||
elif [[ -n "${exe_pid}" ]]; then
|
||||
break
|
||||
fi
|
||||
fi
|
||||
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)
|
||||
@ -6207,8 +6184,7 @@ portwine_output_yad_shortcut () {
|
||||
|
||||
export PW_NEW_DESKTOP="1"
|
||||
|
||||
if [[ "$PW_NO_RESTART_PPDB" != "1" ]] \
|
||||
|| [[ -z ${LINKS[1]} ]] ; then
|
||||
if [[ "$PW_NO_RESTART_PPDB" != "1" ]] ; then
|
||||
print_info "Restarting PP..."
|
||||
[[ "$PW_GUI_START" == "NOTEBOOK" ]] && unset PW_YAD_FORM_TAB
|
||||
restart_pp
|
||||
@ -6277,6 +6253,7 @@ pw_auto_create_shortcut () {
|
||||
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
|
||||
|
@ -99,7 +99,7 @@ unset CHK_SYMLINK_FILE PW_MESA_GL_VERSION_OVERRIDE PW_VKD3D_FEATURE_LEVEL PATH_T
|
||||
unset PW_PREFIX_NAME WINEPREFIX VULKAN_MOD PW_WINE_VER PW_ADD_TO_ARGS_IN_RUNTIME PW_GAMEMODERUN_SLR PW_WINE_CPU_TOPOLOGY
|
||||
unset MANGOHUD_CONFIG FPS_LIMIT PW_WINE_USE WINEDLLPATH WINE WINEDIR WINELOADER WINESERVER PW_USE_RUNTIME PORTWINE_CREATE_SHORTCUT_NAME MIRROR
|
||||
unset PW_LOCALE_SELECT PW_SETTINGS_INDICATION PW_GUI_START PW_AUTOINSTALL_EXE NOSTSTDIR RADV_DEBUG PW_NO_AUTO_CREATE_SHORTCUT
|
||||
unset PW_TERM PW_EXEC_FROM_DESKTOP WEBKIT_DISABLE_DMABUF_RENDERER PW_AMD_VULKAN_USE PW_VK_ICD_FILENAMES
|
||||
unset PW_TERM PW_EXEC_FROM_DESKTOP WEBKIT_DISABLE_DMABUF_RENDERER PW_AMD_VULKAN_USE PW_VK_ICD_FILENAMES LAUNCH_URI
|
||||
|
||||
export PORT_WINE_TMP_PATH="${PORT_WINE_PATH}/data/tmp"
|
||||
rm -f "$PORT_WINE_TMP_PATH"/*{exe,msi,tar}*
|
||||
|
Loading…
Reference in New Issue
Block a user