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

1030 commits

Author SHA1 Message Date
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 2e1585bda8
EnvVarsModel: Be more lenient when checking for unchanged contents
Previously the unchanged contents check tested both `key` and `value`
at the same time, so the following case was not accepted.

`ENV_VAR=ENV_VAR`

No matter how unlikely it is for the key to be equal to the value, there
is no reason to restrict it.

For the `key` ("0") column, protecting against existing keys also handles
this case. For the `value` ("1") column, a check has been added.
2023-04-07 14:19:20 +03:00
lennard 9644d45b23
Check if mangohud exists when enabling it 2023-04-05 17:51:36 +02:00
lennard df1731de09 Fix key error for default mango hud settings 2023-04-05 13:09:34 +02:00
lennard 9233c28e5b Update loading widget 2023-04-05 13:09:34 +02:00
lennard 37a8a052c8 Add loading widget to cloud saves 2023-04-05 13:09:34 +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 849c98bee5
ProgressLabel: Use a centering procedure based on events
Previously the `setGeometry()` method was called explicitly. In this
procedure the self-centering widget installs an `eventFilter` on its
parent to react to `Resize` events of the parent.

This breaks centering on the list widgets a bit, pending an investigation
2023-04-04 13:34:33 +03:00
loathingKernel dcb6bc7b98
GamesTab: Since the layouting is fixed, add a nice margin at the bottom 2023-04-01 00:55:42 +03:00
loathingKernel 28e6f02fc1
GameSettings: Emit signal when a non-editable row changes from the settings 2023-03-31 14:03:32 +03:00
loathingKernel 639395c454
EnvVars: Re-enable key press handler
EnvVarsModel: Better vertical header icons
2023-03-31 02:42:16 +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 4b2bc7f91f
EnvVars: Handle environment variables with a QAbstractTableModel
Using a ChainMap and this custom model, we can display global environ
variables in the per-game settings, allowin better overview and
simpler override.
2023-03-29 14:07:19 +03:00
loathingKernel 392ea81707
ProtonSettings: correctly access wine_groupbox 2023-03-29 14:02:46 +03:00
loathingKernel afea6c54f6
GameSettings: Ignore override checks if the game is not installed 2023-03-29 14:01:57 +03:00
lennard 554d3557d3
fix auto sync saves 2023-03-19 20:23:44 +01:00
lennard 3874fac402
Sync saves when game finished 2023-03-18 16:14:01 +01:00
loathingKernel 748ff6d9ed RareCore: Detect if a game in saves is from another account.
And some cleanup
2023-03-18 14:42:46 +01:00
loathingKernel a768bce996
RareGame: export .egstore only after installing and successful verification 2023-03-16 18:07:33 +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 ae74d3438b
GameSettings: Use a PathEdit for override_exe
In the process convert to Ui membership instead of dual
sub-classing for those forms
2023-03-16 12:41:50 +02:00
loathingKernel 44590bb92b
Code cleanup
CloudSaves: don't save `save_path` in case it hasn't changed
IconGameWidget/ListGameWidget: Remove dead code
RareCore: add string translations
utils/paths: Use `AppDataLocation` instead of deprecated `DataLocation`
2023-03-16 12:38:33 +02:00
loathingKernel 837b391350
PathEdit: Allow for the completer's root path to be set at runtime.
This allows to complete from relative paths, such use exe override

Fix constructor argument names to follow Qt's types.
Set the same filters as the dialog for the completer.
Use the completer's icon provider for the dialog.

Force Rare to use Qt's file dialog instead of the native one.
2023-03-15 22:49:18 +02:00
Stelios Tsampas dc20293abb IndicatorLineEdit: Wrap edit_func inside the QRunnable 2023-03-15 18:25:32 +02:00
Stelios Tsampas 07c64b8b9b GameInfo: Fix enablement check 2023-03-15 18:07:20 +02:00
loathingKernel 5cf802dee7
ProtonSettings: Don't default to a directory when there is no configuration
Defaulting to a directory caused the configuration file to flood with
`STEAM_COMPAT_DATA_PATH` options after IndicatorLineEdit became
 asynchronous
2023-03-14 13:19:51 +02:00
loathingKernel d641d0fcf2
DefaultGameSettings: Less verbose file name 2023-03-14 13:17:43 +02:00
loathingKernel 18ebb6888f
InstallDialog: Allow for some special cases to install 0 size downloads
This specifically helps with games that have selectable downloads.
If we import a game with SDLs without any `install_tags` in the config
we will verify against the full game, meaning that files missing will
cause the verification to fail despite the game being correct. Since the
game is correct, resolving the download will result in a 0 size update.
This change will allow the InstallDialog to finish through the Install
button successfully despite having nothing to install.

