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

Add download functionality to ulwgl_run #30

Merged
merged 36 commits into from
Feb 18, 2024
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
d1c24b1
Add download functionality to ulwgl_run
R1kaB3rN Feb 15, 2024
9a116c6
ulwgl_dl_util: fix bug when referring to cache for latest
R1kaB3rN Feb 15, 2024
621b6c1
ulwgl_dl_util: prefer joining Paths
R1kaB3rN Feb 15, 2024
2512cdc
ulwgl_dl_util: add post cleanup routine
R1kaB3rN Feb 16, 2024
ba54f16
ulwgl_dl_util: handle interrupts whenever extracting
R1kaB3rN Feb 16, 2024
08d1820
ulwgl_dl_util: handle connection timeout
R1kaB3rN Feb 16, 2024
f64b473
ulwgl_dl_util: move steamcompat to func
R1kaB3rN Feb 16, 2024
fbb6028
ulwgl_dl_util: move cache to func
R1kaB3rN Feb 16, 2024
e3563cb
ulwgl_dl_util: move cache to func
R1kaB3rN Feb 16, 2024
4691e26
ulwgl_dl_util: move download to func
R1kaB3rN Feb 16, 2024
f24dbc8
ulwgl_dl_util: print on extraction complete
R1kaB3rN Feb 16, 2024
05d7f4d
ulwgl_dl_util: move var inside block
R1kaB3rN Feb 16, 2024
9de0628
ulwgl_run: only import the func
R1kaB3rN Feb 16, 2024
f6aa2f3
ulwgl_dl_util: update comment
R1kaB3rN Feb 16, 2024
d457847
ulwgl_test: update tests for new usage
R1kaB3rN Feb 16, 2024
ecde7f6
ulwgl_dl_util: prefer using stdlib than requests module for network
R1kaB3rN Feb 17, 2024
83a59dc
ulwgl_dl_util: refactor _get_from_cache
R1kaB3rN Feb 17, 2024
3a5b4b1
ulwgl_dl_util: prefer joining paths
R1kaB3rN Feb 17, 2024
3e5e1e1
ulwgl_dl_util: delete references to requests module
R1kaB3rN Feb 17, 2024
744cedc
ulwgl_dl_util: be smarter about imports
R1kaB3rN Feb 17, 2024
71eaff0
ulwgl_dl_util: change GE-Proton -> ULWGL-Proton
R1kaB3rN Feb 17, 2024
9f2de76
ulwgl_dl_util: prefer creating a var for the Proton dir
R1kaB3rN Feb 17, 2024
f666c8f
ulwgl_run: change error msg
R1kaB3rN Feb 17, 2024
679cbff
ulwgl_dl_util: format
R1kaB3rN Feb 17, 2024
3c0534e
ulwgl_test: add test when extracting files
R1kaB3rN Feb 17, 2024
ae6d567
ulwgl_test: add test when removing files
R1kaB3rN Feb 17, 2024
9a425dd
ulwgl_test: update test when removing files
R1kaB3rN Feb 17, 2024
88a47e3
ulwgl_dl_util: fix bug when referencing old Proton from cache
R1kaB3rN Feb 18, 2024
15c483e
ulwgl_test: add tests for steam compat
R1kaB3rN Feb 18, 2024
63fba6c
ulwgl_test: add tests for cache
R1kaB3rN Feb 18, 2024
dfa8f97
ulwgl_test: update test when interrupting cache extraction
R1kaB3rN Feb 18, 2024
8f6d383
ulwgl_test: add tests for when retrieving latest Proton release
R1kaB3rN Feb 18, 2024
5e23219
ulwgl_dl_util: fix bug when printing tarball in cache
R1kaB3rN Feb 18, 2024
811ea0a
ulwgl_dl_util: add types to _cleanup
R1kaB3rN Feb 18, 2024
6423572
ulwgl_dl_util: update comments
R1kaB3rN Feb 18, 2024
45d8ce3
ulwgl_dl_util: update types
R1kaB3rN Feb 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ulwgl_dl_util: change GE-Proton -> ULWGL-Proton
R1kaB3rN committed Feb 17, 2024

Verified

This commit was signed with the committer’s verified signature.
commit 71eaff0ca52fa7f4a5cf6e9df7d2190509c23bc2
10 changes: 6 additions & 4 deletions ulwgl_dl_util.py
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ def _fetch_releases() -> List[Tuple[str, str]]:

conn.request(
"GET",
"/repos/GloriousEggroll/proton-ge-custom/releases",
"/repos/Open-Wine-Components/ULWGL-Proton/releases",
headers={
"Accept": "application/vnd.github+json",
"X-GitHub-Api-Version": "2022-11-28",
@@ -88,7 +88,7 @@ def _fetch_releases() -> List[Tuple[str, str]]:
asset["name"].endswith("sum")
or (
asset["name"].endswith("tar.gz")
and asset["name"].startswith("GE-Proton")
and asset["name"].startswith("ULWGL-Proton")
)
)
and "browser_download_url" in asset
@@ -164,14 +164,16 @@ def _get_from_steamcompat(
) -> Dict[str, str]:
"""Refer to Steam compat folder for any existing Proton directories."""
for proton in steam_compat.glob("GE-Proton*"):

for proton in steam_compat.glob("ULWGL-Proton*"):
print(f"{proton.name} found in: {steam_compat.as_posix()}")
environ["PROTONPATH"] = proton.as_posix()
env["PROTONPATH"] = environ["PROTONPATH"]

# Notify the user that they're not using the latest
if len(files) == 2 and proton.name != files[1][0][: files[1][0].find(".")]:
print(
"GE-Proton is outdated and requires manual intervention.\nFor latest release, please download "
"ULWGL-Proton is outdated.\nFor latest release, please download "
+ files[1][1]
)

@@ -194,7 +196,7 @@ def _get_from_cache(
path: Path = None
name: str = ""

for tarball in cache.glob("GE-Proton*.tar.gz"):
for tarball in cache.glob("ULWGL-Proton*.tar.gz"):
if files and tarball == cache.joinpath(files[1][0]) and use_latest:
path = tarball
name = tarball.name