- HandlerMinelayerData: BUILD_RTI Guards für RTI-Abhängigkeiten - svcTabCommon: Export-Header-Fix via Fallback-Target - TrainingAreaBase: Stub-Header für BUILD_RTI=OFF - ddsfts: Include-Pfad und Dependency-Fixes - BUILD_RTI=OFF Compilation vollständig unterstützt Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Entire-Checkpoint: 01M0JNZA586SACX1PRZ2DJAE5S
45 lines
1.2 KiB
Python
45 lines
1.2 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
Fix include paths from <DDS/Core/core_types.h> to <Core/core_types.h>
|
|
"""
|
|
import os
|
|
import re
|
|
from pathlib import Path
|
|
|
|
def fix_file(filepath):
|
|
"""Fix include path in a single file"""
|
|
with open(filepath, 'r', encoding='utf-8', errors='ignore') as f:
|
|
content = f.read()
|
|
|
|
original = content
|
|
# Replace #include <DDS/Core/core_types.h> with #include <Core/core_types.h>
|
|
content = re.sub(
|
|
r'#include\s*<DDS/Core/core_types\.h>',
|
|
'#include <Core/core_types.h>',
|
|
content
|
|
)
|
|
|
|
if content != original:
|
|
with open(filepath, 'w', encoding='utf-8') as f:
|
|
f.write(content)
|
|
return True
|
|
return False
|
|
|
|
def main():
|
|
base_dir = Path('/home/torsten/swy/sandbox/qt-migration-legatus/qt6-after/qt6-migrated-legatus')
|
|
|
|
# Find all C++ files
|
|
patterns = ['**/*.cpp', '**/*.hpp', '**/*.h', '**/*.cc', '**/*.cxx']
|
|
|
|
fixed_count = 0
|
|
for pattern in patterns:
|
|
for filepath in base_dir.glob(pattern):
|
|
if fix_file(filepath):
|
|
print(f"Fixed: {filepath.relative_to(base_dir)}")
|
|
fixed_count += 1
|
|
|
|
print(f"\nTotal files fixed: {fixed_count}")
|
|
|
|
if __name__ == '__main__':
|
|
main()
|