mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
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.
This commit is contained in:
parent
dbe8712d4e
commit
90446fe9f3
29 changed files with 48 additions and 78 deletions
27
methods.py
27
methods.py
|
@ -559,33 +559,6 @@ def use_windows_spawn_fix(self, platform=None):
|
|||
self["SPAWN"] = mySpawn
|
||||
|
||||
|
||||
def save_active_platforms(apnames, ap):
|
||||
for x in ap:
|
||||
svg_names = []
|
||||
if os.path.isfile(x + "/logo.svg"):
|
||||
svg_names.append("logo")
|
||||
if os.path.isfile(x + "/run_icon.svg"):
|
||||
svg_names.append("run_icon")
|
||||
|
||||
for name in svg_names:
|
||||
svgf = open(x + "/" + name + ".svg", "rb")
|
||||
b = svgf.read(1)
|
||||
svg_str = " /* AUTOGENERATED FILE, DO NOT EDIT */ \n"
|
||||
svg_str += " static const char *_" + x[9:] + "_" + name + '_svg = "'
|
||||
while len(b) == 1:
|
||||
svg_str += "\\" + hex(ord(b))[1:]
|
||||
b = svgf.read(1)
|
||||
|
||||
svg_str += '";\n'
|
||||
|
||||
svgf.close()
|
||||
|
||||
# NOTE: It is safe to generate this file here, since this is still executed serially
|
||||
wf = x + "/" + name + "_svg.gen.h"
|
||||
with open(wf, "w") as svgw:
|
||||
svgw.write(svg_str)
|
||||
|
||||
|
||||
def no_verbose(sys, env):
|
||||
colors = {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue