summaryrefslogtreecommitdiff
path: root/scripts/create_empty_assets.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/create_empty_assets.py')
-rw-r--r--scripts/create_empty_assets.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/create_empty_assets.py b/scripts/create_empty_assets.py
new file mode 100644
index 0000000..fbc2d11
--- /dev/null
+++ b/scripts/create_empty_assets.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python3
+"""
+Create an empty embedded_assets.h file for compatibility.
+Usage: python create_empty_assets.py <output.h>
+"""
+import sys
+
+if __name__ == '__main__':
+ if len(sys.argv) < 2:
+ print('Usage: python create_empty_assets.py <output.h>')
+ sys.exit(1)
+
+ output_file = sys.argv[1]
+
+ with open(output_file, 'w') as f:
+ f.write('#ifndef EMBEDDED_ASSETS_H\n')
+ f.write('#define EMBEDDED_ASSETS_H\n')
+ f.write('/* No assets to embed */\n')
+ f.write('typedef struct { const char* name; const unsigned char* data; unsigned int size; } EmbeddedAsset;\n')
+ f.write('static const EmbeddedAsset embedded_assets[] = {};\n')
+ f.write('static const int embedded_asset_count = 0;\n')
+ f.write('#endif\n')
+
+ print(f'Created empty {output_file}')