On the `lgndr` side things are more complicated. Due to minor oversights
in legendary, the `install_tags` in the above example wouldn't be written
to the configuration file, causing a verification loop because the file
list wouldn't be filtered. To fix that, we also save legendary's config
file at the end of cleaning after a 0 size download.
2023-03-14 12:18:19 +02:00
loathingKernel c6a9460044
GameInfo: Fix missin format() argument 2023-03-13 13:18:12 +02:00
loathingKernel 439475dcd1
Downloads: Update queues count at more occasions
Also count active download in the queues
2023-03-13 12:30:27 +02:00
loathingKernel fee1f34451
ImportGroup: Rename button slot 2023-03-13 12:29:33 +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 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 8a15691672
CloudSaves: Set age labels to "None" if game doesn't support cloud saves 2023-03-12 14:15:43 +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
loathingKernel 993b9fca17
CloudSaves: Better handling of changing between games and some UI cleanup 2023-03-11 02:05:41 +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 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 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 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 e55c40448c
Misc: rename get_size to format_size 2023-03-06 00:39:23 +02:00
loathingKernel ca9bf7c1e8 StaticStylesheet: Share common properties by setting common object names 2023-03-03 16:51:26 +02:00
loathingKernel 372b276157 [Icon/List]Widget: Disable focus on buttons
When the button gets clicked on, it receives keyboard focus. Disabling the button
afterwards leads to `focusNextChild` getting called. This makes the scrollarea
trying to ensure that `nextChild` is visible, essentially scrolling to a random widget
2023-03-02 19:57:31 +02:00
loathingKernel 1dd8856a29 Resources: Add static stylesheet for widgets that need special handling irregardless of theme
The static stylesheet properties are always applied. If there is a theme
stylesheet to be applied, they are appended in the end of the theme
stylesheet.

This removes stylesheet properties from the library widgets, some special
buttons and the queue worker labels.

To update the static stylesheet first edit `rare/resources/static_css/stylesheet.py`
and then execute it as a script.
2023-03-02 15:36:45 +02:00
loathingKernel 46664f3577 Fix a few minor errors 2023-03-02 01:05:53 +02:00
loathingKernel 0e161eb4d2 Use Worker base class for runnables in legendary settings and ubisoft widget.
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-27 23:49:44 +02:00
loathingKernel ecee2e24e5 QueueInfoWidget: Set ellipsis text even without an old InstalledGame 2023-02-22 21:43:00 +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 a3d09ae288 Code cleanup: Use pass instead of ellipsis (...) for abstractmethods
Fix a few other issues pointed out by MultisampledNight

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-20 15:31:04 +02:00
loathingKernel 7a04f7b5be DownloadsTab: Replace n/a with ellipsis 2023-02-20 14:58:22 +02:00
loathingKernel 00a0b36e75 LaunchDialog: better layout name 2023-02-20 14:58:01 +02:00
loathingKernel c2da5bceb8 QueueWidgets: Re-text Update now to Download now
Also rename the widget classes and files for clarity
2023-02-20 14:52:45 +02:00
loathingKernel 3e827f4ece ElideLabel: Enable word-wrapping for elided labels.
Word wrapping allows ElideLabel to resize first inside flexible sized
areas such as the contents widget of a scrollarea. This allows the contents
widget to properly resize itself to avoid horizontal scrolling.

Word-wrapping also enables the widget to resize vertically. To avoid that
ElideLabel is set to a fixed height based on font metrics. An overloaded
method `setFixedHeight` has been added to disable it when desired.

EglSyncGroup: Replace estimated path label with a ElideLabel because
the displayed message was expanding the scrollarea.
2023-02-20 14:26:14 +02:00
Stelios Tsampas 05e538ca5c
Update rare/components/tabs/downloads/groups.py
Co-authored-by: multisn8 <contact@multisamplednight.com>
2023-02-20 11:32:48 +02:00
Stelios Tsampas ca3a2893f9
Update rare/components/tabs/downloads/__init__.py
Co-authored-by: multisn8 <contact@multisamplednight.com>
2023-02-20 11:32:28 +02:00
Stelios Tsampas e748468078
Update rare/components/tabs/games/game_info/move_game.py
Co-authored-by: multisn8 <contact@multisamplednight.com>
2023-02-20 11:31:03 +02:00
Stelios Tsampas cda4668486
Update rare/components/tabs/games/game_widgets/game_widget.py
Co-authored-by: multisn8 <contact@multisamplednight.com>
2023-02-20 11:28:53 +02:00
loathingKernel 4ef73b48ef Dialogs: Homogenize dialog titles 2023-02-18 19:36:49 +02:00
loathingKernel dd6df40e40 ExtraWidgets: Remove SideTab widgets and update imports 2023-02-18 17:33:25 +02:00
loathingKernel 5938835249 ExtraWidgets: Remove IndicatorLineEdit and PathEdit and update imports 2023-02-18 17:29:41 +02:00
loathingKernel 97def45a7e Cleanup: Remove some unused imports 2023-02-18 17:27:18 +02:00
loathingKernel ecc1bd8d5c IndicatorLineEdit: Run edit callback function asynchronously
Execute the edit callback function in a thread. By executing it in a thread
we don't have to wait for longer validation procedures to finish to
continue updating the UI. This is most notable in the MoveGamePopUp
which is heavy on disk IO.

