1
0
Fork 0
mirror of synced 2024-06-26 18:20:50 +12:00
Commit graph

330 commits

Author SHA1 Message Date
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 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 f375357a2c Utils: fix unresolved references 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 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
loathingKernel 2bf41f20d1 Lgndr: Match the arguments of legendary's get_boolean_choice 2022-08-02 10:42:38 +03:00
loathingKernel d05f74b286 ImportGroup: Add option to import DLCs 2022-08-02 10:42:38 +03:00
loathingKernel 14087a3c6c Lgndr: Add default implementation for get_boolean_choice that returns False 2022-08-02 10:42:38 +03:00
loathingKernel 545d77ef07 Lgndr: Expose 'resolve_aliases' for outside usage 2022-08-02 10:42:38 +03:00
loathingKernel 3aae3887f6 Lgndr: Create argument models for consistent function arguments and cleaner implementation.
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.
2022-08-02 10:42:38 +03:00
loathingKernel 197f915fb3 InstallOptionsModel: Rename fields to use the same names as Legendary's arguments 2022-08-02 10:42:38 +03:00
loathingKernel 883bd268ff Mirror Legendary classes structure in the shim.
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
2022-08-02 10:42:38 +03:00
loathingKernel 3892f4a594 ImportGroup: Update the shim stuff for the import worker 2022-08-02 10:42:38 +03:00
loathingKernel 2c2f44c97c Use a loggin handler in stead of monkeypatching for raising LgndrException 2022-08-02 10:42:38 +03:00
loathingKernel ad81546b35 Adjust EGLSyncGroup to use LgndrException 2022-08-02 10:42:38 +03:00
loathingKernel c302775acd Remove dead code from EGLSyncGroup 2022-08-02 10:42:38 +03:00
Stelios Tsampas 04a76ed2ff Include PoC implementation of LegendaryCLI for the import_game method 2022-08-02 10:42:38 +03:00
Dummerle e6fc2323f1
Do not exit console, when game exited 2022-08-01 01:22:37 +02:00
loathingKernel e005423d0a GameUtils: Remove functions moved to LaunchHelper 2022-07-11 23:07:00 +03:00
loathingKernel 43c8cf8b52 LaunchHelper: Move console into the game_launch_helper folder
LaunchHelper: Log stderr to the console
2022-07-11 22:18:26 +03:00
loathingKernel 406cfc136f ImportGroup: Close file after reading app_name 2022-07-11 22:18:26 +03:00
Dummerle 87ea29d005
Fix appname error in game_info.py and error in postinstall 2022-07-10 01:18:19 +02:00
loathingKernel 0d6c9a8505 ImportGroup: Show messagebox when importing multiple games (scanning install folder)
I moved around a few things because the separate lists felt like they
would make the handling a bit complicated.
2022-07-02 22:19:40 +03:00
loathingKernel 76cd33054a EGLSyncListGroup: Move message box outside of thread to prevent "parent in other thread" crash 2022-07-02 11:48:33 +03:00
Dummerle 667ca0ecb6
Move import games to separate thread 2022-07-01 17:43:25 +02:00
Dummerle 35f4807a26
Fix Attribute error on too old Qt version 2022-06-29 21:45:15 +02:00
loathingKernel 1ad5413e02 LibraryWidget: Always update the progress label to work-around layout issue 2022-06-26 14:31:12 +03:00
loathingKernel b8668854db Move the installed and available games count to the head bar.
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>
2022-06-25 19:21:24 +03:00
Dummerle 7cba799d21
Merge pull request #220 from loathingKernel/fixups
Bug fixes for merged features
2022-06-23 22:13:57 +02:00
Dummerle 583f75d235
Fix some errors 2022-06-23 22:01:14 +02:00
Dummerle 43369ae143
Revert "Add a restart function in debug settings to easier test game helper"
This reverts commit cbf51b6bb7.
2022-06-23 20:11:09 +02:00
loathingKernel fe40dac368 Don't show the installing widget for Epic Overlay and DLCs
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2022-06-23 17:54:26 +03:00
loathingKernel 9e394f9981 GamesTab: Create methods for repeated widget removal and deletion code segments
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>
2022-06-22 20:00:00 +03:00
loathingKernel 5eb3ae7f80 Add SlidingStackedWidget from #196 2022-06-22 16:53:26 +03:00
Dummerle b3843b095f
Merge pull request #215 from aznd/enhancements_moving_game
Small enhancements in moving game
2022-06-20 22:32:46 +02:00
loathingKernel 08ab130c5c LibraryLayout from #196
Introduces the LibraryLayout from #196.
This layout distributes the available space in either horizontal side and in-between the widgets.

Known issues: When searching for a game, it will re-align visible widgets, effectively centering the results.
This is because the search and grouping functions are interleaved. #196 handles it differently by adjusting
the opacity and re-ordering of the irrelevant widgets.

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2022-06-20 19:04:46 +03:00
aznd 9535885318 Change "Available space" text in pop up for uniformity 2022-06-20 16:13:34 +02:00
aznd d51bba60db Use shutil.disk_usage because statvfs not available outside of UNIX 2022-06-20 16:11:58 +02:00
Dummerle d772c4000e
Merge pull request #213 from loathingKernel/image_widget
Add ImageWidget and LibraryWidget from #196
2022-06-19 22:53:11 +02:00
Dummerle cbf51b6bb7
Add a restart function in debug settings to easier test game helper 2022-06-19 22:50:13 +02:00
Dummerle 87a110b62b
Fix missing game environment and add last played to game meta 2022-06-19 22:07:21 +02:00
loathingKernel 6335293eef Add ImageWidget and LibraryWidget from #196
Add the Image and Library widgets from #196. In this iteration they replace the image `QLabel` in the existing widgets.

The `PaintWidget` in the `InstallingWidget` has been replaced by the future `LibraryWidget` that has progress indication.

The `ImageWidget` was also used to replace the image `QLabel` in `GameInfo` and `GameDlc` widgets.

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2022-06-19 20:42:49 +03:00
loathingKernel 3a28f2f0a2 Implement image manager
Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2022-06-19 17:12:59 +03:00
Dummerle 37ae6e2b6e
Fix most errors 2022-06-18 13:25:39 +02:00
Dummerle 8a9ef67d2f
Check for running games at startup 2022-06-13 22:59:35 +02:00
Dummerle 0bb1d0ef7e
Add communication system for game helper 2022-06-13 22:59:35 +02:00