Fix QML module loading in macOS/Linux deployed builds#151
Fix QML module loading in macOS/Linux deployed builds#151fernandotonon merged 1 commit intomasterfrom
Conversation
b3a2631 to
6993052
Compare
There was a problem hiding this comment.
💡 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".
| for lib in QuickControls2 QuickControls2Impl QuickControls2Basic QuickControls2BasicStyleImpl \ | ||
| QuickTemplates2 QuickLayouts Quick QmlModels QmlMeta QmlWorkerScript Qml QmlCore \ | ||
| OpenGL; do |
There was a problem hiding this comment.
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..." |
There was a problem hiding this comment.
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>
6993052 to
1376ed7
Compare
|



Summary
QtQuickControls2Impl,QtQuickControls2Basic,QtQuickControls2BasicStyleImpl,QtQuickLayouts) that the Material Editor'sQtQuick.Controlsplugin requires at runtime. Remove unusedQtQuickDialogs2/QtLabsPlatformframeworks andQt.labsQML plugins (no longer imported after the previous commit). Update code signing list to match.QtQuick,QtQml) and runtime shared libraries so the Material Editor loads without requiring system Qt QML packages. Move bundled.sofiles 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/shscript withLD_LIBRARY_PATHandQML2_IMPORT_PATH). Move launcher from/usr/local/bin/to/usr/bin/per Debian policy.Priority: extra→optional. Remove misleadingOrigin: ubuntu. Add Qt runtime apt dependencies.QtQuick.Dialogsimport fromMaterialEditorWindow.qmland add QML loading integration tests.Test plan
brew upgrade qtmesheditor→ open Material Editor → loads withoutqtquickcontrols2plugin not founderror.debon Ubuntu → open Material Editor → loads without error.debcontains/usr/share/doc/qtmesheditor/copyright.deblauncher at/usr/bin/qtmesheditorworks correctly🤖 Generated with Claude Code