95b27fe8c7
This change introduces a new EditorThemeManager class to abstract theme generatio and its subroutines. Logic related to EditorTheme, EditorColorMap, and editor icons has been extracted into their respective files with includes cleaned up. All related files have been moved to a separate folder to better scope them in the project. This includes relevant generated files as well.
26 lines
652 B
Python
26 lines
652 B
Python
#!/usr/bin/env python
|
|
|
|
Import("env")
|
|
|
|
import os
|
|
import editor_icons_builders
|
|
|
|
|
|
env["BUILDERS"]["MakeEditorIconsBuilder"] = Builder(
|
|
action=env.Run(editor_icons_builders.make_editor_icons_action, "Generating editor icons header."),
|
|
suffix=".h",
|
|
src_suffix=".svg",
|
|
)
|
|
|
|
# Editor's own icons
|
|
icon_sources = Glob("*.svg")
|
|
|
|
# Module icons
|
|
for path in env.module_icons_paths:
|
|
if not os.path.isabs(path):
|
|
icon_sources += Glob("#" + path + "/*.svg") # Built-in.
|
|
else:
|
|
icon_sources += Glob(path + "/*.svg") # Custom.
|
|
|
|
env.Alias("editor_icons", [env.MakeEditorIconsBuilder("#editor/themes/editor_icons.gen.h", icon_sources)])
|