summaryrefslogtreecommitdiffstats
path: root/SConstruct
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2023-04-19 12:23:22 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2023-04-20 11:02:12 +0300
commita5128e71bbcc57166412a222d65dbb05ed939d1b (patch)
treeb7bbfa8f78262c1a9323c7d707e5e244c2606693 /SConstruct
parent27253f3eb2c78a9ad5114c92eae2036b10e1d7e0 (diff)
downloadredot-engine-a5128e71bbcc57166412a222d65dbb05ed939d1b.tar.gz
[Export docs] Move docs to platform folders.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct12
1 files changed, 11 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index 8b39f120b4..518dcaa05d 100644
--- a/SConstruct
+++ b/SConstruct
@@ -66,6 +66,7 @@ if ARGUMENTS.get("target", "editor") == "editor":
platform_list = [] # list of platforms
platform_opts = {} # options for each platform
platform_flags = {} # flags for each platform
+platform_doc_class_path = {}
active_platforms = []
active_platform_ids = []
@@ -82,6 +83,15 @@ for x in sorted(glob.glob("platform/*")):
sys.path.insert(0, tmppath)
import detect
+ # Get doc classes paths (if present)
+ try:
+ doc_classes = detect.get_doc_classes()
+ doc_path = detect.get_doc_path()
+ for c in doc_classes:
+ platform_doc_class_path[c] = x.replace("\\", "/") + "/" + doc_path
+ except Exception:
+ pass
+
if os.path.exists(x + "/export/export.cpp"):
platform_exporters.append(x[9:])
if os.path.exists(x + "/api/api.cpp"):
@@ -782,7 +792,7 @@ if selected_platform in platform_list:
modules_enabled = OrderedDict()
env.module_dependencies = {}
env.module_icons_paths = []
- env.doc_class_path = {}
+ env.doc_class_path = platform_doc_class_path
for name, path in modules_detected.items():
if not env["module_" + name + "_enabled"]: