2016-10-17 06:50:25 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
2014-05-13 15:10:00 +00:00
|
|
|
Import('env')
|
2018-09-28 11:29:52 +00:00
|
|
|
|
2020-04-04 11:46:15 +00:00
|
|
|
import os
|
|
|
|
|
2018-03-17 22:23:55 +00:00
|
|
|
from platform_methods import run_in_subprocess
|
|
|
|
import editor_icons_builders
|
2016-10-30 18:05:14 +00:00
|
|
|
|
2018-03-17 22:23:55 +00:00
|
|
|
make_editor_icons_builder = Builder(action=run_in_subprocess(editor_icons_builders.make_editor_icons_action),
|
2017-08-19 02:34:09 +00:00
|
|
|
suffix='.h',
|
|
|
|
src_suffix='.svg')
|
2018-03-17 22:23:55 +00:00
|
|
|
|
2016-10-30 17:57:40 +00:00
|
|
|
env['BUILDERS']['MakeEditorIconsBuilder'] = make_editor_icons_builder
|
2019-06-28 20:42:26 +00:00
|
|
|
|
|
|
|
# Editor's own icons
|
|
|
|
icon_sources = Glob("*.svg")
|
|
|
|
|
|
|
|
# Module icons
|
2020-04-04 11:46:15 +00: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 20:42:26 +00:00
|
|
|
|
|
|
|
env.Alias('editor_icons', [env.MakeEditorIconsBuilder('#editor/editor_icons.gen.h', icon_sources)])
|