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

1610 commits

Author SHA1 Message Date
loathingKernel a17ffe0426
CloudSaves: Set the labels to "None" even if save_path is not set 2023-03-13 01:11:15 +02:00
loathingKernel e263523a76
ImportGroup: Constrain QStackedWidget from resizing when changing contents
Fix its size to the import button's size.
2023-03-13 00:58:16 +02:00
loathingKernel 97e34d6052
ElideLabel: Improve tooltip handling 2023-03-13 00:54:25 +02:00
loathingKernel 4fd723df2e
RareCore: Show progress while preparing RareGames 2023-03-13 00:04:11 +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 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 fb1175ee04
Main: Trust shebangs. Fixes launching games on NixOS
Co-authored-by: multisn8 <contact@multisamplednight.com>
2023-03-12 15:38:18 +02:00
loathingKernel 801294b1ea
RareCore: Resolve grant date from entitlements at post init 2023-03-12 14:43:54 +02:00
loathingKernel 8a15691672
CloudSaves: Set age labels to "None" if game doesn't support cloud saves 2023-03-12 14:15:43 +02:00
loathingKernel 404ce26ec9
ElideLabel: Don't override tooltip if one is set externally 2023-03-12 13:38:10 +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 f0ba7a7e45
RareCore: Rename RareCore.__games to RareCore.__library
Since RareGame can be both games and dlcs, use a generic name to avoid
confusion
2023-03-12 12:22:44 +02:00
loathingKernel 95c2b07d1e
ImageWidget: Don't try to paint the widget if painter is not active yet.
When the UI is being instantiated we might trigger some painting. This
squashes warnings in the output.
2023-03-12 12:19:46 +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
Stelios Tsampas b2f19852d0 CloudSaves: Allow path on Windows to not exist
Unlike Linux, we can be sure that the path is correct and it will be
created when the user downloads the saves.
2023-03-11 12:51:55 +02:00
Stelios Tsampas 325a41e9a4 increase line length for black 2023-03-11 12:13:44 +02:00
loathingKernel 993b9fca17
CloudSaves: Better handling of changing between games and some UI cleanup 2023-03-11 02:05:41 +02:00
loathingKernel fc015a4d30
RareGame: Update saves when a game exits 2023-03-11 01:32:04 +02:00
loathingKernel 3bacce78a2
IndicatorLineEdit: Simplify placeholder selection 2023-03-11 01:31:19 +02:00
loathingKernel 8a1dd6c948
RareCore: Sync back the results from OriginWineResolver into the main thread 2023-03-10 21:28:37 +02:00
loathingKernel f83342aa14
UI: Fix over-layouting in SyncWidget 2023-03-10 18:23:26 +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 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 901f339415
Only auto sync in launch helper if enabled
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-08 22:29:53 +02:00
lennard 45ecaa39f3
Add sync worker to launch helper
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-08 22:27:02 +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 d42a631713
Add dry run argument to launch helper 2023-03-08 21:33:58 +02:00
lennard b4586c9272
Delete unused classes GameUtils and CloudSaveUtils and move cloud save dialog to dialogs
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-08 21:33:24 +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 4b85ed8223
Cache all saves in a dict in api_results
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-08 19:15:32 +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
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
lennard eec3dfeb1e
Fix some rebase errors
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-07 17:11:22 +02:00
lennard 1938bd7084
Fix is_foreign()
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-07 17:11:22 +02:00
lennard 2258d87c83
Cache registry files for performance
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-07 17:11:22 +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
lennard b926dd112c
Enable origin install check on linux and add some performance improvements for linux
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-07 17:11:21 +02:00
lennard 9733e119c9
Show install path for origin games in game info
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-03-07 17:11:21 +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 dea01ae24b
RareGame: Origin games should be able to launch despite not being installed 2023-03-07 17:11:20 +02:00