Add support for creating editor icons per module
The functionality is similar to how `doc_classes` are retrieved per module. The build system will search for custom icons path defined per module via `get_icons_path()` method in `config.py` or default icons path. If such paths don't exist, only the editor's own icons will be built. Most module icons were moved from editor/icons to respective modules.
This commit is contained in:
18
SConstruct
18
SConstruct
@ -399,6 +399,7 @@ if selected_platform in platform_list:
|
||||
sys.modules.pop('detect')
|
||||
|
||||
env.module_list = []
|
||||
env.module_icons_paths = []
|
||||
env.doc_class_path = {}
|
||||
|
||||
for x in module_list:
|
||||
@ -421,13 +422,22 @@ if selected_platform in platform_list:
|
||||
if (can_build):
|
||||
config.configure(env)
|
||||
env.module_list.append(x)
|
||||
|
||||
# Get doc classes paths (if present)
|
||||
try:
|
||||
doc_classes = config.get_doc_classes()
|
||||
doc_path = config.get_doc_path()
|
||||
for c in doc_classes:
|
||||
env.doc_class_path[c] = "modules/" + x + "/" + doc_path
|
||||
doc_classes = config.get_doc_classes()
|
||||
doc_path = config.get_doc_path()
|
||||
for c in doc_classes:
|
||||
env.doc_class_path[c] = "modules/" + x + "/" + doc_path
|
||||
except:
|
||||
pass
|
||||
# Get icon paths (if present)
|
||||
try:
|
||||
icons_path = config.get_icons_path()
|
||||
env.module_icons_paths.append("modules/" + x + "/" + icons_path)
|
||||
except:
|
||||
# Default path for module icons
|
||||
env.module_icons_paths.append("modules/" + x + "/" + "icons")
|
||||
|
||||
sys.path.remove(tmppath)
|
||||
sys.modules.pop('config')
|
||||
|
||||
Reference in New Issue
Block a user