Because we cannot use special text formatting in a thread, the
indicator messages have been reworked while also becoming extensible.

A dictionary of extended reasons can be specified through the
`IndicatorLineEdit.extend_reasons()` method.

The dictionary has to follow the following format
```
python
{
	MyIndicatorReasons.REASON: self.tr("Reason message")
	MyIndicatorReasons.OTHER_REASON: self.tr("Other reason message")
}
```

In the above example `MyIndicatorReasons` is a subclass of `IndicatorReasons`
which should be specified as follows

```
python
MyIndicatorReasons(IndicatorReasons):
	REASON = auto()
	OTHER_REASON = auto()
```
2023-02-18 14:37:37 +02:00
loathingKernel 7e4ded70b5 MoveGamePopUp: Don't translate or do any text formatting in path_edit callback function 2023-02-17 13:29:59 +02:00
loathingKernel 922b1472dd IconWidget: Fix typo in install_btn css selector 2023-02-17 10:49:34 +02:00
loathingKernel 9b856e5f8e InstallDialog: Allow downloading 0 size DLCs
There are DLCs (for example KingletAztec) which are essentially
entitlements, a single file the allows access to already downloaded
content. Updates for such DLCs only change the metadata version number
without any actual new data. These DLCs are handled correctly by the
DLM, but our dialog would refuse to allow installing them due to 0 download
size. This change allows them to pass through the InstallDialog.

The other issue, which I don't know if it was only a result of our faulty
validation at startup or could occur in legendary too, is that a DLC might
be marked with needing verification. Currently we don't have a way of
verifying DLCs, so when verifying the game, we will also set the same
state for any installed DLCs. In effect verifying the game successfully
will also mark any DLCs as correct.
2023-02-17 10:37:44 +02:00
loathingKernel e9cbdb22bc RareCore: add dequeue_worker() method to RareCore
It will "properly" remove a worker and update the connected widgets.
2023-02-16 17:07:02 +02:00
loathingKernel b405ff615e RareCore: Return a list instead of an iterator to freely use remove() 2023-02-16 16:42:32 +02:00
loathingKernel d8c31a05c2 GamesTab: Remove timing debug message 2023-02-16 16:22:31 +02:00
loathingKernel 5593dfb984 MainWindow: Don't wait for the workers to finish.
Instead ask the user if the queue should be cleared and return to normal execution.
2023-02-16 16:19:52 +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 a438eb764b MoveGamePopUp: Don't refresh indicator on widget.update 2023-02-16 10:46:47 +02:00
loathingKernel e34800cfd3 LibraryWidgets: Remove unused code and use multiline f-strings for css text 2023-02-15 20:40:20 +02:00
loathingKernel 0bd7af3d77 MoveGamePopUp: Use ElideLabel for the warning 2023-02-15 19:58:28 +02:00
loathingKernel efcbea91cf MoveGamePopUp: Make the warning label always visible 2023-02-15 19:48:48 +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 71aa440e0b GameWidget: Use __slots__ to satisfy forward ui declaration
This way `ui` won't get any typing but this is internal and we can
take care of it until a better method is found to satisfy both.
2023-02-08 15:14:50 +02:00
loathingKernel 1721677e33 GameWidget: Implement reactive and interactive labels
The `status_label` displays what is currently going on with the game.
It reflects the current operation running on it or if it requires special
attention (update, needs verification etc)

The `tooltip_label` displays hover information such as what happens
if a part of the widget is clicked or in the case of the launch button if
the game can run (without version check, offline etc)

The context menu on the widgets will be updated and populated according
to the installation state of the game. Since the context menu was revised
the shortcut creation code was revised too to make it more compact.

the `create_desktop_link` and `get_rare_executable` functions are moved
from `rare.utils.misc` to `rare.utils.paths` to avoid cyclical imports and
better grouping. Two functions are added, `desktop_link_path` to uniformly
calculate the path of the shortcut and `desktop_links_supported` which
checks if Rare supports creating shortcuts on the current platform.
`desktop_links_supported` should be used as safeguard before `desktop_link_path`.

