1
0
Fork 0
mirror of synced 2024-05-19 12:02:54 +12:00
Commit graph

137 commits

Author SHA1 Message Date
loathingKernel 6594d65be1 RareGame: Improve launch message 2024-05-17 23:50:02 +03:00
loathingKernel 07fa7890cf RareGame: Update protondb grade every 3 days even if it already exists. 2024-05-16 13:18:05 +03:00
loathingKernel 582b83c12b WIP 2024-02-12 21:52:08 +02:00
loathingKernel 4f4689e82b RareSettings: Add global options for style sheets and color schemes
* Add an option to select the library view mode.
  This will allow us to instantiate only one library view at startup,
  reducing time and complexity of the process.
2024-02-12 21:52:08 +02:00
loathingKernel 284543a6d9 Rare: Decouple Rare's locale from legendary's
* Instead of using legendary's locale as fallback, use system't locale
as default.
* Do not hardcode language names and countries but use QLocale on
the translation filenames.
2024-02-12 21:52:08 +02:00
loathingKernel 17066f9a67 Rare: cherry-pick some of sourcery suggestions 2024-02-12 21:52:07 +02:00
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 4e6008a8f7 TrayIcon: Generic notifications
* Add a notification when starting a download too
2024-01-19 17:17:31 +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 a246f4ee16 EosGroup: Remake the UI and integrate with Rare's facilities
* Uninstalling the Overlay now goes through the same procedure as
uninstalling any other game.

* The available prefixes are now listed instead of hiding them inside
a combo box.

* Each listing works indepedently to enable/disable the Overlay for the prefix
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 4e2ffaae93 ImageSize: Use pixel ratio 1 for image downloads 2024-01-18 16:43:42 +02:00
loathingKernel 0fb1526d67 MoveDialog: Refactor MovePopup into a dialog using ActionDialog as base 2024-01-02 23:11:47 +02:00
loathingKernel 80ac9296fc Rare: cherry-pick some sourcery suggestions 2024-01-02 17:57:02 +02:00
loathingKernel 2cbe6cadd9 Rare: Add launchable addons as games in the library 2024-01-02 11:12:00 +02:00
loathingKernel 6e1a7cdbaf Merge branch 'sdl_dialog' into next 2023-12-31 18:44:41 +02:00
loathingKernel e2bdbbab40 RareGame: Use Game property instead of looking into metadata 2023-12-31 17:59:36 +02:00
loathingKernel 1914beb5e6 RareGameBase: Also look for the EA app when identifying origin games 2023-12-31 17:59:24 +02:00
loathingKernel e421d02a4f Update SDL dialog 2023-12-26 00:05:11 +02:00
loathingKernel 62e19a8be2 VerifyGame: Present a dialog to select selective downloads in the game
supports them.
2023-12-25 23:56:37 +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 1139765343
ImageSize: Make Library images slightly larger to accommodate more text on macOS 2023-12-16 13:52:37 +02:00
loathingKernel 51337116d5
RareGameBase: use default platform for version 2023-12-15 17:25:09 +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 687218d29b
RareGame: Return values only from Game for app_name and app_title
With launchable DLCs we will need to replace the InstalledGame in the
DLC with the InstalledGame from the base game so depend these properties
solely on the Game attribute. Furthermore, since we do not need backwards
compatibility any more, remove the `title` property and rename its uses
to use `app_title`
2023-12-14 23:08:29 +02:00
loathingKernel dfa12a0138
IconGameWidget: Make icons slightly smaller by using the Library preset
Previously the Display and Library presets were equal. Make the
icons smaller by making the Library preset ~75% of the Display.preset
2023-12-14 13:57:22 +02:00
loathingKernel fa5294b1d5
Lgndr: Replace the monkey functions with factories to create them
The factories are also usable in Rare's code to create compatible
functions for the callbacks. If they there is no callback they just
log what is happening. It also removes the need for `typing-extentions`
module.
2023-12-10 22:43:31 +02:00
Stelios Tsampas 7824fa20a8
InstallDialog: Always show prerequisites if they exist
* Do not depend the relevant InstallOptionsModel option to on the running platform
2023-12-10 14:22:27 +02:00
loathingKernel bdbb61d3a6
Rare: Move the different applications into their respective folders 2023-12-10 14:21:36 +02:00
loathingKernel b60062d455
Code: Use vars() instead of directly accessing __dict__ 2023-12-07 19:40:16 +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 f2c575e082
InstallDialog: Expose platforms in RareGame and use it
to populate the combobox
2023-11-28 16:38:02 +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 497bdc08cc
Downloads: Remove UNINSTALLING state on cancel 2023-05-29 15:49:52 +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
loathingKernel 0e4e7420cf
Refactor: Move ImageSize to models
`ImageSize` is a property of `ImageWidget` it is relevant to
`ImageManager` and the store widgets. So move it out of `ImageManager`.
2023-05-03 17:27:35 +03:00