[Export docs] Move docs to platform folders.
This commit is contained in:
parent
27253f3eb2
commit
a5128e71bb
|
@ -54,11 +54,11 @@ jobs:
|
||||||
|
|
||||||
- name: Class reference schema checks
|
- name: Class reference schema checks
|
||||||
run: |
|
run: |
|
||||||
xmllint --noout --schema doc/class.xsd doc/classes/*.xml modules/*/doc_classes/*.xml
|
xmllint --noout --schema doc/class.xsd doc/classes/*.xml modules/*/doc_classes/*.xml platform/*/doc_classes/*.xml
|
||||||
|
|
||||||
- name: Documentation checks
|
- name: Documentation checks
|
||||||
run: |
|
run: |
|
||||||
doc/tools/make_rst.py --dry-run --color doc/classes modules
|
doc/tools/make_rst.py --dry-run --color doc/classes modules platforms
|
||||||
|
|
||||||
- name: Style checks via clang-format (clang_format.sh)
|
- name: Style checks via clang-format (clang_format.sh)
|
||||||
run: |
|
run: |
|
||||||
|
|
12
SConstruct
12
SConstruct
|
@ -66,6 +66,7 @@ if ARGUMENTS.get("target", "editor") == "editor":
|
||||||
platform_list = [] # list of platforms
|
platform_list = [] # list of platforms
|
||||||
platform_opts = {} # options for each platform
|
platform_opts = {} # options for each platform
|
||||||
platform_flags = {} # flags for each platform
|
platform_flags = {} # flags for each platform
|
||||||
|
platform_doc_class_path = {}
|
||||||
|
|
||||||
active_platforms = []
|
active_platforms = []
|
||||||
active_platform_ids = []
|
active_platform_ids = []
|
||||||
|
@ -82,6 +83,15 @@ for x in sorted(glob.glob("platform/*")):
|
||||||
sys.path.insert(0, tmppath)
|
sys.path.insert(0, tmppath)
|
||||||
import detect
|
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"):
|
if os.path.exists(x + "/export/export.cpp"):
|
||||||
platform_exporters.append(x[9:])
|
platform_exporters.append(x[9:])
|
||||||
if os.path.exists(x + "/api/api.cpp"):
|
if os.path.exists(x + "/api/api.cpp"):
|
||||||
|
@ -782,7 +792,7 @@ if selected_platform in platform_list:
|
||||||
modules_enabled = OrderedDict()
|
modules_enabled = OrderedDict()
|
||||||
env.module_dependencies = {}
|
env.module_dependencies = {}
|
||||||
env.module_icons_paths = []
|
env.module_icons_paths = []
|
||||||
env.doc_class_path = {}
|
env.doc_class_path = platform_doc_class_path
|
||||||
|
|
||||||
for name, path in modules_detected.items():
|
for name, path in modules_detected.items():
|
||||||
if not env["module_" + name + "_enabled"]:
|
if not env["module_" + name + "_enabled"]:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
BASEDIR = .
|
BASEDIR = .
|
||||||
CLASSES = "$(BASEDIR)/classes/" "$(BASEDIR)/../modules/"
|
CLASSES = "$(BASEDIR)/classes/" "$(BASEDIR)/../modules/" "$(BASEDIR)/../platform/"
|
||||||
OUTPUTDIR = $(BASEDIR)/_build
|
OUTPUTDIR = $(BASEDIR)/_build
|
||||||
TOOLSDIR = $(BASEDIR)/tools
|
TOOLSDIR = $(BASEDIR)/tools
|
||||||
JSDIR = "$(BASEDIR)/../platform/web"
|
JSDIR = "$(BASEDIR)/../platform/web"
|
||||||
|
|
|
@ -567,7 +567,7 @@ def main() -> None:
|
||||||
if path.endswith("/") or path.endswith("\\"):
|
if path.endswith("/") or path.endswith("\\"):
|
||||||
path = path[:-1]
|
path = path[:-1]
|
||||||
|
|
||||||
if os.path.basename(path) == "modules":
|
if os.path.basename(path) in ["modules", "platform"]:
|
||||||
for subdir, dirs, _ in os.walk(path):
|
for subdir, dirs, _ in os.walk(path):
|
||||||
if "doc_classes" in dirs:
|
if "doc_classes" in dirs:
|
||||||
doc_dir = os.path.join(subdir, "doc_classes")
|
doc_dir = os.path.join(subdir, "doc_classes")
|
||||||
|
|
|
@ -32,6 +32,16 @@ def get_opts():
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def get_doc_classes():
|
||||||
|
return [
|
||||||
|
"EditorExportPlatformAndroid",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def get_doc_path():
|
||||||
|
return "doc_classes"
|
||||||
|
|
||||||
|
|
||||||
# Return the ANDROID_SDK_ROOT environment variable.
|
# Return the ANDROID_SDK_ROOT environment variable.
|
||||||
def get_env_android_sdk_root():
|
def get_env_android_sdk_root():
|
||||||
return os.environ.get("ANDROID_SDK_ROOT", -1)
|
return os.environ.get("ANDROID_SDK_ROOT", -1)
|
||||||
|
|
|
@ -39,6 +39,16 @@ def get_opts():
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def get_doc_classes():
|
||||||
|
return [
|
||||||
|
"EditorExportPlatformIOS",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def get_doc_path():
|
||||||
|
return "doc_classes"
|
||||||
|
|
||||||
|
|
||||||
def get_flags():
|
def get_flags():
|
||||||
return [
|
return [
|
||||||
("arch", "arm64"), # Default for convenience.
|
("arch", "arm64"), # Default for convenience.
|
||||||
|
|
|
@ -56,6 +56,16 @@ def get_opts():
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def get_doc_classes():
|
||||||
|
return [
|
||||||
|
"EditorExportPlatformLinuxBSD",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def get_doc_path():
|
||||||
|
return "doc_classes"
|
||||||
|
|
||||||
|
|
||||||
def get_flags():
|
def get_flags():
|
||||||
return [
|
return [
|
||||||
("arch", detect_arch()),
|
("arch", detect_arch()),
|
||||||
|
|
|
@ -39,6 +39,16 @@ def get_opts():
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def get_doc_classes():
|
||||||
|
return [
|
||||||
|
"EditorExportPlatformMacOS",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def get_doc_path():
|
||||||
|
return "doc_classes"
|
||||||
|
|
||||||
|
|
||||||
def get_flags():
|
def get_flags():
|
||||||
return [
|
return [
|
||||||
("arch", detect_arch()),
|
("arch", detect_arch()),
|
||||||
|
|
|
@ -48,6 +48,16 @@ def get_opts():
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def get_doc_classes():
|
||||||
|
return [
|
||||||
|
"EditorExportPlatformWeb",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def get_doc_path():
|
||||||
|
return "doc_classes"
|
||||||
|
|
||||||
|
|
||||||
def get_flags():
|
def get_flags():
|
||||||
return [
|
return [
|
||||||
("arch", "wasm32"),
|
("arch", "wasm32"),
|
||||||
|
|
|
@ -192,6 +192,16 @@ def get_opts():
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def get_doc_classes():
|
||||||
|
return [
|
||||||
|
"EditorExportPlatformWindows",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def get_doc_path():
|
||||||
|
return "doc_classes"
|
||||||
|
|
||||||
|
|
||||||
def get_flags():
|
def get_flags():
|
||||||
arch = detect_build_env_arch() or detect_arch()
|
arch = detect_build_env_arch() or detect_arch()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue