aboutsummaryrefslogtreecommitdiff
path: root/methods.py
diff options
context:
space:
mode:
authorL. Krause2017-05-25 20:57:13 +0200
committerL. Krause2017-06-27 21:06:26 +0200
commit92367968e7f1416f33eebfa06c60cacf5c757f65 (patch)
tree3aeb61b8e0347446891e11859dd9ae230773b3d7 /methods.py
parent90592ccf03521cda14ee3a9576b671136da2021d (diff)
downloadgodot-92367968e7f1416f33eebfa06c60cacf5c757f65.tar.gz
godot-92367968e7f1416f33eebfa06c60cacf5c757f65.tar.zst
godot-92367968e7f1416f33eebfa06c60cacf5c757f65.zip
Diffstat (limited to 'methods.py')
-rw-r--r--methods.py31
1 files changed, 17 insertions, 14 deletions
diff --git a/methods.py b/methods.py
index 2f9d45897..4d3d5ae34 100644
--- a/methods.py
+++ b/methods.py
@@ -1513,23 +1513,26 @@ def split_lib(self, libname):
def save_active_platforms(apnames, ap):
for x in ap:
- pth = x + "/logo.png"
-# print("open path: "+pth)
- pngf = open(pth, "rb")
- b = pngf.read(1)
- str = " /* AUTOGENERATED FILE, DO NOT EDIT */ \n"
- str += " static const unsigned char _" + x[9:] + "_logo[]={"
- while(len(b) == 1):
- str += hex(ord(b))
+ names = ['logo']
+ if os.path.isfile(x + "/run_icon.png"):
+ names.append('run_icon')
+
+ for name in names:
+ pngf = open(x + "/" + name + ".png", "rb")
b = pngf.read(1)
- if (len(b) == 1):
- str += ","
+ str = " /* AUTOGENERATED FILE, DO NOT EDIT */ \n"
+ str += " static const unsigned char _" + x[9:] + "_" + name + "[]={"
+ while(len(b) == 1):
+ str += hex(ord(b))
+ b = pngf.read(1)
+ if (len(b) == 1):
+ str += ","
- str += "};\n"
+ str += "};\n"
- wf = x + "/logo.gen.h"
- logow = open(wf, "wb")
- logow.write(str)
+ wf = x + "/" + name + ".gen.h"
+ pngw = open(wf, "wb")
+ pngw.write(str)
def no_verbose(sys, env):