Desktop links are currently untested on Windows but if `shortcut.Description`
works as expected, it should be good to go.
2023-02-07 13:41:59 +02:00
loathingKernel 2903c19667 Code cleanup 2023-02-07 13:06:08 +02:00
loathingKernel 34a13ea3b2 ApiResults: Mirror the way RareCore from refactor_backend handles non asset items
`LegendaryCore.get_non_asset_library_items()` returns the same tuple
for `game_list, dlc_dict` as for regular games with assets, so
keep the result for API completeness, since `RareGame` can handle those
games properly.
2023-02-07 13:04:33 +02:00
loathingKernel c83ee69914 GamesTab: Populate RareGame.saves at creation based on ApiResults
Remove unused attributes and clean layout code.
2023-02-06 09:45:30 +02:00
loathingKernel 59f5370bef LaunchDialog: Retrieve entitlements in a worker 2023-02-06 09:20:25 +02:00
loathingKernel 211f92d2d6 MainTabWidget: Use returned indices instead of hard-coding disabled tabs
Parent the tabs properly for consistency
2023-02-06 09:19:31 +02:00
loathingKernel 34839d469e Update/QueueGroups: Initialize with hidden container. 2023-02-05 19:41:08 +02:00
loathingKernel 15b80ce72f GamesTab: Move installed and uninstalled signal connection inside LibraryController 2023-02-05 19:14:51 +02:00
loathingKernel f9b5385513 DownloadsTab: Paint the background of the active download stats with the image of the game
The Qt Designer UI file for the downloads tab was removed since
the tab is simple enough to be implemented in code now.
2023-02-05 19:12:14 +02:00
loathingKernel c0b98978f1 QueueGroup: Also update movement arrows when a widget is deleted 2023-02-04 17:38:07 +02:00
loathingKernel b2b3598a0b MainWindow: Add worker queue to the statusbar 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 38710a0af1 DownloadsTab: Use is_idle 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 f0b81c7038 RareGame: Add state property and emit the widget.update signal on change 2023-02-04 17:38:07 +02:00
loathingKernel 683b33da10 DownloadsTab: Refuse to start download if the game's state is not idle 2023-02-04 17:38:07 +02:00
loathingKernel e7a47a48e1 Add typing to the custom layouts and fix stacked widet page naming 2023-02-04 17:38:07 +02:00
loathingKernel 25def92a41 TabWidget: Don' add store and download shortcuts when offline 2023-02-04 17:38:07 +02:00
loathingKernel a8bc418e42 Reference tabs by their returned indices instead of hardcoded numbers 2023-02-04 17:38:07 +02:00
loathingKernel 96c833be64 GameInfo: Fix list to boolean conversion
SideTabBar: Add padding option
2023-02-04 17:38:07 +02:00
loathingKernel de273cbe20 WrapperSettings: Move class variables into instance variables 2023-02-04 17:38:07 +02:00
loathingKernel 406c018f29 GameInfo: Enable DLC tab only when the game is installed 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
loathingKernel 90021e34f2 RareGame: Add enqueue and dequeue signals
They are used to insert and remove updates from downloads when
the installation of a game changes through `RareGame.set_installed`.
They piggy-back the signals with the same names in `GlobalSignals`

When importing a game from EGL, also check
2023-02-04 17:38:07 +02:00
loathingKernel 523391d166 QueueWidget: Prepare requeued downloads after adding it.
By preparing the download inside the widget, the delay after stopping
the running download and visual feedback of adding the widget is
reduced. The widget will now appear containing the basic information
and will be populated with the information about the download
when it is ready. The widget is disabled in the meantime.

Move `InstallInfoWorker` to `rare.shared.workers` module and
revert it to emitting a `InstallDownloadItem` model only
instead of a `InstallQueueItemModel.`
2023-02-04 17:38:07 +02:00
loathingKernel 0830c17ee5 ImportGroup: Add progress reporting in the form 2023-02-04 17:38:07 +02:00
loathingKernel a96a51f110 DowloadsTab: Emit a signal from each group on widget deletion to avoid counting to-be-deleted widgets 2023-02-04 17:38:07 +02:00
loathingKernel c219f347d1 ImportGroup: Fix missing text due to ElideLabel change 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 84694a68a8 UpdateGroup/QueueGroup: Use the QObject's destroyed signal to toggle visibility of labels and containers
The widgets are not destroyed immediately so toggling based on
counting children in containers didn't work while in the same function.
Using the `destroyed` signal makes it clear when the change should happen.
2023-02-04 17:38:07 +02:00
loathingKernel cf5332004a Add name inference based on type in widget_object_name 2023-02-04 17:38:07 +02:00
loathingKernel a26b977bda Fix a few issues around refactoring the stylesheets.
Properly set object names for install and uninstall buttons in dialogs
Change margins on widgets that are put into scrollareas
Add top margin only on checkable QGroupBox
Remove padding from QToolBox
2023-02-04 17:38:07 +02:00
loathingKernel 9e077f74ed Stylesheets: Refactor css widget selectors based on objectName()
The `objectName()` of onstall and uninstall buttons should be set
to `InstallButton` and `UninstallButton` respectively for them to
pick up their special CSS properties.

Make QToolBox tab text bold

Clean-up deprecated widget object names in the CSS
2023-02-04 17:38:07 +02:00
loathingKernel 020d225f97 InstallDialog: Make as modal when not silent to block input 2023-02-04 17:38:07 +02:00
loathingKernel c523fa9210 UpdateGroup: Keep updates' app_names in a list too.
Because `deleteLater()` doesn't delete the widget immediately (duh!)
`count()` and `contains()` can report false results while the widget
is queued for deletion.

