Skip to content

Commit

Permalink
ulwgl_util: update setup to redownload the runtime files instead of c…
Browse files Browse the repository at this point in the history
…opying

- We no longer store the runtime files in the root directory
  • Loading branch information
R1kaB3rN committed Feb 28, 2024
1 parent df5375d commit 60e095e
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions ULWGL/ulwgl_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,35 +341,14 @@ def _update_ulwgl(
file=stderr,
)

copyfile_tree(
root.joinpath(json_root["ulwgl"]["versions"]["runtime_platform"]),
local.joinpath(json_root["ulwgl"]["versions"]["runtime_platform"]),
)

# _v2-entry-point
local.joinpath("ULWGL").unlink(missing_ok=True)
cp(root.joinpath("ULWGL"), local.joinpath("ULWGL"))

# Auto-generated files
for file in local.glob("run*"):
file.unlink(missing_ok=True)
cp(root.joinpath(file.name), local.joinpath(file.name))
# Download the runtime from the official source
setup_runtime(root, json_root)
elif local.joinpath(runtime).is_dir() and val != runtime:
# Update
print(f"Updating {key} to {val} ...", file=stderr)

rmtree(local.joinpath(runtime).as_posix())
copyfile_tree(
root.joinpath(val),
local.joinpath(val),
)

local.joinpath("ULWGL").unlink(missing_ok=True)
cp(root.joinpath("ULWGL"), local.joinpath("ULWGL"))

for file in local.glob("run*"):
file.unlink(missing_ok=True)
cp(root.joinpath(file.name), local.joinpath(file.name))
setup_runtime(root, json_root)

json_local["ulwgl"]["versions"]["runtime_platform"] = val
elif key == "launcher":
Expand Down

0 comments on commit 60e095e

Please sign in to comment.