Commit e46ebfb2 authored by Boria138's avatar Boria138

Rewrite create shortcut for work with flatpak

parent a672741c
......@@ -655,7 +655,10 @@ portwine_create_shortcut () {
echo "[Desktop Entry]" > "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Name=${name_desktop}" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Exec=env "\"${PORT_SCRIPTS_PATH}/start.sh\" \"${portwine_exe}\" "" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
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
echo "Type=Application" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Categories=Game" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "StartupNotify=true" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
......@@ -679,7 +682,10 @@ 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"
echo "\"${PORT_SCRIPTS_PATH}/start.sh\" \"${portwine_exe}\" " >> "${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"
fi
chmod u+x "${STEAM_SCRIPTS}/${name_desktop}.sh"
"${PORT_SCRIPTS_PATH}/add_in_steam.sh"
if [[ "${PW_SKIP_RESTART_STEAM}" != 1 ]] && pgrep -i steam &>/dev/null ; then
......
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