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.
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
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.`
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.
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.
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
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
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.
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>
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
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
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.
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>
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>
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>
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>
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>
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>
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
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.
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.
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.
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>
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
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.
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.
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
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
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
Lgndr: Prefix files that aren't part of legendary with 'api_'
Lgndr: Return statistics from 'verify_game' instead of parsing the exception
VerifyWorker: Add 'error' signal for exceptions.
Lgndr: Move code segments copied from `prepare_download` back to their original location in `install_game`
Lgndr: Add the LgndrLogHandler at initialization instead of every function.
Lgndr: Move `verify_game` to its original place in `LegendaryCLI`
Lgndr: Change the way DLManager is patched into LegendaryCore proper
Shared: Add singleton for LegendaryCLI, LegendaryCoreSignleton returns core from LegendaryCLI
VerifyWorker: Update to use `verify_game` from `LegendaryCLI` directly
PreLaunchThread: Initialize LegendaryCLI to get LegendaryCore from it
InstallDialog: Update `prepare_install` argument names
Moving them to the head bar makes the library containers
simpler structurally as there the library's frame can be removed.
Remove games_tab UI files as they were getting very thin,
what they contained is being setup manually instead
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
Also fixes the login window missing dialog type hints for the window manager.
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
HeadBar: Compact the headbar, re-use ButtonLineEdit from shop for the search function
SelectViewWidget: Remove content margins and make widget naming consistent
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>