Commit 8835cdd5 authored by Boria138's avatar Boria138

Fixed PW_EXEC_FROM_DESKTOP=

parent d8a46310
......@@ -655,12 +655,16 @@ else
if [[ ! -z $(pidof -s yad) ]] || [[ ! -z $(pidof -s yad_v12_3) ]] ; then
kill -s SIGUSR1 $(pgrep -a yad | grep "\--key=${KEY} \--notebook" | awk '{print $1}') > /dev/null 2>&1
fi
PW_EXEC_FROM_DESKTOP="$(cat "${PORT_WINE_PATH}/${PW_YAD_SET//¬/" "}" | grep Exec | head -n 1 | awk -F"=env " '{print $2}')"
if [[ $(cat /etc/os-release | grep -i "flatpak") ]] ;
then PW_EXEC_FROM_DESKTOP="$(cat "${PORT_WINE_PATH}/${PW_YAD_SET//¬/" "}" | grep Exec | head -n 1 | sed 's|flatpak run com.castrofidel.portproton|\"${PORT_SCRIPTS_PATH}/start.sh\"|' | awk -F'=' '{print $2}')"
else PW_EXEC_FROM_DESKTOP="$(cat "${PORT_WINE_PATH}/${PW_YAD_SET//¬/" "}" | grep Exec | head -n 1 | awk -F"=env " '{print $2}')"
fi
print_info "Restarting PP after choose desktop file..."
# stop_portwine
/usr/bin/env bash -c "${PW_EXEC_FROM_DESKTOP}" &
exit 0
exit 0
}
export -f run_desktop_b_click
......
......@@ -655,7 +655,7 @@ portwine_create_shortcut () {
echo "[Desktop Entry]" > "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Name=${name_desktop}" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
if [[ $(cat /etc/os-release | grep -i "flatpak" ) ]]
if [[ $(cat /etc/os-release | grep -i "flatpak") ]]
then echo "Exec="flatpak run com.castrofidel.portproton \"${portwine_exe}\" "" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
else echo "Exec=env "\"${PORT_SCRIPTS_PATH}/start.sh\" \"${portwine_exe}\" "" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
fi
......@@ -682,9 +682,9 @@ portwine_create_shortcut () {
echo "#!/usr/bin/env bash" > "${STEAM_SCRIPTS}/${name_desktop}.sh"
echo "export START_FROM_STEAM=1" >> "${STEAM_SCRIPTS}/${name_desktop}.sh"
echo "export LD_PRELOAD=" >> "${STEAM_SCRIPTS}/${name_desktop}.sh"
if [[ $(cat /etc/os-release | grep -i "flatpak" ) ]]
then echo "flatpak run com.castrofidel.portproton \"${portwine_exe}\" " >> "${STEAM_SCRIPTS}/${name_desktop}.sh"
else echo "\"${PORT_SCRIPTS_PATH}/start.sh\" \"${portwine_exe}\" " >> "${STEAM_SCRIPTS}/${name_desktop}.sh"
if [[ $(cat /etc/os-release | grep -i "flatpak") ]]
then echo "Exec="flatpak run com.castrofidel.portproton \"${portwine_exe}\" "" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
else echo "Exec=env "\"${PORT_SCRIPTS_PATH}/start.sh\" \"${portwine_exe}\" "" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
fi
chmod u+x "${STEAM_SCRIPTS}/${name_desktop}.sh"
"${PORT_SCRIPTS_PATH}/add_in_steam.sh"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment