2016-10-17 08:50:25 +02:00
|
|
|
#!/usr/bin/env python
|
2024-06-11 22:19:07 +02:00
|
|
|
from misc.utility.scons_hints import *
|
2016-10-17 08:50:25 +02:00
|
|
|
|
2020-03-30 08:28:32 +02:00
|
|
|
Import("env")
|
2018-09-28 13:29:52 +02:00
|
|
|
|
2020-03-08 17:34:09 +01:00
|
|
|
import os
|
2016-10-30 19:05:14 +01:00
|
|
|
|
2024-05-21 15:14:59 +02:00
|
|
|
import editor_icons_builders
|
2018-03-17 23:23:55 +01:00
|
|
|
|
2020-07-27 20:00:26 +02:00
|
|
|
env["BUILDERS"]["MakeEditorIconsBuilder"] = Builder(
|
2023-11-20 21:31:56 +01:00
|
|
|
action=env.Run(editor_icons_builders.make_editor_icons_action),
|
2020-07-27 20:00:26 +02:00
|
|
|
suffix=".h",
|
|
|
|
src_suffix=".svg",
|
|
|
|
)
|
2019-06-28 22:42:26 +02:00
|
|
|
|
|
|
|
# Editor's own icons
|
|
|
|
icon_sources = Glob("*.svg")
|
|
|
|
|
|
|
|
# Module icons
|
2020-03-08 17:34:09 +01:00
|
|
|
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.
|
2019-06-28 22:42:26 +02:00
|
|
|
|
2024-01-15 13:14:55 +01:00
|
|
|
env.Alias("editor_icons", [env.MakeEditorIconsBuilder("#editor/themes/editor_icons.gen.h", icon_sources)])
|