26 lines
736 B
Python
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}")
|