From 392c49d61fec199605c9cff6e1e2975660e1b846 Mon Sep 17 00:00:00 2001 From: hachem Date: Sun, 6 Sep 2026 06:21:52 +0200 Subject: feat: migrate over to meson --- tools/copy_files.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 tools/copy_files.py (limited to 'tools/copy_files.py') diff --git a/tools/copy_files.py b/tools/copy_files.py new file mode 100644 index 0000000..8ea67a9 --- /dev/null +++ b/tools/copy_files.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python3 +# copy_files.py STAMP DEST SRC [SRC ...] +# +# Copy each SRC next to the built executable (DEST) and touch STAMP so Meson can +# track the custom_target. Used to stage the LLDB/Python runtime DLLs beside +# hsdbg.exe on Windows, mirroring the old premake postbuild copies. + +import os +import shutil +import sys + + +def main(argv): + if len(argv) < 3: + sys.stderr.write("usage: copy_files.py STAMP DEST SRC [SRC ...]\n") + return 1 + + stamp, dest = argv[1], argv[2] + os.makedirs(dest, exist_ok=True) + + for src in argv[3:]: + if os.path.isfile(src): + shutil.copy2(src, dest) + else: + sys.stderr.write(f"warning: {src} not found, skipping\n") + + with open(stamp, "w") as handle: + handle.write("") + + return 0 + + +if __name__ == "__main__": + sys.exit(main(sys.argv)) -- cgit v1.3