summaryrefslogtreecommitdiff
path: root/tools/setup.py
diff options
context:
space:
mode:
authorAetias <aetias@outlook.com>2024-10-20 15:05:16 +0200
committerAetias <aetias@outlook.com>2024-10-20 15:05:16 +0200
commit105d170b9c65ce0dda997fa28946bc6716526dc3 (patch)
tree719fe2d0795d05c4c51e8ec7828e656a287d8287 /tools/setup.py
parent7a755a1170c14817d3dcd61439633b1878982498 (diff)
Update toolchain setup
Diffstat (limited to 'tools/setup.py')
-rw-r--r--tools/setup.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/tools/setup.py b/tools/setup.py
index ec3c6d6e..2e3508be 100644
--- a/tools/setup.py
+++ b/tools/setup.py
@@ -2,25 +2,25 @@ import requests
import zipfile
import io
from pathlib import Path
-import shutil
import platform
DSD_VERSION = 'v0.2.0'
tools_path = Path(__file__).parent
-deps_path = tools_path / 'deps'
-if not deps_path.exists(): deps_path.mkdir()
root_path = tools_path.parent
-exe_extension = ''
-match platform.system():
- case 'Windows': system = 'windows'; exe_extension = '.exe'
- case 'Linux': system = 'linux'
- case system:
- print(f'Unknown system "{system}"')
- exit(1)
+EXE = ""
+system = platform.system()
+if system == "Windows" or system.startswith("MSYS") or system.startswith("MINGW"):
+ system = "windows"
+ EXE = ".exe"
+elif system == "Linux":
+ system = "linux"
+else:
+ print(f"Unknown system '{system}'")
+ exit(1)
match platform.machine().lower():
case 'amd64' | 'x86_64': machine = 'x86_64'
case machine:
@@ -29,13 +29,13 @@ match platform.machine().lower():
print('\nInstalling dsd...')
-response = requests.get(f'https://github.com/AetiasHax/ds-decomp/releases/download/{DSD_VERSION}/dsd-{system}-{machine}{exe_extension}')
-with open(root_path / f'dsd{exe_extension}', 'wb') as f:
+response = requests.get(f'https://github.com/AetiasHax/ds-decomp/releases/download/{DSD_VERSION}/dsd-{system}-{machine}{EXE}')
+with open(root_path / f'dsd{EXE}', 'wb') as f:
f.write(response.content)
print('\nInstalling toolchain...')
-response = requests.get('http://decomp.aetias.com/mwccarm.zip')
+response = requests.get('http://decomp.aetias.com/files/mwccarm.zip')
zip_file = zipfile.ZipFile(io.BytesIO(response.content))
zip_file.extractall(tools_path)