Open sonic2kk opened 4 days ago
A small effort by me and a much larger effort by the Protontricks maintainer have created a working implementation however changes are required for both ValvePython/steam and ValvePython/vdf. So we will need to bump both versions once updates are in place.
It seems like the only thing we depend on from the steam
dependency is the parse_appinfo
function. We could implement this function ourselves in a thirdparty/steam/utils/appcache
folder and remove the Steam dependency altogether. This would also allow us to potentially make some performance-speciifc tweaks, something I have been looking at recently but have not made much headway with - the generator is the biggest bottleneck when opening with/selecting the Steam launcher. We can optimise a little bit by searching directly for the Steam Play tools AppID, roughly halving the time it takes iirc, and perhaps further optimisations could be made.
This would allow us to cut one of the larger dependencies we have, the steam
dependency is approximately 10mb and it has the following dependencies:
steam
dependency.steam
dependency.site-packages
, maybe not used anymore?So by implementing the Steam dependency ourselves we can save about 17mb - 10mb from the dependency itself, and 7 from removing the dependency on Cryptodome.
The upstream license of steam
is compatible with ProtonUp-Qt's as it is less restrictive, so there shouldn't be any issues adding this ourselves from that standpoint.
Pros:
91mb -> 74mb
and the Flatpak could go from 108mb -> 91mb
.steam
dependency shouldn't be the size that it is but that we're pulling in a lot for just one function.Cons:
Personally I think we should only consider this if:
Relevant upstream PRs:
Please fill out following when reporting a new bug:
Describe the bug
The upstream magic for
appinfo.vdf
changed again on the latest Steam Client Beta, meaningparse_appinfo
from ValvePython/steam is broken. This happened before (ValvePython/steam#418) and this new issue has already been reported upstream (ValvePython/steam#462).I am making this issue for awareness for anyone who runs into this, and also for us to track this so that we can update the Steam dependency once a version with a fix is available.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
ProtonUp-Qt should be able to parse the
appinfo.vdf
, but cannot pending an upstream fix.Screenshots
N/A.
Desktop (please complete the following information):
Additional context
Took a stab at trying to submit a patch for this upstream, but no guarantees my fix will be the one that gets merged as it is still in progress :smile:
Terminal output
The
parse_appinfo
gives the following output because it cannot parse the magic in the file.The fix is not as straightforward as adding the magic to the file though, as we need to skip past some parts of the file. And then there are some issues around parsing the binary VDF information in this file under
data
.