Hide container and list/queue by name mangling.

Remove test code.
2023-02-04 17:38:07 +02:00
loathingKernel 65c56bd366 ImportGroup: Handle each imported game as soon as it ready
Emit and handle the each imported game with the progress signal.
The result signal still handles showing the summary of the
process to the user
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 915c41309d GameWidgets: Remove GameUtils from GameWidgets
Also remove attributes tracking the state of each application, those
are handled by `RareGame`

Temporarily disable save syncing related code, pending the move to
the game launcher process
2023-02-04 17:38:07 +02:00
loathingKernel b9e9ed8088 EnvVars: Use monospace fonts for keys and values 2023-02-04 17:38:07 +02:00
loathingKernel 620e8f721c ImportGroup: Adjust for RareGame 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 6ccbeb12dc DownloadsTab: Use elided text from version numbers 2023-02-04 17:38:07 +02:00
loathingKernel 91ef4ca944 LaunchDialog: Do case-insensitive search for the games executable 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 8dd58dc5e9 EGLSync: Subclass EGLSyncListGroup and EGLSyncListItem
Subclass `EGLSyncListGroup` and `EGLSyncListItem` into import/export
specific classes. This way we don't have to specify the type of
operation at instatiation and improves code clarity and intention.

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:07 +02:00
loathingKernel 0d4b75d399 GameProcess: Make it a persistent member of RareGame
The `GameProcess` class now acts as a persistent member of `RareGame`
that can be re-used for launching games. Its signals are handled and
repeated by `RareGame`.

