initial commit, 4.5 stable
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled

This commit is contained in:
2025-09-16 20:46:46 -04:00
commit 9d30169a8d
13378 changed files with 7050105 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
"""Functions used to generate source files during build time"""
import os
import methods
# See also `editor/icons/editor_icons_builders.py`.
def make_default_theme_icons_action(target, source, env):
icons_names = []
icons_raw = []
for src in map(str, source):
with open(src, encoding="utf-8", newline="\n") as file:
icons_raw.append(methods.to_raw_cstring(file.read()))
name = os.path.splitext(os.path.basename(src))[0]
icons_names.append(f'"{name}"')
icons_names_str = ",\n\t".join(icons_names)
icons_raw_str = ",\n\t".join(icons_raw)
with methods.generated_wrapper(str(target[0])) as file:
file.write(f"""\
#include "modules/modules_enabled.gen.h"
inline constexpr int default_theme_icons_count = {len(icons_names)};
inline constexpr const char *default_theme_icons_sources[] = {{
{icons_raw_str}
}};
inline constexpr const char *default_theme_icons_names[] = {{
{icons_names_str}
}};
""")