Close ppm.msdl/ppm.saab floors: re-implement MSDL/SAAB import without Qt XmlPatterns

Qt6::Xml (QDomDocument) + xmllint schema check; MSDL links XercesC + xsdc++ tree classes; both moved into GROUP12
This commit is contained in:
berrux-dev committed 2026-10-24 19:31:04 +02:00
1 parent 3924b1e72b
commit 8e9594d25c
18 files changed
+179 -248

No files matched your search

@@ -57,13 +57,15 @@ BUILD_WEBENGINE_PLUGINS:
BUILD_XMLPATTERNS_PLUGINS:
--xmlpatterns-plugins / --no-xmlpatterns-plugins
Enable/disable the XmlPatterns-based plugins (MSDL, Saab)
when Qt6XmlPatterns is present in the Qt install. Qt
removed the XmlPatterns module in Qt 6.0 ("What's New in
Qt 6.0" / Qt Wiki: removed, not planned to be
re-introduced; no Qt 6 release ships it, no aqt
module), so with a stock Qt 6.10.2 install these
plugins stay disabled (environmental floor). (default: ON)
Enable/disable the MSDL/Saab plugins. They no longer
require Qt XmlPatterns (removed in Qt 6.0, not
re-introduced): their import logic was re-implemented
with Qt6::Xml (QDomDocument) + the existing xmllint
step, and MSDL additionally links XercesC + uses
xsdc++-generated tree classes (needs xsdcxx +
libxerces-c-dev, both in APT_PACKAGES). With the
prerequisites present these build by default.
(default: ON)
Build groups:
--group1 / --no-group1 Enable/disable DDS core libraries build
@@ -311,6 +313,19 @@ APT_PACKAGES=(
# uses Poppler types unconditionally, so a green Group 12 build requires it.
pkg-config
libpoppler-qt6-dev
# MSDL/Saab no longer require Qt XmlPatterns (removed in Qt 6.0): their import
# logic was re-implemented with Qt6::Xml (QDomDocument) + the existing xmllint
# schema-validation step. MSDL additionally links XercesC and uses xsdc++-
# generated tree classes, so it needs libxerces-c-dev (XercesC C++ parser) and
# xsdcxx (the xsdc++ code generator, XSD_GENERATE_TREE). Saab only needs
# Qt6::Xml; both are installed together so the two plugins build from the same
# image.
xsdcxx
libxerces-c-dev
# xmllint (libxml2-utils): the MSDL import validates the incoming document against
# its XSD via an external `xmllint --schema` step (QProcess) - pre-existing in the
# legacy (msdl_import.cpp). Provision it so that runtime schema check can run.
libxml2-utils
)
# INTERFACE libraries (header-only) are built automatically as dependencies
@@ -654,15 +669,12 @@ RUN pip3 install --break-system-packages --quiet aqtinstall && \
--outputdir ${QT_BASE_DIR} && \
rm -rf /root/.cache/Aqt
# Qt6 XmlPatterns (MSDL/Saab plugins) is intentionally NOT installed: Qt removed
# the XmlPatterns module in Qt 6.0 ("What's New in Qt 6.0" / Qt Wiki: removed and
# not planned to be re-introduced - unlike e.g. Multimedia/WebEngine which
# returned in 6.1/6.2; no Qt 6 release ships it, no aqt module). Mixing an
# out-of-tree libQt6XmlPatterns built against an older Qt with a 6.10 install
# would put two Qt minor versions in one
# process. MSDL/Saab therefore stay disabled with a stock Qt install; to enable
# them, install a Qt-version-matching XmlPatterns (lib + headers + cmake config)
# into ${QT_BASE_DIR}/${QT_VERSION}/${QT_ARCH_DIR} and pass --xmlpatterns-plugins.
# MSDL/Saab plugins: Qt removed the XmlPatterns module in Qt 6.0 (not re-
# introduced), so their import logic was re-implemented with Qt6::Xml
# (QDomDocument) + the existing external xmllint schema-validation step. MSDL
# additionally links XercesC and uses xsdc++-generated tree classes; xsdcxx +
# libxerces-c-dev are installed via APT_PACKAGES above, so the plugins build with
# a stock Qt 6.10.2 install.
# Install KDReports from source (apt package not available in Ubuntu 22.04/26.04)
# Try apt install first (will fail), then build from KDAB GitHub mirror
@@ -1221,10 +1233,11 @@ GROUP11_TARGETS=(
# BldInfoGuiPlugin - links BuildingViewerCommon (dtEntity/OSG SDK absent)
# BdvViewerGuiPlugin - links BuildingViewerCommon (same floor; CMake skips its
# subdirectory when BuildingViewerCommon is not built)
# PpmMSDLGuiPlugin - links Qt6::XmlPatterns; Qt removed the XmlPatterns
# PpmSAABGuiPlugin - module in Qt 6.0 (not re-introduced; no Qt 6 release
# ships it, incl. 6.10.2). With a stock Qt install the
# BUILD_PLUGINS_MSDL/SAAB flags resolve to OFF (see
# PpmMSDLGuiPlugin / - former XmlPatterns floor, now CLOSED: re-implemented without
# PpmSAABGuiPlugin - Qt XmlPatterns (removed in Qt 6.0) using Qt6::Xml (QDomDocument)
# + the existing xmllint step; MSDL also needs xsdcxx +
# libxerces-c-dev (both in APT_PACKAGES). Now in GROUP12 and built
# by default when the prerequisites are present (see
# resolve_xmlpatterns)
# The Flt*/Smo* targets only exist when BUILD_FILTERMANAGEMENT /
# BUILD_PLUGINS_SERVICEMONITOR are ON (script defaults; see the cmake call).
@@ -1341,12 +1354,14 @@ GROUP12_TARGETS=(
PlanOverlaysGuiPlugin
PpmComboBoxGuiPlugin
PpmDataPlugin
PpmMSDLGuiPlugin
PpmOperationalPlaningGuiPlugin
PpmOrgChartGuiPlugin
PpmParticipantEditGuiPlugin
PpmParticipantInfoGuiPlugin
PpmParticipantTemplatesGuiPlugin
PpmPartyEditGuiPlugin
PpmSAABGuiPlugin
PpmTypeEditGuiPlugin
PpmUasGuiPlugin
PreDataPlugin
@@ -1691,22 +1706,21 @@ if [[ "${BUILD_ARCGIS}" == "ON" ]]; then
fi
fi
# The MSDL/Saab plugins link Qt6::XmlPatterns. Qt removed the XmlPatterns
# module in Qt 6.0 ("What's New in Qt 6.0" removal table / Qt Wiki: removed and
# not planned to be re-introduced - unlike Multimedia/WebEngine, which returned
# in 6.1/6.2). No Qt 6 release (incl. 6.10.2) ships it and there is no aqt
# module. An out-of-tree libQt6XmlPatterns built against an older Qt would mix
# two Qt minor versions in one process (ABI risk), so with a stock Qt install
# the plugins are gated OFF. If a Qt-version-matching XmlPatterns (lib +
# headers + Qt6XmlPatterns cmake config) is placed into the Qt prefix, they
# enable automatically.
# The MSDL/Saab plugins no longer require Qt XmlPatterns (removed in Qt 6.0, not
# re-introduced). Their import logic was re-implemented with Qt6::Xml
# (QDomDocument) plus the existing external xmllint schema-validation step; MSDL
# additionally links XercesC and uses xsdc++-generated tree classes. So build
# them by default. MSDL needs the xsdcxx code generator + libxerces-c-dev (both
# are in APT_PACKAGES); if they are missing here, keep both plugins OFF and flag
# the gap. (Saab only needs Qt6::Xml, but is gated together to keep the effective
# value a single switch.)
resolve_xmlpatterns() {
BUILD_XMLPATTERNS_EFFECTIVE="${BUILD_XMLPATTERNS_PLUGINS}"
if [[ "${BUILD_XMLPATTERNS_EFFECTIVE}" == "ON" ]]; then
if ls "${QT_BASE_DIR}/${QT_VERSION}/${QT_ARCH_DIR}/lib/libQt6XmlPatterns.so.6" >/dev/null 2>&1; then
log_info "Qt6XmlPatterns present in the Qt install - MSDL/Saab plugins will be built"
if command -v xsdcxx >/dev/null 2>&1 && [ -e /usr/lib/x86_64-linux-gnu/libxerces-c.so ]; then
log_info "xsdcxx + XercesC present - MSDL/Saab plugins will be built (re-implemented without Qt XmlPatterns)"
else
log_warn "Qt6XmlPatterns is not present in the Qt install (removed in Qt 6.0, not re-introduced) - keeping BUILD_PLUGINS_MSDL/BUILD_PLUGINS_SAAB OFF (ppm.msdl / ppm.saab stay unbuilt)"
log_warn "xsdcxx / libxerces-c-dev missing - keeping BUILD_PLUGINS_MSDL/BUILD_PLUGINS_SAAB OFF (ppm.msdl / ppm.saab stay unbuilt)"
BUILD_XMLPATTERNS_EFFECTIVE=OFF
fi
fi