Files
Watch-OS/support/header_gen.py
Kazimierz Ciołek f17984820f Initialize git
2026-02-25 01:56:31 +01:00

26 lines
736 B
Python

import os
# Folders to scan
include_dirs = [
"src/apps",
"src/games",
"src/faces"
]
# Output header file
output_file = "src/common/generated_features.h"
with open(output_file, "w") as f:
f.write("// Auto-generated header includes\n// DO NOT EDIT this file\n// It will be overwritten\n")
for directory in include_dirs:
tp = directory.replace("src/", "")
f.write(f"\n// {tp}\n")
for root, dirs, files in os.walk(directory):
for file in files:
if file.endswith(".h"):
rel_path = os.path.join(root, file).replace("\\", "/").replace("src/", "../")
f.write(f'#include "{rel_path}"\n')
print(f"🔄 Generated: {output_file}")