Skip to content

Update Legendary to 0.20.33 #2806

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Update Legendary to 0.20.33 #2806

wants to merge 1 commit into from

Conversation

CommandMC
Copy link
Collaborator

See original changelog here

Can't test this on Windows & macOS at the moment, looks to be working fine on Linux


Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@CommandMC CommandMC added the pr:testing This PR is in testing, don't merge. label Jun 18, 2023
@CommandMC CommandMC requested a review from a team June 18, 2023 09:50
@CommandMC CommandMC self-assigned this Jun 18, 2023
@CommandMC CommandMC requested review from arielj, flavioislima, Nocccer and imLinguin and removed request for a team June 18, 2023 09:50
@arielj
Copy link
Collaborator

arielj commented Jun 19, 2023

In the changelog I see Commands modifying the installed game data will now abort if another instance of Legendary is running a command that modifies it

does it mean that if we try to uninstall an Epic game while another Epic game is being installed the command will fail?

currently it works BUT the uninstalled games show up as installed in the library after the one that was being installed ends

I understand now the uninstall will fail instead? maybe in that case we have to disable uninstalling an epic game just to prevent this failure?

@flavioislima
Copy link
Member

In the changelog I see Commands modifying the installed game data will now abort if another instance of Legendary is running a command that modifies it

does it mean that if we try to uninstall an Epic game while another Epic game is being installed the command will fail?

currently it works BUT the uninstalled games show up as installed in the library after the one that was being installed ends

I understand now the uninstall will fail instead? maybe in that case we have to disable uninstalling an epic game just to prevent this failure?

Another solution is to add the game to uninstall to the queue, pause the current download, uninstall, continue the download.

OR heroic could uninstall manually. That means deleting the game folder and then removing it from the json file. But that can still lead to conflicts.

Pausing would be ideal.

@CommandMC
Copy link
Collaborator Author

OR heroic could uninstall manually. That means deleting the game folder and then removing it from the json file. But that can still lead to conflicts.

This wouldn't work (for the same reason that uninstalling while installing doesn't work). When installing, Legendary reads the list of installed games when starting the install & adds the new game and writes out the list at the end. If you modify the file while an install is happening, those modifications will be lost

Pausing the install, uninstalling the game, and then resuming the install sounds like the best option. I'll look into that

@arielj
Copy link
Collaborator

arielj commented Jun 19, 2023

I just checked and it does fail to uninstall the game but the output is handled as a successful uninstallation and it removes shortcuts and refreshes the library.

Here you can see the legendary log trying to uninstall a game while a download is in progress (with the error to acquire the lock):

[DLManager] INFO: = Progress: 25.45% (408/1603), Running for 00:00:08, ETA: 00:00:23
[DLManager] INFO:  - Downloaded: 64.65 MiB, Written: 188.41 MiB
[DLManager] INFO:  - Cache usage: 45.00 MiB, active tasks: 32
[DLManager] INFO:  + Download	- 8.95 MiB/s (raw) / 21.97 MiB/s (decompressed)
[DLManager] INFO:  + Disk	- 17.98 MiB/s (write) / 0.00 MiB/s (read)
[19/6/2023, 18:58:24] /home/ariel/dev/oss/HeroicGamesLauncher/public/bin/linux/legendary uninstall d6407c9e6fd54cb492b8c6635480d792 -y
[DLManager] INFO: = Progress: 27.14% (435/1603), Running for 00:00:09, ETA: 00:00:24
[DLManager] INFO:  - Downloaded: 72.30 MiB, Written: 215.41 MiB
[DLManager] INFO:  - Cache usage: 35.00 MiB, active tasks: 32
[DLManager] INFO:  + Download	- 7.64 MiB/s (raw) / 16.98 MiB/s (decompressed)
[DLManager] INFO:  + Disk	- 26.97 MiB/s (write) / 0.00 MiB/s (read)
[cli] CRITICAL: Failed to acquire installed data lock, only one instance of Legendary may install/import/move applications at a time.
[DLManager] INFO: = Progress: 28.20% (452/1603), Running for 00:00:10, ETA: 00:00:25
[DLManager] INFO:  - Downloaded: 85.20 MiB, Written: 232.41 MiB
[DLManager] INFO:  - Cache usage: 34.00 MiB, active tasks: 32
[DLManager] INFO:  + Download	- 12.88 MiB/s (raw) / 15.98 MiB/s (decompressed)
[DLManager] INFO:  + Disk	- 16.98 MiB/s (write) / 0.00 MiB/s (read)
[19/6/2023, 18:58:25] /home/ariel/dev/oss/HeroicGamesLauncher/public/bin/linux/legendary list --third-party
[cli] INFO: Logging in...
[Core] INFO: Trying to re-use existing login session...
[DLManager] INFO: = Progress: 28.76% (461/1603), Running for 00:00:11, ETA: 00:00:27
[DLManager] INFO:  - Downloaded: 96.49 MiB, Written: 241.41 MiB

Here you can see heroic's logs thinking it was fine:

(18:58:23) INFO:    [Legendary]:        Progress for Alba - A Wildlife Adventure: 21.33%/64.65MB/00:00:23 Down: 8.95MB/s / Disk: 17.98MB/s
(18:58:24) INFO:    [Legendary]:        Uninstalling d6407c9e6fd54cb492b8c6635480d792: /home/ariel/dev/oss/HeroicGamesLauncher/public/bin/linux/legendary uninstall d6407c9e6fd54cb492b8c6635480d792 -y
(18:58:24) INFO:    [Legendary]:        Progress for Alba - A Wildlife Adventure: 23.85%/72.30MB/00:00:24 Down: 7.64MB/s / Disk: 26.97MB/s
(18:58:24) INFO:    [Shortcuts]:        Remove Steam images for A Short Hike
(18:58:24) INFO:    [Shortcuts]:        A Short Hike was successfully removed from Steam.
(18:58:24) INFO:    [Backend]:          Finished uninstalling
(18:58:24) INFO:    [Frontend]:         Refreshing legendary Library
(18:58:24) INFO:    [Legendary]:        Refreshing library...
(18:58:24) INFO:    [Legendary]:        Refreshing Epic Games...
(18:58:24) INFO:    [Legendary]:        Game list updated, got 382 games & DLCs
(18:58:24) INFO:    [Backend]:          Desktop shortcut removed
(18:58:24) INFO:    [Backend]:          Applications shortcut removed
(18:58:25) INFO:    [Legendary]:        Progress for Alba - A Wildlife Adventure: 28.1%/85.20MB/00:00:25 Down: 12.88MB/s / Disk: 16.98MB/s
(18:58:25) INFO:    [Legendary]:        Running command: /home/ariel/dev/oss/HeroicGamesLauncher/public/bin/linux/legendary list --third-party
(18:58:26) INFO:    [Legendary]:        Progress for Alba - A Wildlife Adventure: 31.83%/96.49MB/00:00:27 Down: 11.28MB/s / Disk: 8.99MB/s

At the end the game is still there showing up as installed in heroic, with the shortcuts removed

@flavioislima
Copy link
Member

Pausing the install, uninstalling the game, and then resuming the install sounds like the best option. I'll look into that

And I believe we just need to pause the queue if both games are from the legendary runner. If they are different, should be fine.

@derrod
Copy link

derrod commented Jun 21, 2023

Pausing the install, uninstalling the game, and then resuming the install sounds like the best option. I'll look into that

Since download resumption restarts an unfinished file from the beginning this is rather suboptimal. Many games these days put most of their data into big archive files (e.g. Unreal Engine .pak), so if a download is interrupted on one of those files, it'll have to be redownloaded from the beginning. If you could queue the uninstall until after the install is finished that would probably be better.

@flavioislima
Copy link
Member

Since download resumption restarts an unfinished file from the beginning this is rather suboptimal. Many games these days put most of their data into big archive files (e.g. Unreal Engine .pak), so if a download is interrupted on one of those files, it'll have to be redownloaded from the beginning. If you could queue the uninstall until after the install is finished that would probably be better.

That's a good point. So I believe we will need to wait for the next Heroic release to update this one so we can test more.

What about we make Heroic manually delete the game files and remove the game from the installed list (Heroic list) and wait for the .lock file to be removed on the legendary side, and then call Legendary to properly 'uninstall' the game on its side?
Could that work?

A more complex approach would be to refactor the code so Legendary is used like GOGDL, so we store the game metadata and the installation information on Heroic folder using electron-store, and we do not check for legendary files anymore.

The downside would be that we would lose the information about games installed if someone was using Legendary before (we could maybe check only on startup for Legendary files as a workaround)
And I am not sure but this could break the sync with Epic games feature as well.

@arielj
Copy link
Collaborator

arielj commented Oct 28, 2023

Closing in favor of #3168, includes the legendary update and a few more related things

@arielj arielj closed this Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:testing This PR is in testing, don't merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants