mirror of https://github.com/PrimeDecomp/prime.git
Windows fixes for download_dtk.py and shasum
Former-commit-id: 89e083cc54
This commit is contained in:
parent
6f994fbe28
commit
c2fdf35ed9
|
@ -1464,7 +1464,7 @@ if __name__ == "__main__":
|
||||||
n.comment("Check DOL hash")
|
n.comment("Check DOL hash")
|
||||||
n.rule(
|
n.rule(
|
||||||
name="check",
|
name="check",
|
||||||
command=ALLOW_CHAIN + "$dtk shasum -c $in && touch $out",
|
command="$dtk shasum -c $in -o $out",
|
||||||
description="CHECK $in",
|
description="CHECK $in",
|
||||||
)
|
)
|
||||||
n.build(
|
n.build(
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
v0.1.0
|
v0.1.1
|
||||||
|
|
|
@ -2,6 +2,7 @@ import argparse
|
||||||
import urllib.request
|
import urllib.request
|
||||||
import os
|
import os
|
||||||
import stat
|
import stat
|
||||||
|
import platform
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
REPO = "https://github.com/encounter/decomp-toolkit"
|
REPO = "https://github.com/encounter/decomp-toolkit"
|
||||||
|
@ -16,18 +17,18 @@ def main():
|
||||||
with open(args.tag_file, "r") as f:
|
with open(args.tag_file, "r") as f:
|
||||||
tag = f.readline().rstrip()
|
tag = f.readline().rstrip()
|
||||||
|
|
||||||
uname = os.uname()
|
uname = platform.uname()
|
||||||
suffix = ""
|
suffix = ""
|
||||||
platform = uname.sysname.lower()
|
system = uname.system.lower()
|
||||||
if platform == "darwin":
|
if system == "darwin":
|
||||||
platform = "macos"
|
system = "macos"
|
||||||
elif platform == "windows":
|
elif system == "windows":
|
||||||
suffix = ".exe"
|
suffix = ".exe"
|
||||||
arch = uname.machine.lower()
|
arch = uname.machine.lower()
|
||||||
if arch == "amd64":
|
if arch == "amd64":
|
||||||
arch = "x86_64"
|
arch = "x86_64"
|
||||||
|
|
||||||
url = f"{REPO}/releases/download/{tag}/dtk-{platform}-{arch}{suffix}"
|
url = f"{REPO}/releases/download/{tag}/dtk-{system}-{arch}{suffix}"
|
||||||
output = args.output
|
output = args.output
|
||||||
# print(f"Downloading {url} to {output}")
|
# print(f"Downloading {url} to {output}")
|
||||||
urllib.request.urlretrieve(url, output)
|
urllib.request.urlretrieve(url, output)
|
||||||
|
|
Loading…
Reference in New Issue