summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAndrii Doroshenko (Xrayez) <xrayez@gmail.com>2019-06-28 23:42:26 +0300
committerAndrii Doroshenko (Xrayez) <xrayez@gmail.com>2019-06-28 23:42:26 +0300
commit7c11a1b162f9f1ac5ad8b8e2a879a200b22603d0 (patch)
tree36bb2d3bdfa58727b0279681ab4fb1d3d27f35b0 /SConstruct
parent6e03236574467d6a0c3aca1b0375da59423b0083 (diff)
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.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct18
1 files changed, 14 insertions, 4 deletions
diff --git a/SConstruct b/SConstruct
index a619ea0797..c2524a4a4d 100644
--- a/SConstruct
+++ b/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')