1
0
Fork 0
mirror of synced 2024-06-02 02:34:40 +12:00
Commit graph

115 commits

Author SHA1 Message Date
loathingKernel 7b810173da
Downloads: unset autoFillBackground for queue scrollarea 2024-02-24 13:56:15 +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 7b52dc204c Downloads: Update queue count when adding a download 2024-01-21 23:44:15 +02:00
loathingKernel 4e6008a8f7 TrayIcon: Generic notifications
* Add a notification when starting a download too
2024-01-19 17:17:31 +02:00
loathingKernel 7aa64b385e Downloads: Move auto-update change to Rare's settings instead of the game's metadata
The setting doesn't have a switch in the GUI yet, but the settings
feels like a better place for it.
2024-01-19 15:07:22 +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 d3ec79378e UninstallDialog: Refactor to use ButtonDialog as base 2024-01-02 22:31:25 +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 083094bcfc
Downloads: Code clarity 2023-11-28 16:38:02 +02:00
loathingKernel 497bdc08cc
Downloads: Remove UNINSTALLING state on cancel 2023-05-29 15:49:52 +03:00
loathingKernel d4c763296e
Downloads: Apply DOWNLOADING and UNINSTALLING states earlier
By applying the state earlier, we can implicitly avoid re-queuing
downloads.
2023-05-29 14:30:54 +03: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 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 439475dcd1
Downloads: Update queues count at more occasions
Also count active download in the queues
2023-03-13 12:30:27 +02:00
loathingKernel e55c40448c
Misc: rename get_size to format_size 2023-03-06 00:39:23 +02:00
loathingKernel 7a04f7b5be DownloadsTab: Replace n/a with ellipsis 2023-02-20 14:58:22 +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
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 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 38710a0af1 DownloadsTab: Use is_idle 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 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 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 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 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 6ccbeb12dc DownloadsTab: Use elided text from version numbers 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 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 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 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
lennard a90d6ba7c8
Fix too high download speed 2022-12-01 00:12:12 +01: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
lennard 97157646a1
Fix some translation strings 2022-10-23 22:52:49 +02: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
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 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 3ee789a695 Update DownloadThread 2022-08-03 02:33:50 +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 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 99ab488820 Pass the correct status queue and monkeypatch run_real in prepare_download 2022-08-02 10:42:38 +03:00
loathingKernel 5eb3ae7f80 Add SlidingStackedWidget from #196 2022-06-22 16:53:26 +03:00
Stelios Tsampas d6ef44b2f9
Rare: Implement global objects as functions that return a single instance 2022-02-25 20:22:45 +02:00