Commit 534b79c3 authored by Vladislav's avatar Vladislav

Added flatpak support

parent 891da8b2
...@@ -132,7 +132,8 @@ class App(QtCore.QObject): ...@@ -132,7 +132,8 @@ class App(QtCore.QObject):
# Ignore extra non-related desktop entries # Ignore extra non-related desktop entries
if (len(entry_exec_split) <= 1 or if (len(entry_exec_split) <= 1 or
('data/scripts/start.sh' not in entry_exec_split[1] or '%F' in entry_exec_split[-1])): ('data/scripts/start.sh' not in entry_exec_split[1] or '%F' in entry_exec_split[-1]) and
('flatpak' not in entry_exec_split[0] or 'ru.linux_gaming.PortProton' in entry_exec_split[-1])):
continue continue
# TODO parse product name # TODO parse product name
...@@ -140,7 +141,10 @@ class App(QtCore.QObject): ...@@ -140,7 +141,10 @@ class App(QtCore.QObject):
entry_icon = (os.path.isfile(entry_icon) and entry_icon) or '' entry_icon = (os.path.isfile(entry_icon) and entry_icon) or ''
# Remove extra env in the beginning # Remove extra env in the beginning
entry_exec = f"env START_FROM_STEAM=1 {entry_exec[4:len(entry_exec)]}" if ('data/scripts/start.sh' in entry_exec_split[1]):
entry_exec = f"env START_FROM_STEAM=1 {entry_exec[4:len(entry_exec)]}"
elif ('flatpak' in entry_exec_split[0]):
entry_exec = f"flatpak run --env=START_FROM_STEAM=1 {entry_exec[12:len(entry_exec)]}"
self.portproton_games_model.add_game(GameEntry(name=entry_name, icon=entry_icon, exec=entry_exec)) self.portproton_games_model.add_game(GameEntry(name=entry_name, icon=entry_icon, exec=entry_exec))
except: except:
......
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