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>
139 lines
3.4 KiB
C++
139 lines
3.4 KiB
C++
#include <LtsAppDescriptor/lts_app_descriptor.h>
|
|
|
|
#include <QCoreApplication>
|
|
#include <QFile>
|
|
#include <QFileInfoList>
|
|
#include <QDirIterator>
|
|
#include <QTextStream>
|
|
#include <QRegularExpression>
|
|
#include <QRegularExpressionMatch>
|
|
|
|
#include <cstdio>
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QCoreApplication a(argc, argv);
|
|
|
|
const QStringList args(a.arguments());
|
|
|
|
if (args.count() != 3)
|
|
{
|
|
printf("usage: %s <current source directory> <apps.json>\n", args.at(0).toStdString().c_str());
|
|
return -1;
|
|
}
|
|
|
|
const QString currentSrcDir(a.arguments().at(1));
|
|
|
|
const QString appsJsonFilePath(QStringLiteral("%1/%2").arg(currentSrcDir, a.arguments().at(2)));
|
|
QFile f(appsJsonFilePath);
|
|
|
|
if (!f.open(QFile::ReadOnly))
|
|
{
|
|
printf("LtsAppDescriptorChecker: cannot open apps.json at %s: %s\n", appsJsonFilePath.toStdString().c_str(), f.errorString().toStdString().c_str());
|
|
return -2;
|
|
}
|
|
|
|
printf("LtsAppDescriptorChecker: checking %s\n", appsJsonFilePath.toStdString().c_str());
|
|
|
|
QStringList lastErrors;
|
|
QStringList dummy1;
|
|
QString dummy2;
|
|
LtsAppDescriptor::AppDescriptionVector adv = LtsAppDescriptor::LtsAppDescriptor::getAppDescriptionVector(f.readAll(), lastErrors, dummy1, dummy2);
|
|
|
|
if (!lastErrors.isEmpty())
|
|
{
|
|
printf("LtsAppDescriptorChecker: apps.json at %s invalid:\n%s\n", appsJsonFilePath.toStdString().c_str(), lastErrors.join(QStringLiteral("\r\n\r\n")).toStdString().c_str());
|
|
return 1;
|
|
}
|
|
|
|
|
|
// looking for gui plugins
|
|
QFileInfoList guiPluginFiles;
|
|
QDirIterator it(QStringLiteral("%1/../../Plugins/").arg(currentSrcDir), QDirIterator::Subdirectories);
|
|
|
|
while (it.hasNext())
|
|
{
|
|
QString filename(it.next());
|
|
QFileInfo file(filename);
|
|
|
|
if (file.isDir())
|
|
continue;
|
|
|
|
if (file.fileName().endsWith(QStringLiteral("_gui_plugin.h"), Qt::CaseInsensitive))
|
|
guiPluginFiles.append(file);
|
|
}
|
|
|
|
QStringList filenames;
|
|
filenames.reserve(guiPluginFiles.size());
|
|
for (const QFileInfo &fi : qAsConst(guiPluginFiles))
|
|
{
|
|
filenames += fi.absoluteFilePath();
|
|
}
|
|
|
|
|
|
QStringList guiPluginIIDs;
|
|
for (const QFileInfo &fi : qAsConst(guiPluginFiles))
|
|
{
|
|
QFile f2(fi.absoluteFilePath());
|
|
|
|
if (!f2.open(QFile::ReadOnly))
|
|
continue;
|
|
|
|
QTextStream ts(&f2);
|
|
while (!ts.atEnd())
|
|
{
|
|
QString line(ts.readLine().trimmed().simplified());
|
|
static QString iidIdentifier(QStringLiteral("Q_PLUGIN_METADATA"));
|
|
|
|
if (line.contains(iidIdentifier))
|
|
{
|
|
QRegularExpression re(QStringLiteral("(?<=gui:3:).*(?=\"\\))"));
|
|
QRegularExpressionMatch match = re.match(line);
|
|
if (match.hasMatch())
|
|
{
|
|
QString matched = match.captured(0);
|
|
//printf("matched = '%s'\n", matched.toStdString().c_str());
|
|
guiPluginIIDs += matched;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
// match gui plugin iids with adv listed plugins
|
|
bool ok = true;
|
|
|
|
for (const LtsAppDescriptor::AppDescription &appdesc : qAsConst(adv))
|
|
{
|
|
for (const LtsAppDescriptor::PluginInfo &pi : qAsConst(appdesc.pluginInfos))
|
|
{
|
|
if (!guiPluginIIDs.contains(pi.iid))
|
|
{
|
|
printf("LtsAppDescriptorChecker: apps.json at '%s' uses unknown IID '%s'\n", appsJsonFilePath.toStdString().c_str(), pi.iid.toStdString().c_str());
|
|
ok = false;
|
|
}
|
|
}
|
|
}
|
|
|
|
//printf("gui plugins found in '%s': %s\n", it.fileName().toStdString().c_str(), filenames.join(QStringLiteral(", ")).toStdString().c_str());
|
|
|
|
return !ok;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//
|