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

59 commits

Author SHA1 Message Date
loathingKernel ef1dd2e0fe WineResolver: Quote game titles for visibility 2024-05-25 09:21:18 +03:00
loathingKernel 3b721fdd13 WinePathResolver: Disable pylint check (possibly-used-before-assignment) 2024-05-16 19:29:14 +03:00
loathingKernel d16b3d5d68
Runners: rename proton to steam 2024-02-18 12:50:35 +02:00
loathingKernel 582b83c12b WIP 2024-02-12 21:52:08 +02:00
loathingKernel 6be9eec3ef Rare: Offline mode kinda works again 2024-02-12 21:52:08 +02:00
loathingKernel 3313f15c9f WineResolver: Fix proton command invocation 2024-02-12 21:52:08 +02:00
loathingKernel 8bde2c2c6d Rare: Import platform specific modules only on the relevant platforms 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 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 7ae06ff5d8 RareCore: Move entitlements request into an independent worker
Yes, we are back at this. Entitlements are important to have early
as Ubisoft redemption requires them, and they don't depend on anything
else.

* Move config helper initialization into RareCore to make it available
earlier.
2024-01-19 01:28:10 +02:00
loathingKernel 89486f882e EOSGroup: Add the option to select which overlay installation to enable 2024-01-19 00:57:16 +02:00
loathingKernel 3c43da1594 RareCore: Add options to exclude non-asset games and entitlements from startup
* Add options in settings to not request non-asset games and entitlements.

This greatly improves startup time but reduces functionality a bit. Both
options are disabled by default.

* Remove the old options to exclude Win32 and Mac games as they were no longer relevant.

* Add a performance context manager to log execution time when used.

* Fixed an issue with UbisoftGroup where multiple threads would spawn.
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 097b76fc6b
FetchWorker: Update strings MacOS -> macOS 2023-12-15 23:30:13 +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 0503cb1bb4
VerifyWorker: Use verify_stdout factory instead of direct assignment 2023-12-10 22:44:59 +02:00
loathingKernel 90f55287c0
WineResolver: Fix typo 2023-12-10 14:22:28 +02:00
loathingKernel ba65ffa905
Wine,WineResolver: Add more logging 2023-12-10 14:21:37 +02:00
loathingKernel 9a941e3001
Wine: Set environment through flatpak-spawn arguments
Partially fixes #305
2023-12-10 14:21:37 +02:00
loathingKernel 9aae822295
Lgndr: Import legendary changes 2023-12-01 13:21:44 +02:00
loathingKernel 5307932656
RareCore: Replace individual fetch workers with a single one.
The workers where co-dependent anyways as the non-asset worker
was started after the games worker had sent back its results.
By combining them we can move any data manipulations to the worker
and simplify the handling in RareCore.
2023-05-29 16:40:36 +03:00
loathingKernel 5ce9a2edfa RareCore: Handle exception when fetching non-asset games
https://discord.com/channels/826881530310819914/884510635642216499/1111321692703305729
There is a tab character in the appId of Fallout New Vegas: Honest Hearts DLC, this breaks metadata storage
on Windows as they can't handle tabs at the end of the filename (?)
Legendary and Heroic are also affected, but it completed breaks Rare, so dodge it for now pending a fix.
2023-05-26 19:11:58 +02:00
loathingKernel c3231d9e17
Use object instead of ctypes.c_uint64 for signals that carry large ints 2023-03-16 14:04:12 +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
loathingKernel c10bd59384
RareCore: Move installation validation into the post init phase
Specifically move it just before loading each game's pixmap. We need
the information set by `__validate_installed` to know which pixmap to
load
2023-03-12 18:59:58 +02:00
loathingKernel 16400da020
Clean-up 2023-03-12 13:19:24 +02:00
loathingKernel f46dc2209d
RareCore: Move save game fetching into __post_init
Saves is another thing we can fetch later and interact to them becoming
available.
2023-03-12 13:09:09 +02:00
loathingKernel 85998023f0
RareCore: Add asynchronous loading in RareCore for origin and entitlements
Speeds up startup by moving non-essential information loading into a
worker that executes some time after the launch dialog has finished.
2023-03-12 12:44:43 +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 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 f6189772d0
WineResolver: Move common wine operations to rare/utils/wine
`rare.utils.misc.get_raw_save_path` has been removed in favor of the
equivalent `RareGame` property.
2023-03-10 17:00:55 +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 efc07e4645
Add install size for origin games and move it to thread on windows
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-07 17:11:23 +02:00
lennard 32de2c21a1
Move registry reader for origin games to a worker
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-07 17:11:22 +02:00
loathingKernel 91a7247573
RareCore: Remove Win32Worker and MacOSWorker
They weren't required as the asset information are already fetched in
`GamesWorker`. They were a remnants of `ApiResults`.
2023-03-07 17:11:21 +02:00
loathingKernel 5748d0e6ee
RareCore: Manage initialization in RareCore instead of LaunchDialog
This is the last change of the `backend_refactor` branch. This makes
`RareCore` the centerpiece of Rare by moving initialization before the UI
is brought up. RareCore is now in control of creating and querying `RareGame`
objects, re-introducing the ability (incomplete) to refresh the games library.
As a result, ApiResults has been removed.

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-07 17:11:21 +02:00
loathingKernel 9d4e0995fd
RareAppException: Create exception handler that can show a dialog
The reason is that `sys.excepthook` is a global attribute which we
have to unset for threads because we show a Qt dialog in it and we
can't do that from threads. Before this change, we used to unset
it in threads, but since it is a global attr, that was unsetting it
for the whole application. We cannot reliably reset it because we
can have multiple threads executing and there will be race conditions.

To fix this situation, `RareAppException` implements a callback to
be patched into `sys.excepthook` which emits a signal to be serviced
by the the `RareAppException` instance in the main thread.
`RareAppException` can be subclassed to implement the
`RareAppException._handler` method for domain specific handling.

The `RareApp` base class instantiates its own `RareAppException`
instance for early basic handling. `RareAppException` is subclassed
into `RareException` and `RareLauncherExcpetion` in `Rare` and `RareLauncher`
respectively to implement the aforemention domain specific handling.
Each of these classes deletes the previous instance and replace it
with their specialized handlers.
2023-03-07 17:11:21 +02:00
loathingKernel e40cfaafac MainWindow: Implement worker queue in status bar
The active workers are placed in a static container on the left side.
The queued workers are placed in a scrollarea on the right side of the
status bar. The scrollbars are disabled but dragging works.

Exiting with active workers will pop up a message for confirmation. Rare
will clean the queued workers but the active ones will be waited on until
they finish.
2023-02-16 10:52:13 +02:00
loathingKernel 6e4081177d VerifyWorker: Remove unused imports 2023-02-15 19:49:04 +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 97adb6e1c2 UninstallWorker: Use new shortcut functions to delete shortcuts in uninstall_game 2023-02-08 01:50:00 +02:00
loathingKernel 09b909cc32 MoveWorker: Fix Undefined variable 'logger' 2023-02-04 17:38:07 +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 07ef43b13e Workers: Use a wrapper class that deletes the signals QObject before exiting 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 2ef70b8eb4 InstallQueueItemModel: Refactor to add an expiration date to the download
While not sure if it is required, add an expiration date to the prepared
download 30 minutes after it was prepared. If a download has been in the
queue for more than 30 minutes, the download will be prepared again silently
before starting.

Return only the `InstallOptionsModel` in the result of the download thread
to avoid the potential mistake of re-using it. This required for the tray
notification signal to operate on the `app_name` instead of the `app_title`.
As a result, the notification slot was moved into the TrayIcon class for
better encapsulation.
2023-02-04 17:38:07 +02:00