mirror of
https://github.com/godotengine/godot.git
synced 2024-12-03 09:32:11 +00:00
d86de6c98e
A new `env.Run` method is added which allows to control the verbosity of builders output automatically depending on whether the "verbose" option is set. It also allows to optionally run any SCons commands in a subprocess using the existing `run_in_subprocess` method, unifying the interface. `Action` objects wrap all builder functions to include a short build message associated with any action. Notably, this removes quite verbose output generated by `make_doc_header` and `make_editor_icons_action` builders.
27 lines
646 B
Python
27 lines
646 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/editor_icons.gen.h", icon_sources)])
|