summaryrefslogtreecommitdiff
path: root/main/SCsub
diff options
context:
space:
mode:
Diffstat (limited to 'main/SCsub')
-rw-r--r--main/SCsub11
1 files changed, 6 insertions, 5 deletions
diff --git a/main/SCsub b/main/SCsub
index f0ff9e9639..1f97cd1be0 100644
--- a/main/SCsub
+++ b/main/SCsub
@@ -1,6 +1,7 @@
#!/usr/bin/env python
Import('env')
+from compat import byte_to_str
def make_splash(target, source, env):
@@ -8,17 +9,17 @@ def make_splash(target, source, env):
src = source[0].srcnode().abspath
dst = target[0].srcnode().abspath
f = open(src, "rb")
- g = open(dst, "wb")
+ g = open(dst, "w")
buf = f.read()
g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n")
g.write("#ifndef BOOT_SPLASH_H\n")
g.write("#define BOOT_SPLASH_H\n")
- g.write("static const Color boot_splash_bg_color = Color(1,1,1,1);\n");
+ g.write("static const Color boot_splash_bg_color = Color(1,1,1,1);\n")
g.write("static const unsigned char boot_splash_png[] = {\n")
for i in range(len(buf)):
- g.write(str(ord(buf[i])) + ",\n")
+ g.write(byte_to_str(buf[i]) + ",\n")
g.write("};\n")
g.write("#endif")
@@ -28,7 +29,7 @@ def make_app_icon(target, source, env):
src = source[0].srcnode().abspath
dst = target[0].srcnode().abspath
f = open(src, "rb")
- g = open(dst, "wb")
+ g = open(dst, "w")
buf = f.read()
@@ -37,7 +38,7 @@ def make_app_icon(target, source, env):
g.write("#define APP_ICON_H\n")
g.write("static const unsigned char app_icon_png[] = {\n")
for i in range(len(buf)):
- g.write(str(ord(buf[i])) + ",\n")
+ g.write(byte_to_str(buf[i]) + ",\n")
g.write("};\n")
g.write("#endif")