Files
qt-migration-legatus/qt5-before/dlbo/qav/createPrqaXmls200.py
T
torstenandCopilot 7173785915 Qt6 Migration: Complete migration with DDS/RTI support and build validation
Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list

Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF

Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
  - Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
  - Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)

Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified

Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-15 18:20:26 +00:00

123 lines
6.4 KiB
Python
Executable File

import fileinput
import glob
import inspect
import os
import shutil
import subprocess
import sys
import ntpath
# acf, vcf, qcf gibt es nicht mehr
def createPrqaProjectXML (qafProjectXML, cctfileCpp, cctfileC, includeOptionSyntax, defineOptionSyntax, excludedSourceDirs, buildRoot, qafConfigFolder):
print( "######################################################")
print( "## CREATE PROJECT XML FILE AT " + qafProjectXML)
print( "######################################################")
if os.path.isfile(qafProjectXML):
os.remove(qafProjectXML)
qafProjectXML = open( qafProjectXML, "w")
qafProjectXML.write( "<?xml version='1.0' encoding='UTF-8'?>\n")
qafProjectXML.write( "<prqaproject xmlversion=\"2.1.0\" qafversion=\"2.1.1\">\n")
qafProjectXML.write( " <!-- Config file information... -->\n")
qafProjectXML.write( " <configuration>\n")
qafProjectXML.write( " <root_paths>\n")
qafProjectXML.write( ' <root_path path="${PROJECT_ROOT}" name="SOURCE_ROOT"/>\n')
qafProjectXML.write( " </root_paths> \n")
qafProjectXML.write( " <languageFamily name=\"C_CPP\"/>\n")
qafProjectXML.write( " <baselinedSourceRoot baseline=\"OFF\"/>\n")
qafProjectXML.write( " <baselineSnapshot id=\"\" name=\"\" date=\"\"/>\n")
qafProjectXML.write( " <processMonitor>\n")
qafProjectXML.write( " <includeOptionSyntax>\n")
for includeOptionItem in includeOptionSyntax: ### VARIABLE FOREACH
qafProjectXML.write( " <option string=\""+includeOptionItem+"\"/>\n")
qafProjectXML.write( " </includeOptionSyntax>\n")
qafProjectXML.write( " <defineOptionSyntax>\n")
for defineOptionItem in defineOptionSyntax: ### VARIABLE FOREACH
qafProjectXML.write( " <option string=\""+defineOptionItem+"\"/>\n")
qafProjectXML.write( " </defineOptionSyntax>\n")
qafProjectXML.write( " <settingsOptionSyntax>\n")
qafProjectXML.write( " <option compiler=\"Visual Studio\" string=\"@\" quotes_escaped=\"yes\" extension=\"rsp\"/>\n")
qafProjectXML.write( " <option compiler=\"Windriver\" string=\" -@\" quotes_escaped=\"yes\" extension=\"\"/>\n")
qafProjectXML.write( " <option compiler=\"Greenhills\" string=\"--Via\" quotes_escaped=\"yes\" extension=\"__i\"/>\n")
qafProjectXML.write( " </settingsOptionSyntax>\n")
qafProjectXML.write( " <excludeStrings/>\n")
if len(excludedSourceDirs):
qafProjectXML.write( " <fileFilterStrings>\n")
for excludedSourceItem in excludedSourceDirs: ### VARIABLE FOREACH
qafProjectXML.write( " <option string=\""+excludedSourceItem+"\"/>\n")
qafProjectXML.write( " </fileFilterStrings>\n")
else:
qafProjectXML.write( " <fileFilterStrings/>\n")
qafProjectXML.write( " </processMonitor>\n")
qafProjectXML.write( " <suppressIncludes active=\"yes\"/>\n")
qafProjectXML.write( ' <acf name="project.acf"/>\n')
qafProjectXML.write( ' <rcf name="project.rcf"/>\n')
qafProjectXML.write( " <ccts>\n")
qafProjectXML.write( " <cct target=\"C\" active=\"yes\" name=\""+ntpath.basename(cctfileC)+"\"/>\n") ### VARIABLE
qafProjectXML.write( " <cct target=\"C++\" active=\"yes\" name=\""+ntpath.basename(cctfileCpp)+"\"/>\n") ### VARIABLE
qafProjectXML.write( " </ccts>\n")
qafProjectXML.write( ' <messages name="%s"/>\n' % os.path.join(qafConfigFolder, 'user_library/user_messages/messages.xml' ))
qafProjectXML.write( " </configuration>\n")
qafProjectXML.write( " <!-- Mapping of extension to target_language... -->\n")
qafProjectXML.write( " <file_extensions>\n")
qafProjectXML.write( " <language target=\"C\">\n")
qafProjectXML.write( " <extension ext=\".c\"/>\n")
qafProjectXML.write( " </language>\n")
qafProjectXML.write( " <language target=\"C\">\n")
qafProjectXML.write( " <extension ext=\".C\"/>\n")
qafProjectXML.write( " </language>\n")
qafProjectXML.write( " <language target=\"C++\">\n")
qafProjectXML.write( " <extension ext=\".cpp\"/>\n")
qafProjectXML.write( " </language>\n")
qafProjectXML.write( " <language target=\"C++\">\n")
qafProjectXML.write( " <extension ext=\".cxx\"/>\n")
qafProjectXML.write( " </language>\n")
qafProjectXML.write( " <language target=\"C++\">\n")
qafProjectXML.write( " <extension ext=\".cc\"/>\n")
qafProjectXML.write( " </language>\n")
qafProjectXML.write( " <language target=\"C++\">\n")
qafProjectXML.write( " <extension ext=\".CPP\"/>\n")
qafProjectXML.write( " </language>\n")
qafProjectXML.write( " <language target=\"C++\">\n")
qafProjectXML.write( " <extension ext=\".CXX\"/>\n")
qafProjectXML.write( " </language>\n")
qafProjectXML.write( " <language target=\"C++\">\n")
qafProjectXML.write( " <extension ext=\".CC\"/>\n")
qafProjectXML.write( " </language>\n")
qafProjectXML.write( " </file_extensions>\n")
qafProjectXML.write( " <!-- Files in project... -->\n")
qafProjectXML.write( " <files>\n")
qafProjectXML.write( " <!-- Explicit files... -->\n")
qafProjectXML.write( " </files>\n")
qafProjectXML.write( "</prqaproject>\n")
def createACF(acfFile, additionalIncludeDirs, excludedIncludeDirs, analysisDefinitions):
print( "######################################################")
print( "## CREATE ACF FILE AT " + acfFile)
print( "######################################################")
if os.path.isfile(acfFile):
os.remove(acfFile)
acfFileWrite = open( acfFile, "w")
acfFileWrite.write( '<?xml version="1.0" encoding="UTF-8"?>\n')
acfFileWrite.write( '<acf xmlversion="2.0.0">\n')
acfFileWrite.write( ' <components>\n')
acfFileWrite.write( ' <component version="9.1.1" target="C" name="qac"/>\n')
acfFileWrite.write( ' <component version="4.1.0" target="C++" name="qacpp"/>\n')
acfFileWrite.write( ' </components>\n')
acfFileWrite.write( ' <component_settings>\n')
acfFileWrite.write( ' <input_to version="4.1.0" target="C++" component="qacpp">\n')
for additionalIncludeItem in additionalIncludeDirs:
acfFileWrite.write( ' <option argument="' + additionalIncludeItem + '" name="-i"/>\n')
for excludedIncludeItem in excludedIncludeDirs:
acfFileWrite.write( ' <option argument="' + excludedIncludeItem + '" name="-quiet"/>\n')
for analysisDefinitionItem in analysisDefinitions:
acfFileWrite.write( ' <option argument="' + analysisDefinitionItem + '" name="-d"/>\n')
acfFileWrite.write( ' </input_to>\n')
acfFileWrite.write( ' </component_settings>\n')
acfFileWrite.write( '</acf>\n')
acfFileWrite.close()