From 5bd47ebff221073ca5c6e445735c8e4bbf0ded62 Mon Sep 17 00:00:00 2001 From: Brett Date: Sun, 15 Jun 2025 14:03:07 -0400 Subject: [PATCH] string embed --- embed_strings.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/embed_strings.py b/embed_strings.py index c713a76..cf9593c 100644 --- a/embed_strings.py +++ b/embed_strings.py @@ -16,7 +16,7 @@ def embed(input_path, output_path, namespace, var_name): f"// Generated from {input_path}\n" f"#pragma once\n\n" f"namespace {safe_namespace_name(namespace)}" "\n{\n" - f"\tstatic constexpr char {safe_var_name(var_name)}_str[] = R\"(\"{contents}\")\";\n""}" + f"\tinline constexpr char {safe_var_name(var_name)}_str[] = R\"(\"{contents}\")\";\n""}" ) os.makedirs(os.path.dirname(output_path), exist_ok=True) with open(output_path.with_suffix(output_path.suffix + ".h"), "w") as f: @@ -26,13 +26,11 @@ def main(input_dir, output_dir): input_path = Path(input_dir) for root, _, files in os.walk(input_dir): - print(f"Root: {root} _: {_} files: {files}") for file in files: - print(f"File: {file}") + print(f"Processing file: %{file}%") file_path = Path(root) / file parent_path = file_path.relative_to(input_dir) - print(f"InputParent: {input_path.parent} Parent: {parent_path}") output_path = Path(output_dir) / parent_path