Skip to content
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

Unable to download GE-Proton versions 6 or older #387

Closed
robohappy opened this issue Apr 26, 2024 · 4 comments · Fixed by #398
Closed

Unable to download GE-Proton versions 6 or older #387

robohappy opened this issue Apr 26, 2024 · 4 comments · Fixed by #398
Labels
bug Something isn't working

Comments

@robohappy
Copy link

robohappy commented Apr 26, 2024

Describe the bug
On the version scroll down menu for GE-Proton, it only goes down far enough for 7.0rc3-GE-1, no GE Protons from 6 or older show on the menu.

To Reproduce
Steps to reproduce the behavior:

  1. Click add version
  2. Have compatibilty tool set to GE-Proton
  3. On the version scroll down menu, scroll to the bottom
  4. Only goes down far enough for 7.0rc3-GE-1

Expected behavior
Should be able to access all older versions of GE-Proton

Screenshots
Screenshot_20240425_213924

Desktop (please complete the following information):

  • Platform: PC
  • System: Manjaro
  • Version: 2.9.2-1
  • How did you install ProtonUp-Qt?: Manjaro Repository
    Additional context

Terminal output

protonup-qt                                                      ✔ 
ProtonUp-Qt 2.9.2 by DavidoTek. Build Info: built from source.
Python 3.11.8 (main, Feb 12 2024, 14:50:05) [GCC 13.2.1 20230801], PySide 6.7.0
Platform: ManjaroLinux 23.1.4 Linux-6.8.7-1-MANJARO-x86_64-with-glibc2.39
Loading locale en / en_US
Loaded ctmod GE-Proton
Loaded ctmod Wine-GE
Loaded ctmod Boxtron
Loaded ctmod D8VK (nightly)
Loaded ctmod Kron4ek Wine-Builds Vanilla
Loaded ctmod Lutris-Wine
Loaded ctmod Luxtorpeda
Loaded ctmod Northstar Proton (Titanfall 2)
Loaded ctmod Proton Tkg
Loaded ctmod Proton Tkg (Wine Master)
Loaded ctmod Roberta
Loaded ctmod Steam-Play-None
Loaded ctmod SteamTinkerLaunch
Loaded ctmod SteamTinkerLaunch-git
Loaded ctmod vkd3d-lutris
Loaded ctmod vkd3d-proton
Loaded ctmod Wine Tkg (Valve Wine Bleeding Edge)
Loaded ctmod Wine Tkg (Wine Master)
Loaded ctmod DXVK
Loaded ctmod DXVK Async
Loaded ctmod DXVK (nightly)
Attribute Qt::AA_ShareOpenGLContexts must be set before QCoreApplication is created.
@robohappy robohappy added the bug Something isn't working label Apr 26, 2024
@DavidoTek
Copy link
Owner

Thanks for reporting.

ProtonUp-Qt currently only loads the 100 newest compatibility tool releases.
Everything that is older than that, is not loaded. GE-Proton 6 happens to be older than the 100 newest releases.

It's probably a good idea to add a Load more button to ProtonUp-Qt now that we got compatibility tools which have above 100 versions.

For now, you need to manually download and install GE-Proton from their releases page: https://github.com/GloriousEggroll/proton-ge-custom/releases
See https://github.com/GloriousEggroll/proton-ge-custom?tab=readme-ov-file#native for an installation guide.


Code References for Developers:

https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases?per_page=100

def fetch_releases(self, count=100):
"""
List available releases
Return Type: str[]
"""
return [release['tag_name'] for release in ghapi_rlcheck(self.rs.get(f'{self.CT_URL}?per_page={str(count)}').json()) if 'tag_name' in release]

@sonic2kk
Copy link
Contributor

Might also make sense to make the default configurable -for now in the config, in future on a settings screen, along with a place to put the API tokens for GitHub/GitLab, which could complement this "load more" feature quite well

@sonic2kk
Copy link
Contributor

sonic2kk commented Apr 26, 2024

Hmm, it seems the maximum that GitHub will return is 100 per page. You have to pass the &page= parameter to get more than this. We pass this parameter for Proton-tkg to fetch a bunch of pages when searching workflow runs, as it is possible all runs on the current page may have failed so we go back through until we get at least one page with one successful run (#237).

If you have jq installed you can test this from the commandline:

## Returns "100"
curl --silent --url "https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases?per_page=100" | jq '. | length'

## Also returns "100"
curl --silent --url "https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases?per_page=200" | jq '. | length'

## Returns "69" currently
curl --silent --url "https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases?per_page=100&page=2" | jq '. | length'

So in order to accommodate this, we would need to add some logic to filter through multiple pages if the count is over 100, which is the GitHub-enforced maximum per page. We would have to calculate how many pages this would correspond to, which I'm sure is easy but my maths skill ends far beyond this point 😅

However before implementing, we should consider something: We have a util method for fetching project releases, aptly named fetch_project_releases. We use this for some ctmods but not others, the ones that don't use it I think had some cases that the current implementation doesn't allow for switching over to just yet, although I can't remember exactly. It may be worth implementing this "pagination functionality" in fetch_project_releases and then focusing on allowing other tools to use this method. This way we have the implementation of this pagination at a higher level and it would work out of the box for all ctmods using fetch_project_releases (which right now is only Kron4ek, Luxtorpeda+Boxtron+Roberta, NorthStar Proton, vkd3dproton+vkd3dlutris, and DXVK+DXVK Async).

EDIT: Having a look again at the code, we probably don't use these functions for the GE-Proton ctmod because, for instance, fetch_project_release_data doesn't parse out checksum, and we validate the checksum when downloading GE-Proton. It should be possible to extend this function to parse out the checksum, if it exists.

@mjcampagna
Copy link

Chiming in to say I would also really like to be able to load more/older versions of Proton. Fingers crossed this will be in a coming update, and I sincerely appreciate your work on ProtonUp-Qt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants