Skip to content

Fix QML module loading in macOS/Linux deployed builds#151

Merged
fernandotonon merged 1 commit intomasterfrom
fix/remove-qtquick-dialogs-materialeditor
Feb 25, 2026
Merged

Fix QML module loading in macOS/Linux deployed builds#151
fernandotonon merged 1 commit intomasterfrom
fix/remove-qtquick-dialogs-materialeditor

Conversation

@fernandotonon
Copy link
Owner

Summary

  • macOS: Bundle missing Qt frameworks (QtQuickControls2Impl, QtQuickControls2Basic, QtQuickControls2BasicStyleImpl, QtQuickLayouts) that the Material Editor's QtQuick.Controls plugin requires at runtime. Remove unused QtQuickDialogs2/QtLabsPlatform frameworks and Qt.labs QML plugins (no longer imported after the previous commit). Update code signing list to match.
  • Linux (.deb): Bundle Qt QML modules (QtQuick, QtQml) and runtime shared libraries so the Material Editor loads without requiring system Qt QML packages. Move bundled .so files from /lib/x86_64-linux-gnu/ to a private /usr/lib/qtmesheditor/ directory to avoid conflicts with system libraries. Fix the launcher script (was plain text containing a path, now a proper #!/bin/sh script with LD_LIBRARY_PATH and QML2_IMPORT_PATH). Move launcher from /usr/local/bin/ to /usr/bin/ per Debian policy.
  • Debian packaging best practices: Add DEP-5 machine-readable copyright file covering MIT (QtMeshEditor, OGRE) and LGPL-3.0 (bundled Qt). Fix deprecated Priority: extraoptional. Remove misleading Origin: ubuntu. Add Qt runtime apt dependencies.
  • QML cleanup: Remove unused QtQuick.Dialogs import from MaterialEditorWindow.qml and add QML loading integration tests.
  • Version bump: 2.7.1 → 2.7.2

Test plan

  • CI passes on all three platforms (Windows, Linux, macOS)
  • After release: brew upgrade qtmesheditor → open Material Editor → loads without qtquickcontrols2plugin not found error
  • After release: install .deb on Ubuntu → open Material Editor → loads without error
  • Verify .deb contains /usr/share/doc/qtmesheditor/copyright
  • Verify .deb launcher at /usr/bin/qtmesheditor works correctly

🤖 Generated with Claude Code

@fernandotonon fernandotonon force-pushed the fix/remove-qtquick-dialogs-materialeditor branch from b3a2631 to 6993052 Compare February 25, 2026 03:16
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b3a2631516

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 536 to 538
for lib in QuickControls2 QuickControls2Impl QuickControls2Basic QuickControls2BasicStyleImpl \
QuickTemplates2 QuickLayouts Quick QmlModels QmlMeta QmlWorkerScript Qml QmlCore \
OpenGL; do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Include QtQuickDialogs2 libs in Linux package bundle

AISettingsDialog.qml still imports QtQuick.Dialogs and declares a FolderDialog (qml/AISettingsDialog.qml:4,486), and MaterialEditorWindow.qml instantiates AISettingsDialog during normal editor startup (qml/MaterialEditorWindow.qml:930). The Linux packaging loop now copies a curated Qt library set but omits libQt6QuickDialogs2*, so the bundled QtQuick/Dialogs plugin can fail to load on machines that do not already have those libs installed, producing QML load errors in the deployed .deb.

Useful? React with 👍 / 👎.

sudo cp -R /Users/runner/work/QtMeshEditor/Qt/${{ env.QT_VERSION }}/$QT_ARCH_DIR/lib/QtOpenGL.framework ${{github.workspace}}/bin/QtMeshEditor.app/Contents/Frameworks/
sudo cp -R /Users/runner/work/QtMeshEditor/Qt/${{ env.QT_VERSION }}/$QT_ARCH_DIR/lib/QtQuickControls2.framework ${{github.workspace}}/bin/QtMeshEditor.app/Contents/Frameworks/ || echo "QtQuickControls2 not found, continuing..."
sudo cp -R /Users/runner/work/QtMeshEditor/Qt/${{ env.QT_VERSION }}/$QT_ARCH_DIR/lib/QtQuickDialogs2.framework ${{github.workspace}}/bin/QtMeshEditor.app/Contents/Frameworks/ || echo "QtQuickDialogs2 not found, continuing..."
sudo cp -R /Users/runner/work/QtMeshEditor/Qt/${{ env.QT_VERSION }}/$QT_ARCH_DIR/lib/QtQuickControls2Impl.framework ${{github.workspace}}/bin/QtMeshEditor.app/Contents/Frameworks/ || echo "QtQuickControls2Impl not found, continuing..."

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Copy QtQuickDialogs2.framework into macOS app bundle

The macOS framework copy list no longer stages QtQuickDialogs2.framework, but AISettingsDialog.qml still relies on QtQuick.Dialogs (qml/AISettingsDialog.qml:4,486) and is created from MaterialEditorWindow.qml (line 930). In shipped app bundles this can leave the dialogs plugin with an unresolved framework dependency, causing module/plugin load failures when the Material Editor QML is loaded.

Useful? React with 👍 / 👎.

macOS: Bundle missing Qt frameworks (QtQuickControls2Impl, QtQuickControls2Basic,
QtQuickControls2BasicStyleImpl, QtQuickLayouts) required by the Material Editor,
remove unused QtQuickDialogs2/QtLabsPlatform frameworks and Qt labs QML plugins,
and update code signing to match.

Linux: Bundle Qt QML modules (QtQuick, QtQml) and runtime libraries into the
.deb package so the Material Editor loads without requiring system Qt packages.
Move bundled .so files from /lib/x86_64-linux-gnu/ to /usr/lib/qtmesheditor/
to avoid conflicts with system libraries. Fix launcher script (was plain text,
now proper #!/bin/sh with LD_LIBRARY_PATH and QML2_IMPORT_PATH). Move launcher
from /usr/local/bin/ to /usr/bin/ per Debian policy. Add DEP-5 copyright file
covering MIT (QtMeshEditor, OGRE) and LGPL-3.0 (bundled Qt). Fix deprecated
Priority: extra -> optional, remove misleading Origin: ubuntu, and add Qt
runtime dependencies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@fernandotonon fernandotonon force-pushed the fix/remove-qtquick-dialogs-materialeditor branch from 6993052 to 1376ed7 Compare February 25, 2026 03:36
@sonarqubecloud
Copy link

@fernandotonon fernandotonon merged commit 10b2a7e into master Feb 25, 2026
14 checks passed
@fernandotonon fernandotonon deleted the fix/remove-qtquick-dialogs-materialeditor branch February 25, 2026 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant