1
0
Fork 0
mirror of synced 2024-06-03 03:04:42 +12:00
Commit graph

87 commits

Author SHA1 Message Date
loathingKernel cd1743cb92 GameSettings: Re-strucure settings widgets
The default widgets only implement the settings for the `default` "app_name"
The game specific widgets sub-class the default widgets and implement
whatever they additionally need locally.

Remove multiple calls to save config and save when the game settings gets hidden.
2024-02-12 21:52:07 +02:00
loathingKernel af6d7c5055 Various WIP
* Use `vars()` instead of directly accessing `__dict__`
* Remove `auto_update` from RareGame's metadata
* Correct check for updating the Steam App ID (We want to keep any changes from the user)
* Collect both Wine and Proton prefixes when removing overlay registry keys.
* Add few convenience functions in config_helper and paths.
2024-02-12 21:52:07 +02:00
loathingKernel 7a5bb0b732 RareGame: Use None for unset steam appid. 2024-02-12 21:52:07 +02:00
loathingKernel 36ad33b8f3 SteamGrades: Return the Steam game ID with the grade and store it.
This allows compatibility tools that use the SteamAppId environment
variable to make decisions or apply fixes do their job more accurately.

Also use the stored variable to provide a link to protondb through
the grade label in GameInfo.

The steam grades now use the orjson library to load Steam's ~6MB
database faster.
2024-02-12 21:52:07 +02:00
loathingKernel f321736dde GameInfo: Show cover image in color despite installation status 2024-01-29 16:21:19 +02:00
loathingKernel ce0b9788ee RareGame: Clear pixmap cache before loading a new pixmap 2024-01-21 23:44:11 +02:00
loathingKernel 3c01cfc0a8 EosOverlay: Fix a few remaining issues
* Don't create path when preparing overlay download, it fails on updates.
* Concatenate the overlay install path in InstallDialog instead of passing it as `base_path`
* Respect RareGame state in in the EOS overlay form
2024-01-19 14:54:09 +02:00
loathingKernel a605bddffa RareGame: Move sdl_name to RareGameBase
InstallDialog uses that property so RareEosOverlay should have it too.
Also calculate the base_path for the overlay case instead of passing it as
argument
2024-01-19 12:09:57 +02:00
loathingKernel acbe8836cc RareEosOverlay: Protect against invalid prefixes 2024-01-19 00:57:17 +02:00
loathingKernel 889a7cd116 RareGame: Use the callable directly instead of a lambda
to create workers.
2024-01-19 00:57:17 +02:00
loathingKernel 89486f882e EOSGroup: Add the option to select which overlay installation to enable 2024-01-19 00:57:16 +02:00
loathingKernel 2a0f80a9f0 RareGame: RareEosOverlay now implements its procedures internally.
The new methods are the following
* `has_update`: to check for updates
* `is_enabled`: checks if the overlay is enabled (on wine platform, on prefix)
* `enable`: enables the overlay (on wine platforms, on prefix, for app_name)
* `disable`: disables the overlay (on wine platforms, on prefix, for app_name)
* `install`: Install using Rare's existing facilities
* `uninstall`: Uninstall using Rare's existing facilities
2024-01-19 00:57:16 +02:00
loathingKernel 2cbe6cadd9 Rare: Add launchable addons as games in the library 2024-01-02 11:12:00 +02:00
loathingKernel e2bdbbab40 RareGame: Use Game property instead of looking into metadata 2023-12-31 17:59:36 +02:00
loathingKernel 5f5e471169
RareGameBase: Add default_platform property
This property reports the default platform to use for a game based
on legendary's configuration and if they platform is available in the
game's assets.

Using that property we can make better choices on what platform to operate
on without user intervention. Currently we use it to infer the platform
in when installing, importing, and calculating game versions.
2023-12-16 14:02:53 +02:00
loathingKernel 1677ea762c
FetchWorker: Fix issue with missing MacOS assets on MacOS
Using `LegendaryCore.get_game_and_dlc_list` with platform `Windows`
updated the assets only for the `Windows` builds of the games missing
`Win32` and `MacOS` assets on clean installs. This caused Rare to not
include MacOS install options on MacOS (duh!). This might also have been
the cause that users were unable to launch games, since they where only
offered the `Windows` build of the games (big duh!).

To fix this, fetch the assets for `Win32` and `MacOS` games before getting
the final list of games and dlcs based on the `Windows` platform.

In this regard, also re-use the existing options for getting metadata to
give the option to the user to include them when updating assets. Also add
an option to include Unreal engine assets which until now were fetched
unconditionally.

* Include Unreal: When the user option is `true` or debugging.
  Defaults to `false`
* Update Win32: When the user option is `true` or debugging.
  Defaults to `false`
* Update MacOS: Force on MacOS, when the option is `true` or debugging on
  other platforms. Defaults to `true` on MacOS and is disabled,
  `false` on others

Furthermore, respect legendary's `default_platform` config option and
set it in the config on new configurations. The new method in our
LegendaryCore monkey allows us to use that option in RareGame when doing
version checks on not installed games, and not defaulting to `Windows`.

Finally, set `install_platform_fallback` to false in a new config to
avoid unwanted side-effects.
2023-12-15 16:57:32 +02:00
loathingKernel bdbb61d3a6
Rare: Move the different applications into their respective folders 2023-12-10 14:21:36 +02:00
loathingKernel c56e7ce82c
RareGame: Moved some properties and methods to RareGameBase
These properties or methods were moved to RareGameBase
* `version`: For RareEosOverlay and maybe RareGameSlim
* `is_origin`: For RareGameSlim
* `install_path`: A partial Origin-unaware version
* `is_mac/is_win32`: For completeness

New methods
* `is_overlay`: For the download manager

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-12-03 11:21:52 +02:00
loathingKernel 43766c82a4
GameInfo: Enable Modify button only when the game has SDLs
Add icons to the DLC install/uninstall buttons
2023-11-28 16:38:02 +02:00
loathingKernel 49fdd410ce
Housekeeping: Remove some print remnants 2023-11-28 16:38:01 +02:00
loathingKernel eb48a506d2
GameInfo: Add 'Modify Game' button to adjust selective downloads 2023-11-28 16:38:00 +02:00
loathingKernel adaf90f0a8
RareGame/RareCore: Add add_dlc method to connect a dlc with the main game
Move validation after the DLCs have been added so the can be uninstalled
too if the game can't be found.
2023-11-28 16:37:59 +02:00
loathingKernel 605a5050af
RareGame: Make owned_dlcs a set
By making the attribute into a set, we avoid adding already existing dlcs
back into it when refreshing the library. Fixes duplicated entries in
the DLC page.
2023-05-29 16:40:45 +03:00
loathingKernel eaed611c5f
GameDlcWidget: Respond to update signal
Using the update signal we can enable and disable the install/uninstall
button by querying the state of the RareGame
2023-05-29 14:32:30 +03:00
Stelios Tsampas 23c2f6dc0a RareGame: Return app_title as folder name if FolderName is not in customAttributes
Fortnite specifically doesn't provide `FolderName` in `customAttributes`, meaning we can't create the shortcut. If the attribute is not provided, assume that it is safe to use the application title.

Fixes: #283
2023-05-04 17:45:51 +03:00
lennard 672bc814ba Fix import game 2023-05-03 12:32:12 +02:00
lennard f1fa0ada1a Open cloud save dialog after playing a game, if no action set on start 2023-04-08 01:03:14 +02:00
Dummerle 3f17a69e65
Merge pull request #272 from loathingKernel/fixups
Show environment variables from the "default" section in per-game settings.
2023-04-07 19:37:56 +02:00
loathingKernel fee96a5f9d
[RareGame] Apply state if the game is found to be running at startup 2023-04-06 23:41:23 +03:00
lennard 0186b4f3c4
Add documentation for is_non_asset
{'Windows': GameAsset(app_name='', asset_id='', build_version='', catalog_item_id='', label_name='', namespace='', metadata={})}
2023-04-05 13:32:35 +02:00
lennard 3ec6a45cc3 Add double check for game assets and fix error in cloud save dialog 2023-04-05 13:09:34 +02:00
loathingKernel 459828f1de
RareGame: Initialize steam_date and last_played to datetime.min
Due to some metadata corruption, metadata now gets locked before
being accessed
2023-03-31 14:02:01 +03:00
loathingKernel 8e6503758c
RareGame: Store steam grade and its fetch date in metadata 2023-03-29 18:02:48 +03:00
loathingKernel a768bce996
RareGame: export .egstore only after installing and successful verification 2023-03-16 18:07:33 +02:00
loathingKernel 3236a4090c
RareGame: don't delete .egstore if the game is a DLC
VerifyWorker: use RareGame property to apply the verification check
to any DLCs
2023-03-15 21:20:52 +02:00
Stelios Tsampas 2ebc12b1f5 LgdnrCore: Add egstore_write and egstore_delete methods
`egl_unintall` and `egl_export` try to access EGL's programdata folder which raises an exception if the folder doesn't exist (Windows) or it isn't specified (Linux). Copy the relevant bits from LegendaryCore to LgndrCore and create two new methods that only manipulate the `.egstore` folder.
2023-03-15 17:59:33 +02:00
loathingKernel b7d499f3e1
RareGame: Add is_ubisoft property 2023-03-13 14:39:14 +02:00
loathingKernel a7b85500f2
RareGame: Clean and export .egstore after updating igame
When importing a game, the first thing being checked for import information
is `<install_dir>/.egstore`. Due to erroneous handling, that directory can
contain multiples of `.mancpn` and `.manifest` files. This could lead to
importing an older version as legendary expects only one pair of these
files to exist in that directory.

The `.egstore` folder is normally updated/created as part of synchronizing
with EGL. To aid with importing games in the future, we always export this
data for Rare to be able to import games between different OSes
2023-03-13 12:29:04 +02:00
loathingKernel a6b10a6ec4
RareGame: Don't emit widget.update in set_installed
`set_pixmap()` handles emitting `widget.update`
2023-03-12 18:57:30 +02:00
loathingKernel 801294b1ea
RareCore: Resolve grant date from entitlements at post init 2023-03-12 14:43:54 +02:00
loathingKernel 4e1248a18a
RareCore: Move OriginWineWorker execution in load_pixamps()
We don't need to know if Origin is installed before launching the window,
so we can save on startup time by executing the worker after the window
has become visible.
2023-03-12 01:11:27 +02:00
loathingKernel fc015a4d30
RareGame: Update saves when a game exits 2023-03-11 01:32:04 +02:00
loathingKernel 8a1dd6c948
RareCore: Sync back the results from OriginWineResolver into the main thread 2023-03-10 21:28:37 +02:00
loathingKernel 81ec9bf772
RareCore: Fetch **ALL** saves during launch
To save time and requests, bulk get saves for all games and
load them into each respective RareGame.

Co-authored-by: Dummerle <44114474+dummerle@users.noreply.github.com>
2023-03-10 17:01:00 +02:00
loathingKernel 3adabda1ba
ImageManager: Add OfferImageTall to the set of image types to look for
Seems like Epic are changing their API again, and some image types have been renamed. This made the list of updates to be empty after filtering it for image types we could handle. This also had the side effect of an infinite recursion when downloading images, as the resulting pixmap would be null.

To fix this situation, the new image type has been added, and the image loading in RareGame has become two methods, one for loading and one for setting it.

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-10 10:35:31 +02:00
lennard 63e4223a96
Move slim RareGame to different file, to avoid circular import
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-08 22:14:19 +02:00
lennard 4ec1f39109
Update cloud widget, when state changed
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-08 21:22:38 +02:00
lennard 70960c73c4
Some ui improvements for cloud saves
- Show text on widget if save is not up-to-date
- Fix text in game info -> cloud saves

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-08 18:54:27 +02:00
lennard 189167f4f7
Add upload and download function to RareGame
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-08 18:34:26 +02:00
lennard a66600efa3
Move cloud save ui to a new tab in game_info
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-08 17:46:26 +02:00