From a1b027ed524ac2f7f32f271859ef470937c3e508 Mon Sep 17 00:00:00 2001 From: Jcw87 Date: Sun, 22 Jan 2023 00:02:46 -0800 Subject: transform-dep.py: fix for wsl --- tools/transform-dep.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/transform-dep.py b/tools/transform-dep.py index bdb29e5013..412e3bd61d 100755 --- a/tools/transform-dep.py +++ b/tools/transform-dep.py @@ -9,7 +9,9 @@ if os.name != 'nt': winedevices = os.path.join(wineprefix, 'dosdevices') def in_wsl() -> bool: - return 'microsoft-standard' in uname().release + # wsl1 has Microsoft, wsl2 has microsoft-standard + release = uname().release + return 'microsoft-standard' in release or 'Microsoft' in release def import_d_file(in_file) -> str: out_lines = [] @@ -36,8 +38,15 @@ def import_d_file(in_file) -> str: # shortcut for z: path = path[2:].replace('\\', '/') elif in_wsl(): - path = path[0:1] + path[2:] - path = os.path.join('/mnt', path.replace('\\', '/')) + if path.startswith(r'\\wsl'): + # first part could be wsl$ or wsl.localhost + pos = path.find('\\', 2) + pos = path.find('\\', pos + 1) + path = path[pos:] + path = path.replace('\\', '/') + else: + path = path[0:1] + path[2:] + path = os.path.join('/mnt', path.replace('\\', '/')) else: # use $WINEPREFIX/dosdevices to resolve path path = os.path.realpath(os.path.join(winedevices, path.replace('\\', '/'))) -- cgit v1.2.3 From 9237c661cfd0c5ff0c21aafa6e19459f86084ae3 Mon Sep 17 00:00:00 2001 From: Jcw87 Date: Sun, 22 Jan 2023 08:42:10 -0800 Subject: rename mwcceppc_patched.exe to mwcceppc_modded.exe for better windows compatibility --- tools/tp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/tp.py b/tools/tp.py index b268efdd25..a38726f325 100644 --- a/tools/tp.py +++ b/tools/tp.py @@ -247,7 +247,7 @@ def setup(debug: bool, game_path: Path, tools_path: Path): c27_mwcceppc_old = c27.joinpath("mwcceppc.old.exe") c27_mwcceppc_orignal = c27.joinpath("mwcceppc.exe") - c27_mwcceppc_patched = c27.joinpath("mwcceppc_patched.exe") + c27_mwcceppc_patched = c27.joinpath("mwcceppc_modded.exe") def patch_compiler(src: Path, dst: Path, apply: bool): with src.open("rb") as src_file: -- cgit v1.2.3 From 98db45807c609899841224aea0c1b69722139094 Mon Sep 17 00:00:00 2001 From: Jcw87 Date: Sun, 22 Jan 2023 17:36:16 -0800 Subject: makerel.py: Accept arguments from files, allowing rels to build with msys2 --- tools/makerel.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/makerel.py b/tools/makerel.py index 763ce1726d..4ed4fb3050 100644 --- a/tools/makerel.py +++ b/tools/makerel.py @@ -583,5 +583,27 @@ def load_elfs(str_paths): return static, plfs +def convert_arg_line_to_args(arg_line: str): + return arg_line.split(' ') + + +def _read_args_from_files(args: List[str]): + new_args: List[str] = [] + for arg in args: + if not arg or arg[0] != '@': + new_args.append(arg) + else: + with open(arg[1:], 'r') as file: + file_args: List[str] = [] + for line in file: + for file_arg in convert_arg_line_to_args(line.strip()): + file_args.append(file_arg) + file_args = _read_args_from_files(file_args) + new_args.extend(file_args) + + return new_args + + if __name__ == "__main__": - makerel() + args = _read_args_from_files(sys.argv[1:]) + makerel(args) -- cgit v1.2.3 From d17c122e4dbc65f6f0f2b0309e281aeef20c4afc Mon Sep 17 00:00:00 2001 From: hatal175 Date: Tue, 24 Jan 2023 22:22:40 +0200 Subject: Continue robbing prime github dolphin libs blind (#254) * Continue work on dolphin libs * tp.py pull-request should print rels by default --- tools/tp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/tp.py b/tools/tp.py index a38726f325..35ca7bb12a 100644 --- a/tools/tp.py +++ b/tools/tp.py @@ -803,7 +803,7 @@ def remove_unused_asm(check: bool): @click.option("--debug/--no-debug") @click.option( "--rels", - default=False, + default=True, is_flag=True, help="RELs will also be build and checked", ) -- cgit v1.2.3