tkashkin / GameHub

All your games in one place
https://tkashkin.github.io/projects/gamehub
GNU General Public License v3.0
2.23k stars 129 forks source link

Support EGS #538

Open Lucki opened 3 years ago

Lucki commented 3 years ago

This adds basic EGS support. Initial stuff works but it still needs stuff to do. Huge thanks to @derrod as this is coded along and working similar to Legendary.

Currently the whole download logic is in the installer which may not be ideal as we also have to do stuff on importing so I've hacked the current installer a bit to be able to do something there. If you have a better idea for this or any other part please poke me in the right direction.

preview

Obvious things that aren't working properly yet:

Fixes #295

tkashkin commented 3 years ago

Thanks. I can't try it right now (and I don't use EGS so I'll probably need an account to test it). I can at least try to answer your questions if you have them.

I am currently rewriting and extending GameSource and Game interfaces in order to decouple source-specific implementation details from the core code and allow to disable individual sources or implement them as plugins in the future.

We need to think about common functionality that can be abstracted (#540).

IGDB changed it's api to Twitch(wtf?) so IGDB-data is missing

I know about this, see #541.

I have to tweak my uncrustify.cfg

You can share it if you have something close to the current code style. It's a good idea to actually configure a style and follow it.

Malbeth81 commented 3 years ago

Why not just use https://github.com/derrod/legendary to manage EGS games?

Been using it for a while and it works great, just plugging the right commands in GameHub to list, install & run the game would be fairly easy...

kahveciderin commented 3 years ago

hey, i am trying to test this but unfortunately im getting some errors while compiling

../src/data/sources/epicgames/EpicGames.vala:775.4-775.33: error: Argument 1: Cannot convert from `int' to `unowned string'
                        foreach(var game_name in dlcs)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/data/sources/epicgames/EpicGame.vala:1055.4-1055.34: error: Argument 1: Cannot convert from `int' to `unowned string'
                        foreach(var entry in file_list)

any ideas?

kahveciderin commented 3 years ago

nevermind, updating valac solved those issues.

Fancy2209 commented 2 years ago

this is broken now thanks to epic

Gtk-Message: 15:17:17.893: Failed to load module "xapp-gtk3-module"
[DEBUG]  [Database.migrate] Latest db version: 12, current: 12
[WARN]   [FS.find_case_insensitive] Error opening directory '/home/paulo/.local/share/Steam': Ficheiro ou pasta inexistente
[WARN]   [FS.find_case_insensitive] Error opening directory '/home/paulo/.local/share/Steam': Ficheiro ou pasta inexistente
[DEBUG]  [Compat.init] wine: '/usr/bin/wine'; version: '6.0.1'
[DEBUG]  [Compat.init] wine: '/opt/wine-stable/bin/wine'; version: '6.0.1'
[INFO]   - GameHub
[INFO]       Version: 0.16.0-934c717-epic
[INFO]       Branch:  epic
[INFO]       Commit:  934c7178850e40da16799792de858c92936a85f8
[INFO]   - Environment
[INFO]       Distro:  Pop!_OS 21.04
[INFO]       DE:      pop:GNOME
[INFO]       GTK:     3.24.25
[INFO]       Themes:  Pop | Papirus
[WARN]   [FS.find_case_insensitive] Error opening directory '/home/paulo/.local/share/Steam': Ficheiro ou pasta inexistente
[WARN]   [FS.find_case_insensitive] Error opening directory '/home/paulo/.local/share/Steam': Ficheiro ou pasta inexistente
[FATAL]  game_hub_data_sources_epic_games_epic_games_real_is_authenticated: assertion 'json_node_get_node_type (_tmp0_) == JSON_NODE_OBJECT' failed
[FATAL]  game_hub_data_sources_epic_games_epic_games_real_can_authenticate_automatically: assertion 'json_node_get_node_type (_tmp0_) == JSON_NODE_OBJECT' failed
[DEBUG]  Name com.canonical.AppMenu.Registrar does not exist on the session bus
[WARN]   [FS.find_case_insensitive] Error opening directory '/home/paulo/.local/share/Steam': Ficheiro ou pasta inexistente
[WARN]   [FS.find_case_insensitive] Error opening directory '/home/paulo/.local/share/Steam': Ficheiro ou pasta inexistente
[FATAL]  game_hub_data_sources_epic_games_epic_games_real_is_authenticated: assertion 'json_node_get_node_type (_tmp0_) == JSON_NODE_OBJECT' failed
[FATAL]  game_hub_data_sources_epic_games_epic_games_real_can_authenticate_automatically: assertion 'json_node_get_node_type (_tmp0_) == JSON_NODE_OBJECT' failed
[FATAL]  game_hub_data_sources_epic_games_epic_games_real_is_authenticated: assertion 'json_node_get_node_type (_tmp0_) == JSON_NODE_OBJECT' failed
[FATAL]  game_hub_data_sources_epic_games_epic_games_real_is_authenticated: assertion 'json_node_get_node_type (_tmp0_) == JSON_NODE_OBJECT' failed
[FATAL]  game_hub_data_sources_epic_games_epic_games_real_can_authenticate_automatically: assertion 'json_node_get_node_type (_tmp0_) == JSON_NODE_OBJECT' failed
Gtk-Message: 15:17:20.601: Failed to load module "xapp-gtk3-module"
[WARN]   [FS.find_case_insensitive] Error opening directory '/home/paulo/.local/share/Steam': Ficheiro ou pasta inexistente
[WARN]   [FS.find_case_insensitive] Error opening directory '/home/paulo/.local/share/Steam': Ficheiro ou pasta inexistente
[FATAL]  game_hub_data_sources_epic_games_epic_games_real_is_authenticated: assertion 'json_node_get_node_type (_tmp0_) == JSON_NODE_OBJECT' failed
[FATAL]  game_hub_data_sources_epic_games_epic_games_real_can_authenticate_automatically: assertion 'json_node_get_node_type (_tmp0_) == JSON_NODE_OBJECT' failed
[DEBUG]  [Sources.EpicGames.LegendaryCore.with_sid] Getting xsrf
[DEBUG]  [Sources.EpicGames.LegendaryCore.with_sid] Status: 204
[DEBUG]  [Sources.EpicGames.LegendaryCore.with_sid] Getting exchange code
[DEBUG]  [Sources.EpicGames.LegendaryCore.with_sid] Status: 400
**
ERROR:../../src/data/sources/epicgames/EpicGames.vala:514:game_hub_data_sources_epic_games_epic_games_authenticate_with_sid: assertion failed: (status == 200)
Bail out! ERROR:../../src/data/sources/epicgames/EpicGames.vala:514:game_hub_data_sources_epic_games_epic_games_authenticate_with_sid: assertion failed: (status == 200)
Abortado (núcleo despejado)
Fancy2209 commented 2 years ago

if the legendary implementation is updated it should work since it was fixed