diff options
author | Thaddeus Crews <repiteo@outlook.com> | 2024-07-31 14:15:56 -0500 |
---|---|---|
committer | Thaddeus Crews <repiteo@outlook.com> | 2024-07-31 14:22:04 -0500 |
commit | 01637056405df47b072bf9b3aee5a34d9dff35e8 (patch) | |
tree | 4052d2fa3f2598564c771199dff9f3d7339c5ea7 /platform | |
parent | 1d57b81d2610f8c104fcead874995a583274d12d (diff) | |
download | redot-engine-01637056405df47b072bf9b3aee5a34d9dff35e8.tar.gz |
SCons: Add method to generate raw cstrings
Diffstat (limited to 'platform')
-rw-r--r-- | platform/SCsub | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/SCsub b/platform/SCsub index b07023efed..cdaa6074ba 100644 --- a/platform/SCsub +++ b/platform/SCsub @@ -15,12 +15,12 @@ def export_icon_builder(target, source, env): src_path = Path(str(source[0])) src_name = src_path.stem platform = src_path.parent.parent.stem - with open(str(source[0]), "rb") as file: - svg = "".join([f"\\{hex(x)[1:]}" for x in file.read()]) + with open(str(source[0]), "r") as file: + svg = file.read() with methods.generated_wrapper(target, prefix=platform) as file: file.write( f"""\ -static const char *_{platform}_{src_name}_svg = "{svg}"; +static const char *_{platform}_{src_name}_svg = {methods.to_raw_cstring(svg)}; """ ) |