summaryrefslogtreecommitdiffstats
path: root/SConstruct
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-06-19 11:28:22 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-06-20 13:16:37 +0200
commit90446fe9f381eaaa86caed2facc09ee1cf5fb52b (patch)
tree85267ecf27753199491359ba31bbeb00507758be /SConstruct
parentdbe8712d4eda555829283624df7c79faa4bc02ea (diff)
downloadredot-engine-90446fe9f381eaaa86caed2facc09ee1cf5fb52b.tar.gz
SCons: Move platform logo/run icon to `export` folder
Follow-up to #75932. Since these icons are only used by the export plugin, it makes sense to move them and generate the headers there. The whole `detect.is_active()` logic seems to be a leftover from before times, as far back as 1.0-stable it already wasn't used for anything. So I'm removing it and moving the export icon generation to `platform_methods`, where it makes more sense.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct17
1 files changed, 6 insertions, 11 deletions
diff --git a/SConstruct b/SConstruct
index c67ce9fb9f..f65e6bab04 100644
--- a/SConstruct
+++ b/SConstruct
@@ -56,7 +56,7 @@ import methods
import glsl_builders
import gles3_builders
import scu_builders
-from platform_methods import architectures, architecture_aliases
+from platform_methods import architectures, architecture_aliases, generate_export_icons
if ARGUMENTS.get("target", "editor") == "editor":
_helper_module("editor.editor_builders", "editor/editor_builders.py")
@@ -68,9 +68,6 @@ 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 = []
platform_exporters = []
platform_apis = []
@@ -93,13 +90,13 @@ for x in sorted(glob.glob("platform/*")):
except Exception:
pass
+ platform_name = x[9:]
+
if os.path.exists(x + "/export/export.cpp"):
- platform_exporters.append(x[9:])
+ platform_exporters.append(platform_name)
+ generate_export_icons(x, platform_name)
if os.path.exists(x + "/api/api.cpp"):
- platform_apis.append(x[9:])
- if detect.is_active():
- active_platforms.append(detect.get_name())
- active_platform_ids.append(x)
+ platform_apis.append(platform_name)
if detect.can_build():
x = x.replace("platform/", "") # rest of world
x = x.replace("platform\\", "") # win32
@@ -109,8 +106,6 @@ for x in sorted(glob.glob("platform/*")):
sys.path.remove(tmppath)
sys.modules.pop("detect")
-methods.save_active_platforms(active_platforms, active_platform_ids)
-
custom_tools = ["default"]
platform_arg = ARGUMENTS.get("platform", ARGUMENTS.get("p", False))