diff options
Diffstat (limited to 'tools/make-frozen.py')
-rwxr-xr-x | tools/make-frozen.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/make-frozen.py b/tools/make-frozen.py index 7c3865cc41..e0c807c4ef 100755 --- a/tools/make-frozen.py +++ b/tools/make-frozen.py @@ -37,17 +37,21 @@ for dirpath, dirnames, filenames in os.walk(root): modules.append((fullpath[root_len + 1:], st)) print("#include <stdint.h>") -print("const uint16_t mp_frozen_sizes[] = {") +print("const char mp_frozen_names[] = {") +for f, st in modules: + m = module_name(f) + print('"%s\\0"' % m) +print('"\\0"};') + +print("const uint32_t mp_frozen_sizes[] = {") for f, st in modules: print("%d," % st.st_size) -print("0};") +print("};") print("const char mp_frozen_content[] = {") for f, st in modules: - m = module_name(f) - print('"%s\\0"' % m) data = open(sys.argv[1] + "/" + f, "rb").read() # Python2 vs Python3 tricks data = repr(data) |