1
0
Fork 0
mirror of synced 2024-06-17 18:14:44 +12:00
Commit graph

93 commits

Author SHA1 Message Date
loathingKernel 8dbce8e9f2
Rare: rename icon function to qta_icon 2024-02-21 13:30:41 +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 0fb1526d67 MoveDialog: Refactor MovePopup into a dialog using ActionDialog as base 2024-01-02 23:11:47 +02:00
loathingKernel 534c45818a GameInfo: Update button description strings and icons 2024-01-02 15:34:35 +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 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 6e7ea3181e
GameInfo: Add tags groupbox 2023-12-10 14:21:38 +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 e4782b70ae
GameInfo: Add button icons 2023-11-28 16:38:02 +02:00
loathingKernel eb48a506d2
GameInfo: Add 'Modify Game' button to adjust selective downloads 2023-11-28 16:38:00 +02:00
loathingKernel 4a96224dd3
GameInfo: Enable Import Game button, redirects to Import Game tab 2023-05-03 17:27:36 +03:00
loathingKernel 1c6a05c3f1
Refactor: Import ImageSize from widgets or directly from models 2023-05-03 17:27:36 +03:00
loathingKernel 42b9f581f6
GameInfo: Use QFormLayout instead of QGridLayout for the information
Also partition the space to left and right layouts, left layout being the
image and the space below it (pending future usage), and right the
information.
2023-03-30 12:50:42 +03:00
loathingKernel c3231d9e17
Use object instead of ctypes.c_uint64 for signals that carry large ints 2023-03-16 14:04:12 +02:00
Stelios Tsampas 07c64b8b9b GameInfo: Fix enablement check 2023-03-15 18:07:20 +02:00
loathingKernel c6a9460044
GameInfo: Fix missin format() argument 2023-03-13 13:18:12 +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 92346e11d0
OriginWineWorker: Execute during launch and properly resolve paths for Wine 2023-03-07 23:43:42 +02:00
lennard d399382afd
Fix origin stuff on windows
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-07 17:11:23 +02:00
lennard 1ac1fd89f8
Show install path for origin games in game info
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-07 17:11:22 +02:00
loathingKernel e55c40448c
Misc: rename get_size to format_size 2023-03-06 00:39:23 +02:00
loathingKernel 46664f3577 Fix a few minor errors 2023-03-02 01:05:53 +02:00
loathingKernel 5ba368a5bf SideTabContainer: Use a signal to update the title instead of monkeypatching setTitle method into the widget
Widgets that need to implement a title should be of a dual subclass
of any `QWidget` subclass and the `SideTabContents` class which provides
the signal.
2023-02-21 15:27:52 +02:00
loathingKernel 6c0663771c GameInfo: Make widgets react to changes from RareGame's widget.update signal
Note: the `__update_widget()` method, while it doesn't have any visible delay
has the potential for improvement. I didn't do it because it felt like
premature optimization.

MoveGamePopUp: update it to use RareGame and it's signals

RareGame: Add `install_path` attribute and change `needs_verification` setter
Now both setters will update the local `igame` attribute and save it too.

MoveWorker: Update it to use RareGame.
Other changes include moving "same-drive" moving into the worker and using
`os.path` methods instead of `PathLib`

SteamGrades: Remove worker, it is implemented in RareGame now.
2023-02-15 16:59:33 +02:00
loathingKernel 6b3a841378 Refine QueueWorker and implement worker_info for VerifyWorker and MoveWorker 2023-02-04 17:38:07 +02:00
loathingKernel 6800b7e9ab Workers: Implement wrapper QueueWorker class prototype for queueable workers
RareCore: Impelement base worker queue
2023-02-04 17:38:07 +02:00
loathingKernel 28e68cad97 MoveWorker: Move worker into rare/shared/workers 2023-02-04 17:38:07 +02:00
loathingKernel 304ad0388e GameDlc: Re-write the form to use a QToolBox instead of two separate QGroupBoxes.
By using a QToolBox, we can better utilize the available space for
long lists of DLCs. `GameDlcWidget` is now responsible for handling
installing and uninstalling the DLC based on RareGame's functionality.

Since `GameUtils` is not used for uninstalling any more, remove it the
arguments of `GameInfoTabs` completely.
2023-02-04 17:38:07 +02:00
loathingKernel 1959516b3f GameWidget: Toggle buttons on widget update
ElidedLabel: Use `sizeHint()` for width

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:07 +02:00
loathingKernel fc7e45a43a UninstallDialog: Implement it to work similarly to InstallDialog
Similarly to the installation procedure, when an uninstall is
requested, an `UninstallOptionsModel` is emitted by the `RareGame`.
`DownloadsTab` handles the signal and spawns the `UninstallDialog`.
After the `UninstallDialog` is closed, a worker thread handles
uninstalling the application to avoid UI lock-ups when a large
number of files is deleted.

