2016-10-17 14:50:25 +08:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
2020-03-30 14:28:32 +08:00
|
|
|
Import("env")
|
2018-09-28 19:29:52 +08:00
|
|
|
|
2020-03-09 00:34:09 +08:00
|
|
|
import os
|
|
|
|
|
2018-03-18 06:23:55 +08:00
|
|
|
import editor_icons_builders
|
2016-10-31 02:05:14 +08:00
|
|
|
|
2018-03-18 06:23:55 +08:00
|
|
|
|
2020-07-28 02:00:26 +08:00
|
|
|
env["BUILDERS"]["MakeEditorIconsBuilder"] = Builder(
|
|
|
|
action=env.Run(editor_icons_builders.make_editor_icons_action, "Generating editor icons header."),
|
|
|
|
suffix=".h",
|
|
|
|
src_suffix=".svg",
|
|
|
|
)
|
2019-06-29 04:42:26 +08:00
|
|
|
|
|
|
|
# Editor's own icons
|
|
|
|
icon_sources = Glob("*.svg")
|
|
|
|
|
|
|
|
# Module icons
|
2020-03-09 00:34:09 +08: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-29 04:42:26 +08:00
|
|
|
|
2020-03-30 14:28:32 +08:00
|
|
|
env.Alias("editor_icons", [env.MakeEditorIconsBuilder("#editor/editor_icons.gen.h", icon_sources)])
|