diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-06-28 07:51:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-28 07:51:36 +0200 |
commit | f59430beef2fa0d34670b4533167f03018454b00 (patch) | |
tree | a15ad2c9dd78cf3d00cbe55ae187d9e12924f1d3 /methods.py | |
parent | 7fad30fb9ab0ea19d67b2640668cbb88ebb1747c (diff) | |
parent | a2fd89bbe20d95bffe57c331bd43aff947c55d5e (diff) | |
download | redot-engine-f59430beef2fa0d34670b4533167f03018454b00.tar.gz |
Merge pull request #9419 from eska014/native-run
Subtle native-run buttons
Diffstat (limited to 'methods.py')
-rw-r--r-- | methods.py | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/methods.py b/methods.py index 2f9d45897e..4d3d5ae343 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)) - b = pngf.read(1) - if (len(b) == 1): - str += "," - - str += "};\n" + names = ['logo'] + if os.path.isfile(x + "/run_icon.png"): + names.append('run_icon') - wf = x + "/logo.gen.h" - logow = open(wf, "wb") - logow.write(str) + for name in names: + pngf = open(x + "/" + name + ".png", "rb") + b = pngf.read(1) + 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" + + wf = x + "/" + name + ".gen.h" + pngw = open(wf, "wb") + pngw.write(str) def no_verbose(sys, env): |