Files
qt-migration-legatus/qt5-before/dlbo/Lts/Services/CamelCaseFiles_to_lower_case.sh
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

105 lines
2.7 KiB
Bash
Executable File

#!/bin/bash
#
# @RDE_HEADER@
# $Id$
# $HeadURL$
# $Author$
#
directory=""
source_dir=""
echo "source_dir = ${source_dir}"
usage()
{
echo "usage: $0 -d <directory> -b <base-dir>"
echo " -d <directory> : Directory in which the files & include-stmts should be renamed"
echo " -b <base-directory> : source-Directory that will be used for find&replace include-stmts"
}
while getopts "d:b:" opt "$@"; do
case $opt in
d)
directory=$OPTARG
;;
b)
source_dir=$OPTARG
;;
\?)
echo "Invalid option: -$OPTARG"
usage
exit 1
;;
:)
echo "Option -$OPTARG requires an argument."
usage
exit 1
;;
esac
done
if [ -z $directory ]; then
echo "Parameter -d is required"
usage
exit 1
fi
if [ -z $source_dir ]; then
echo "Parameter -b is required"
usage
exit 1
fi
echo "Change to directory: ${directory} "
cd ${directory}
file_list=`find . -name '*.cpp' -printf "%f\n" `
file_list+=" "
file_list+=`find . -name '*.xpm' -printf "%f\n" `
changed_file_list=""
for old_file in ${file_list}; do
first_file=$( echo ${old_file} | sed -r 's#(^[A-Z])#\l\1#')
echo "first: ${first_file}"
new_file=$( echo ${first_file} | sed -r 's#([A-Z])#_\l\1#g')
if [ ${old_file} != ${new_file} ]; then
changed_file_list+=" ${new_file} "
echo "-> Rename file ${old_file} to ${new_file}"
svn mv ${old_file} ${new_file}
#mv ${old_file} ${new_file}
fi
done
echo "changed_file_list = ${changed_file_list}"
h_file_list=""
for old_file in `find . -name '*.h' -printf "%f\n" `; do
first_file=$( echo ${old_file} | sed -r 's#(^[A-Z])#\l\1#')
new_file=$( echo ${first_file} | sed -r 's#([A-Z])#_\l\1#g')
if [ ${old_file} != ${new_file} ]; then
# Escape the '.' in the variable old_file & new_file
esc_old_file=$(echo ${old_file} | sed -e 's/[]\/$*.^|[]/\\&/g')
esc_new_file=$(echo ${new_file} | sed -e 's/[]\/$*.^|[]/\\&/g')
find ${source_dir} -name "*.cpp*" -exec grep -l "#include" {} \; | xargs sed -i "s/${esc_old_file}/${esc_new_file}/"
find ${source_dir} -name "*.h*" -exec grep -l "#include" {} \; | xargs sed -i "s/${esc_old_file}/${esc_new_file}/"
find ${source_dir} -name "*.py" -exec grep -l "#include" {} \; | xargs sed -i "s/${esc_old_file}/${esc_new_file}/"
#find ${source_dir} -name "*.h" | xargs sed -i "s/${old_file}/${new_file}/"
#grep -Rl "#include" ${source_dir}/*.h | xargs sed -i "s/${old_file}/${new_file}/"
#echo "grep -l "#include" *.cpp | xargs sed -i 's/${old_file}/${new_file}/'"
h_file_list+=" ${new_file} "
echo "-> Rename file ${old_file} to ${new_file}"
svn mv ${old_file} ${new_file}
#mv ${old_file} ${new_file}
fi
done
echo "h_file_list = ${h_file_list}"