Implements launching directly into `RareGame`

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
loathingKernel 08c7ae89e9 Utils: Don't import singletons in rare.utils.misc to avoid uninitialized used and cyclical dependencies
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
loathingKernel 599db2629f TrayIcon: Update the list of recent games after a game has exited
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
loathingKernel 426be3e403 TrayIcon: Use RareCore to query last played games.
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +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 c9b8774422 GameInfoTabs: Disable metadata tabs when --debug is not defined
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 2923c09bad GamesTab: Also scroll to top when filter changes.
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 b0c4fb4212 GameUtils: Adapt to use RareGame
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
loathingKernel 5d209e1805 GameWidgets: Split status label to two
The original status_label is used to reflect the state of the game,
the tooltip_label is used to reflect the action of the current hovered
widget.

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
loathingKernel 4640f8af6f RareGame: Add metadata loading into RareGame itself and adapt tray icon to use the same file structure
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
loathingKernel 9ca39d94ab GlobalSignals: Reorganize signals into groups
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
loathingKernel 83df445de9 GlobalSignals: Fix signal names in EGLSyncGroup and ImportGroup
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
loathingKernel 857b3a3cc0 WineResolver: Pass LegendaryCore at instantiation
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 ab858b87d3 InstallDialog: Fix title capitalization
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
loathingKernel 672a283472 GameInfoTabs: Emit back signal instead of accessing parent when Esc is pressed
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
loathingKernel e059db1984 LibraryWidget: Remove class variables
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 4796fb5efa GameSettings: Check if Igame has save_path attribute before using it
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
loathingKernel c5e2893f64 UninstalledInfoTabs: Remove
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
loathingKernel a58e385f8b GameInfo: Add all currently available tabs to GameInfo
Prepares for removal of dedicated UninstalledGameInfo tab

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
loathingKernel 4239acea24 GameDlc: Replace double inheritance with UI member class
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
loathingKernel 652968b6bf RareGame: Introduce RareGame from refactor_backend branch
Shared: Move WineResolver to `rare/shared/workers`
PathSpec: Move to `rare/models`

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2023-02-04 17:38:06 +02:00
lanmaster53 db1691b694
Fixed a bug that caused a UI crash on Mac-based systems. (#267) 2023-02-04 15:23:07 +01:00
lennard e46ae0f91e
Fix "Offline" text in account widget 2023-01-08 20:41:02 +01:00
lennard a90d6ba7c8
Fix too high download speed 2022-12-01 00:12:12 +01:00
loathingKernel cb49e8b678 Integrations: EOS -> Epic Overlay 2022-11-04 02:44:45 +02:00
loathingKernel b84d8a5c67 ImportSync: Rename to Integrations due to expanding their use. 2022-11-03 22:50:21 +02:00
loathingKernel 61749f9acd EOSWidget/UbiActivationHelper: Move them from Settings to ImportSync 2022-11-03 22:34:50 +02:00
loathingKernel da79519e80 GameListHeadBar: Combine the "Import" and "EGL Sync" buttons into a menu
The "EOS and Ubisoft" tab is currently empy
2022-11-03 14:53:58 +02:00
loathingKernel 891804ae37 AccountWidget: Remove dead signals after the offline mode fix
Signals, if they carry the same datatype, can be chained simply
with `signal.connect(othersignal)` without the need to use a `lambda`
expression and `emit()`

TabWidget: Fix error because the `exit_app` signal was called directly
2022-10-31 17:00:01 +02:00
loathingKernel 435d560b5c InstallDialog: Update the collapsible widget to take a widget instead of a layout
This change makes it more inline with how QScrollArea operates on a central widget.
Other changes include using a QFrame instead of a QWidget as a base and
adding a QLabel for the title instead of the horizontal line.

The advanced options were split into their own separate widget. Right now
their class operates only as a container with the logic remaining in the
InstallDialog.
2022-10-31 16:59:55 +02:00
loathingKernel 5370355e5d Lgndr: Restructure module to follow legendary's file hierarchy
Move overloaded class files into the folders following
legendary's structure. Move Rare's integration classes into
their own subfolder.
2022-10-29 14:50:18 +03:00
loathingKernel e6ff2bb41e ImportGroup: Enable the button when "Import DLCs" changes 2022-10-29 14:50:18 +03:00
loathingKernel 9fcb924ae8 Widgets: Correct CollapsibleWidget name 2022-10-29 14:50:18 +03:00
loathingKernel 47b474a31a StyleSheets: Remove last use of custom noBorder property
Instead, use `QFrame.NoFrame` as `FrameShape` to set `0px` border width.
2022-10-29 14:50:18 +03:00
lennard ca45c62414
Fix offline mode 2022-10-29 12:23:50 +02:00
lennard 923aa1b90d
Migrate to legendary 0.20.30 2022-10-26 21:36:16 +02:00
lennard 97157646a1
Fix some translation strings 2022-10-23 22:52:49 +02:00
lennard 8e721cc324
Include Origin games in get_wine_prefixes() 2022-10-23 22:52:39 +02:00
loathingKernel 3291100709 InstallDialog: Set irrelevant widgets as disabled.
Do not hide irrelevant options, show them as disabled instea.
This like the install directory are still informational despite
not being editable.

Also homogenize variable and widget naming.
2022-10-23 21:36:44 +03:00
loathingKernel c1a008dce1 MainWindow: Don't connect to the global exit signal
Instead of connecting to the global `exit_app` signal, pass the signals
through their respective widgets. Because signals are queued by
default, this ensures that slots are executed in the order they are
connected. Makes it cleaner to do cleanup procedures where they should
make sense, unlike the global signal, where it has to be inferred by
the widget instantiating order.
2022-10-23 16:08:27 +03:00
loathingKernel 3c413c4e1f AccountWidget: Refuse to logout if there are active downloads
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2022-10-23 00:54:11 +03:00
loathingKernel 28b2b7ea9b MainWindow: Handle active downloads when exiting through WM's close button.
When the closed through the WM's close button, `closeEvent()` is
 used directly. In this case the dialog in the `on_exit_app`
slot was skipped.

There is a mishandled case. If coming from logout while there
is an active download (Yes to logout -> No to stop download)
we end up in a weird state which I haven't investigated yet.

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2022-10-23 00:01:30 +03:00
loathingKernel ef65e8ce09 DownloadsTab: Show the update version of InstallDialog if it is an update
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2022-10-22 15:44:22 +03:00
loathingKernel e9fab53aff UninstallDialog: If the game has selectable downloads, default to keeping configuration
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2022-10-22 15:41:49 +03:00
Stelios Tsampas 53cab3ecb9 GameInfo: Add missing space 2022-10-19 17:53:37 +03:00
lennard 68868c6259
Set game to not running, if an error occurred 2022-10-18 21:26:48 +02:00
lennard 378d876c3b
Add Ukrainian language 2022-10-17 20:00:46 +02:00
lennard ebd567e665
Disable pypresence settings if not installed 2022-09-27 21:55:57 +02:00
lennard fbd16b99ae
Update translations 2022-09-27 21:48:44 +02:00
lennard 24774b07c0
Fix move game on Windows 2022-09-27 21:09:41 +02:00
Dummerle 5d24c672b2 Catch Permission errors, when disabling and enabling EOS overlay 2022-09-19 01:00:17 +02:00
loathingKernel 83551f9b9e DownloadThread: Don't mark prerequisites as installed if the user selected not to install them
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2022-09-18 20:52:59 +03:00
Stelios Tsampas 0960cbbdd3 DownloadThread: args is a string! 2022-09-18 15:07:42 +03:00
Stelios Tsampas 14eda1c246 DownloadThread: Weirdly setNativeArguments doesn't exist despite the docs saying that is should be available on Windows 2022-09-18 12:52:15 +03:00
loathingKernel e621955a22 RareSettings: Handle permission error when deleting logs 2022-09-13 12:38:43 +03:00
loathingKernel f7e9375964 LaunchDialog: Make the split 75/25 2022-09-11 19:45:17 +03:00
loathingKernel cf5fd415e5 LaunchDialog: Add a middle-ground solution for concurrent image downloads 2022-09-11 14:51:37 +03:00
loathingKernel 52108688d3 LaunchDialog: Use ElideLabel for progress information 2022-09-10 22:42:47 +03:00
Stelios Tsampas 7a1935335e GameInfo: Work-around slowdown on widget update_game() request 2022-09-10 19:04:40 +03:00
Stelios Tsampas 21ea2af8e1 App: Move timer initialization after LaunchDialog has finished 2022-09-10 18:07:32 +03:00
Stelios Tsampas 74a3d9458d LaunchDialog: Show validation progress separately from download progress. 2022-09-10 17:27:37 +03:00
Stelios Tsampas cc74767f0a App: Move verification requirement check into launch dialog 2022-09-10 15:33:48 +03:00
Stelios Tsampas afcb3f7e7a GameLaunchHelper: Allow closing the window only if the application has exited or crashed 2022-09-08 16:02:17 +03:00
Stelios Tsampas d5d795ce79 Paths: Query paths after the OrganizationName and ApplicationName have been set
At the point they were evaluated, `OrganizationName` and `ApplicationName` are unset
resulting in wrong paths. As a quick fix, explicitly set them to their later values
Per OS examples:
Windows:
	before:
		data: C:\Users\<user>\AppData\Local
		cache: C:\Users\<user>\AppData\Local\cache
	after:
		data: C:\Users\<user>\AppData\Local\Rare\Rare
		cache: C:\Users\<user>\AppData\Local\Rare\Rare\cache
2022-09-08 01:27:37 +03:00
loathingKernel 5029921b09 Move a bunch of class attributes to instance attributes 2022-09-07 18:21:50 +03:00
Dummerle 4f91c6b422
Move widgets and uninstalled_games attributes to __init__() 2022-09-05 22:46:44 +02:00
Dummerle 333bb40ad7
Fix wrong origin classification for ue plugins without assets 2022-09-05 20:50:10 +02:00
loathingKernel 1ebd0b18d8 Introduce a very basic RareCore to handle signletons and their cleanup. 2022-09-04 20:39:03 +03:00
loathingKernel 7020141148 LaunchDialog: Move update check before login() 2022-09-04 19:51:23 +03:00
loathingKernel afcdc1dea1 App: Move legendary initialization to the singleton
App: Move tray to MainWindow
Shared: Add destructor for singleton instances
2022-09-04 01:14:43 +03:00
loathingKernel 0a89f0e0b8 Make launch and alias for start 2022-09-02 13:17:05 +03:00
loathingKernel 48867a8656 DebugSettings: Add restart button, thanks Dummerle! 2022-09-02 00:31:10 +03:00
loathingKernel 3c5575fda9 LaunchDialog: Don't explicitly delete LoginDialog 2022-09-02 00:04:39 +03:00
loathingKernel 345ee443ed ImportLogin: Only add the first part of the split 2022-09-02 00:02:20 +03:00
loathingKernel b3348a1eca ImportLogin: Check if programdata is set 2022-09-01 23:48:30 +03:00
loathingKernel 0388d4bf9d ImportLogin: Fix failure to login using EGL data 2022-09-01 22:49:09 +03:00
loathingKernel fb708ce5fd LoginDialog: Update to legendary 0.20.28 2022-09-01 18:53:16 +03:00
loathingKernel 2c36ffcd51 Lgndr: Adjust for d8af06c936 2022-09-01 11:49:42 +03:00
loathingKernel 6941556265 InstallDialog: setup UI class as member instead of double inheritance 2022-08-31 17:42:40 +03:00
loathingKernel b1c713be12 InstallDialog: Show silent dialog in case of error
InstallDialog: Default shortcut creation to Unchecked in the UI file
InstallDialog: Save and reuse last shortcut creation value
2022-08-31 17:41:12 +03:00
Dummerle 4e325eb3d8
Ignore some pylint errors 2022-08-30 01:33:08 +02:00
loathingKernel a6d1cae8a8 Lgndr: Temporary fix for DLManager monkeypatching in Windows 2022-08-30 01:22:08 +02:00
loathingKernel 2f983d9b52 InstallDialog: Adjust collapsible widget 2022-08-28 22:07:26 +02:00
Dummerle cb3f316bf0
Fix proton visibility on Windows 2022-08-27 12:47:17 +02:00
Dummerle 70a51902d2
Move move game stuff to external file
I know it's weird
2022-08-27 12:32:20 +02:00
Dummerle 3469946ee9
Install prereqs by default on windows 2022-08-27 12:32:20 +02:00
Dummerle 2797485e69
Fix reason for cloud save edit, if nothing wrong 2022-08-27 12:32:20 +02:00
Dummerle da07d6b791
Move some options in install dialog to advanced options 2022-08-27 12:32:17 +02:00
loathingKernel 2b141c276f InstallDialog: Fix dlm keyword argument 2022-08-26 11:38:13 +03:00
loathingKernel 50a37be433 DownloadsTab: Remove dead code 2022-08-17 23:46:10 +03:00
loathingKernel c40fef0595 Lgndr: Transfer what DownloadThread does to install_game_real (not used yet)
DownloadThread: Refactor names to match Lgndr
2022-08-12 13:17:53 +03:00
loathingKernel 5e022e6d28 Lgndr: Rename a few fields to reflect legendary's names 2022-08-08 21:06:58 +03:00
loathingKernel e97e9fe841 Downloads: Add skip_dlcs and with_dlcs arguments. 2022-08-08 17:26:38 +03:00
loathingKernel 3ee789a695 Update DownloadThread 2022-08-03 02:33:50 +03:00
loathingKernel 38dfdc8bc2 Lgndr: Remove LegendaryCLISingleton
Since `LegendaryCLI` isn't stateful, we can instantiate
it when needed
2022-08-02 10:42:38 +03:00
loathingKernel 5ac71e99f0 DownloadThread: Use clean_post_install instead of local copy
InstallDialog: Handly empty `config_tags`
Lgndr: Cleanup
2022-08-02 10:42:38 +03:00
loathingKernel e5c7b029ff GameInfo: Offer to also update the game after a verification if there is one 2022-08-02 10:42:38 +03:00
loathingKernel 785aaf648e GameInfo: Detect repair_and_update requirement
If a game was partially installed and it was imported
through the import functionality, if `repair_and_update`
is specified it will report `0` download size if there
is no real update to be done. Fix it by detecting the
need for an update explicitly.

This will also force games that have failed verification
to also update while repairing them, fixing the
long-standing issue of repairing an older version of a
game and then doing the update in a separate step.
2022-08-02 10:42:38 +03:00
loathingKernel 3501741c03 DownloadsTab: invalidate and recreate update widgets on import
Previously on game import, multiple update widgets for the same game
were created in the downloads tab. Instead of checking if a widget
already exists, invalidate the delete the existing and add a new one
with the current information about the installed game.
2022-08-02 10:42:38 +03:00
loathingKernel f375357a2c Utils: fix unresolved references 2022-08-02 10:42:38 +03:00
loathingKernel 7408116deb Lgndr: Don' use lambda with default argument 2022-08-02 10:42:38 +03:00
loathingKernel 3ecbae0564 Utils: Rename utils.py to misc.py to not confuse PyCharm checker 2022-08-02 10:42:38 +03:00
loathingKernel f51563ea93 Models: Move installation related models into their own file 2022-08-02 10:42:38 +03:00
loathingKernel 7fba2259ed LoginDialog: Fix crash due to messagebox parent 2022-08-02 10:42:38 +03:00
loathingKernel ee5adce18b Implement LgndrIndirectLogger to return the last logged message from LegendaryAPI
The indirect return is stored in a `LgndrIndirectStatus` object that provides checking and unpacking features

Lgndr: `LgndrInstallGameArgs.install_tag` default to None
Lgndr: add default `move` method.
Lgndr: monkeypatch `dlm.status_queue` after preparing a download to reduce `InstallQueueItemModel`
InstallOptionsModel: implement `as_install_kwargs` to pass only relevant arguments to `LgndrInstallGameArgs` in InstallDialog
InstallOptionsModel: rename `sdl_list` to `install_tag` as they were the same thing
LegendaryUtils: Update to use `LgndrIndirectStatus`
UninstallDialog: Add option to keep configuration decoupled from keeping game data
GameUtils: Add messagebox to show error messages from legendary after uninstalling a game
InstallDialog: Update to use `LgndrIndirectStatus`
InstallDialog: Update selectable download handling to match legendary's
DownloadThread: Remove multiple instance variables, instead reference them directly from `InstallQueueItemModel` instance
ImportGroup: Replace `info_label` with an `ElideLabel` for displaying long messages
ImportGroup: Don't translate message strings in the `ImportWorker`
GameInfo: Call `repair()` if needed after verification instead of handling it locally
GamesTab: Fix string matching for capitalized strings and scroll to top on when searching
2022-08-02 10:42:38 +03:00
loathingKernel 28531eec38 Lgndr: Add logger monkey class
The class acts as an intermediate between the logger and the function call
It keeps the last message that was sent to the logger. The instance of the
class can be returned as a return value from the LegendaryCLI methods to
provide return status and the message related to it.

The level at which it considers the logged message as an error is configurable.
By default it considers logging.ERROR and above as faulty return values
2022-08-02 10:42:38 +03:00
loathingKernel bbaff5f42c Lgndr: Add re-implemented uinstall_game
Lgndr: Change the exception level to CRITICAL for core
LegendaryUtils: Use uninstall_game from our Lgndr
UninstallDialog: Update to return a tuple of values
App: Keep files if the install directory was lost
App: Run legendary's exit procedures on exit
2022-08-02 10:42:38 +03:00