Allows for uninstall actions to be spawned from anything having
access to the `RareGame` instance.

LaunchDialog: Don't check health on DLCs, they always will require
verification if they don't specify an executable.

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:07 +02:00
loathingKernel b02483eb80 GameInfo: Refactor the move game stack to re-use the existing widgets
instead of adding them again to the layout. Move game should still
switch to RareGame, similar to the way it works for verifing.

Also add non-functional "Import Game" button
2023-02-04 17:38:07 +02:00
loathingKernel 56876227dd GameInfo: Move uninstall_game from GameUtils to GameInfo
When `Uninstall` is used from the widgets, it will take the user to
the `GameInfo` page similar to how `Install` works.

`GameInfo` is not connected to the `RareGame` instance's `installed`
and `uninstalled` signals to refresh the contents of the page based
on the related functionality.
2023-02-04 17:38:07 +02:00
loathingKernel 4063195b4d DownloadsTab: Refactor downloads tab
When updates are queued, they are removed from the update's list. An exceptions is made
when the queued item comes from repairing (without updating), in which case the update is
disabled for the runtime.

A queued item can be either removed (if it is an update it will be added back to the
updates groups) or forced to be updated now. If a queued item is forced, the currently
running item will be added to the front of the queue. Downloads will be queued if
there is no active download but there is a queue already.

The download thread is now responsible for emitting the progress to `RareGame`

InstallDialog: Pass `RareGame` and `InstallOptionsModel` only as arguments.
The `update`, `repair` and `silent` arguments are already part of `InstallOptionsModel`
`RareGame` is used to query information about the game.

InstallInfoWorker: Pass only `InstallOptionsModel` as argument
Emit `InstallQueueItemModel` as result, to re-use the worker when queuing stopped games

RareGame: Query and store metadata property about entitlement grant date
RareGame: Add `RareEosOverlay` class that imitates `RareGame` to handle the overlay

LibraryWidgetController: Remove dead signal routing code, these signals are handled by `RareGame`
Directly parent library widgets instead of reparenting them

GameWidgets: Remove unused signals

EOSGroup: Set install location based on preferences and use EOSOverlayApp from legendary

GamesTab: Connect the `progress` signals of dlcs to the base game's signals
GamesTab: Remove dead code

GlobalSignals: Remove `ProgresSignals`

RareCore: Mangle internal signleton's names

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:07 +02:00
loathingKernel 79bae4374d GameInfo: Transition to RareGame
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
loathingKernel db0724fba0 GameInfo: Use RareGame to keep the VerifyWorker running on a game and connect progress to the widget.
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
loathingKernel ab596139af RareCore: Add RareGames to a data structure in RareCore
This merges a few of the internal features of RareCore such us
RareGame filtering and thus game grouping based on attributes.

This is required to properly connect a single signal from RareCore to
the downloads tab for game installation. This also includes filtering
games based on updates and other attributes.

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
loathingKernel b73fc328d2 GameInfo: Use ui member instead of double inheritance for the UI module
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
loathingKernel 7b6a3e181a Shared: Move GameUtils and CloudSaveUtils into rare.shared
Removed `rare.utils.legendary_utils`, the `uninstall_game` function
was moved to `rare.shared.game_utils` for now

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
loathingKernel 96b80bc423 Library: Introduce new tile design from refactor_backend
Currently broken but Rare starts

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
loathingKernel 6eb4e19807 GameInfo: Adapt tab to handle uninstalled games too
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
loathingKernel d7a5404517 VerifyWorker: Move to rare/shared/workers
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
Stelios Tsampas 53cab3ecb9 GameInfo: Add missing space 2022-10-19 17:53:37 +03:00
lennard 24774b07c0
Fix move game on Windows 2022-09-27 21:09:41 +02:00
Stelios Tsampas 7a1935335e GameInfo: Work-around slowdown on widget update_game() request 2022-09-10 19:04:40 +03:00
loathingKernel 1ebd0b18d8 Introduce a very basic RareCore to handle signletons and their cleanup. 2022-09-04 20:39:03 +03:00
Dummerle cb3f316bf0
Fix proton visibility on Windows 2022-08-27 12:47:17 +02:00