Initialize git
This commit is contained in:
25
support/header_gen.py
Normal file
25
support/header_gen.py
Normal file
@@ -0,0 +1,25 @@
|
||||
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}")
|
||||
Reference in New Issue
Block a user