Proton-tkg: Refactor to use download_file
#525
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR refactors the Proton-tkg ctmod to use the
download_file
util function. This is in a similar vein to other PRs that migrate compatibility tools to usingI am eyeing up a larger refactor and cleanup of this ctmod (improved type hinting, reducing code duplication between it and DXVK Nightly following #509, extracting the archive extraction logic into an
__extract
method that each ctmod can implement instead of the Proton-tkg ctmod having to be aware of how to extract all of its child classes, maybe some other fun things in future too!) and this PR is the beginnings of that :-)This PR is opened as a draft as it is largely untested, and I want to make sure it works against all the Proton-tkg ctmods. I tested briefly with the main Proton-tkg Ctmod and it appeared to work, but we have many child ctmods and I want to ensure each download and extract properly :-)
Thanks!