mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-23 15:47:06 +02:00
[tools] refactor, use #!/bin/sh, update license files (#3998)
Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3998 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
parent
46cfd9b6f3
commit
9b18d0b111
20 changed files with 51 additions and 61 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# Tools
|
||||
|
||||
Tools for Eden and other subprojects.
|
||||
Tools for Eden and other subprojects. When adding new scripts please use `#!/bin/sh -e` or `#!/usr/bin/env <interpreter>` (for `.py`, `.rb`, or `.perl`). Keep scripts POSIX compliant (i.e not require hard `bash` to run, just plain old `sh`).
|
||||
|
||||
## Third-Party
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#! /bin/sh
|
||||
#!/bin/sh -e
|
||||
|
||||
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/perl
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
#!/usr/bin/env perl
|
||||
|
||||
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Basic script to run dtrace sampling over the program (requires Flamegraph)
|
||||
# Usage is either running as: ./dtrace-tool.sh pid (then input the pid of the process)
|
||||
|
|
|
|||
4
tools/lanczos-gen.pl
Normal file → Executable file
4
tools/lanczos-gen.pl
Normal file → Executable file
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/perl
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
#!/usr/bin/env perl
|
||||
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
use strict;
|
||||
use warnings;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#!/bin/sh
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
#!/bin/sh -e
|
||||
|
||||
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# This script basically allows you to "dirtily" use llvmpipe in any configuration
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
which optipng || exit
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
ANDROID=src/android/app/src/main
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/python3
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
|
@ -212,7 +212,7 @@ def emit_size_check():
|
|||
if type != "void":
|
||||
lines.append(f"static_assert(sizeof({type}) == {size});")
|
||||
|
||||
return "\n".join(lines)
|
||||
return f"\n{lines}"
|
||||
|
||||
|
||||
# Replaces a type with an arch-specific one, if it exists.
|
||||
|
|
@ -423,7 +423,7 @@ def emit_lines(lines, indent=' '):
|
|||
output_lines.append(line)
|
||||
first = False
|
||||
|
||||
return "\n".join(output_lines)
|
||||
return f"\n{output_lines}"
|
||||
|
||||
|
||||
# Emit a C++ function to wrap a guest SVC.
|
||||
|
|
@ -601,7 +601,7 @@ def emit_call(bitness, names, suffix):
|
|||
lines.append(f"{indent}}}")
|
||||
lines.append("}")
|
||||
|
||||
return "\n".join(lines)
|
||||
return f"\n{lines}"
|
||||
|
||||
|
||||
def build_fn_declaration(return_type, name, arguments):
|
||||
|
|
@ -623,7 +623,7 @@ def build_enum_declarations():
|
|||
lines.append(f"{indent}{name} = {hex(imm)},")
|
||||
|
||||
lines.append("};")
|
||||
return "\n".join(lines)
|
||||
return f"\n{lines}"
|
||||
|
||||
|
||||
def main():
|
||||
|
|
@ -665,11 +665,11 @@ def main():
|
|||
with open("src/core/hle/kernel/svc.h", "w") as f:
|
||||
f.write(COPYRIGHT)
|
||||
f.write(PROLOGUE_H)
|
||||
f.write("\n".join(svc_fw_declarations))
|
||||
f.write(f"\n{svc_fw_declarations}")
|
||||
f.write("\n\n")
|
||||
f.write("\n".join(arch_fw_declarations[BIT_32]))
|
||||
f.write(f"\n{arch_fw_declarations[BIT_32]}")
|
||||
f.write("\n\n")
|
||||
f.write("\n".join(arch_fw_declarations[BIT_64]))
|
||||
f.write(f"\n{arch_fw_declarations[BIT_64]}")
|
||||
f.write("\n\n")
|
||||
f.write(enum_decls)
|
||||
f.write(EPILOGUE_H)
|
||||
|
|
@ -679,7 +679,7 @@ def main():
|
|||
f.write(PROLOGUE_CPP)
|
||||
f.write(emit_size_check())
|
||||
f.write("\n\n")
|
||||
f.write("\n\n".join(wrapper_fns))
|
||||
f.write(f"\n\n{wrapper_fns}")
|
||||
f.write("\n\n")
|
||||
f.write(call_32)
|
||||
f.write("\n\n")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#!/bin/sh -e
|
||||
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
SOURCES=$(find src/yuzu src/qt_common -type f \( -name "*.ui" -o -name "*.cpp" -o -name "*.h" -o -name "*.plist" \))
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#!/bin/sh -e
|
||||
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
command -v tx-cli && COMMAND=tx-cli
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
ANDROID=src/android/app/src/main
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/sh
|
||||
#!/bin/sh -e
|
||||
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue