Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support EGS #538

Draft
wants to merge 22 commits into
base: refactoring
Choose a base branch
from
Draft

Support EGS #538

wants to merge 22 commits into from

Conversation

Lucki
Copy link
Contributor

@Lucki Lucki commented Mar 19, 2021

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.

Unbenannt.mp4

Obvious things that aren't working properly yet:

  • There's no way to update besides re-importing
  • The download status isn't updating or responding to user interaction
  • No way to select the language
  • Incomplete DLC handling
  • Chunks are currently permanently cached in the cache folder for testing purposes
  • No parallel downloading of chunks
  • Files are currently written at the end of the download process which makes the whole process taking twice the space
  • No store information data
  • The manifest is loaded and scanned just for the expected install size - try to replace this with store data
    Store data is completely custom in this regard and unreliable for this purpose
  • No time tracking
  • IGDB changed it's api to Twitch(wtf?) so IGDB-data is missing
  • I have to tweak my uncrustify.cfg…
  • Logging in with an external service (e.g. google) may result in them saying we're untrusted (untested)
  • Importing skips the initial compat dialog
  • Importing skips downloading chunks despite correctly analyzing them before.
  • Properly handle token revokations and api hickups
  • Sometimes manifests aren't proper utf8, maybe download errors?

Fixes #295

@tkashkin
Copy link
Owner

tkashkin commented Mar 20, 2021

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.

@dotevo dotevo mentioned this pull request Apr 22, 2021
9 tasks
@Malbeth81
Copy link

Malbeth81 commented Jun 5, 2021

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
Copy link

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
Copy link

nevermind, updating valac solved those issues.

@Fancy2209
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants