Summary: | analitza QML plugin should be built as a bundle plugin and not a shared library | ||
---|---|---|---|
Product: | [Frameworks and Libraries] analitza | Reporter: | Hanspeter Niederstrasser <niederstrasser> |
Component: | core | Assignee: | Aleix Pol <aleixpol> |
Status: | REPORTED --- | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Fink Packages | ||
OS: | macOS | ||
URL: | https://developer.apple.com/library/mac/documentation/Porting/Conceptual/PortingUnix/compiling/compiling.html#//apple_ref/doc/uid/TP40002850-TPXREF103 | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | patch |
Description
Hanspeter Niederstrasser
2015-01-28 11:55:38 UTC
IIRC this was done because Qt really needs the lib* prefix. Can you give it a try to your change and tell me if it worked for you? Thanks! Yes, with the proposed change, the file is installed as analitzadeclarativeplugin.so (no lib prefix). However, I don't know how to go about testing whether it works or not with the non-prefix name. Created attachment 90903 [details]
patch
The change you pasted won't work, I'll attach a new one. You can test it by running kalgebramobile.
It's especially interesting sorting out this one, because many QML modules in KDE are using SHARED instead of module, this will mean we need to change them out.
WIth no patch: libanalitzadeclarativeplugin.dylib; shared lib
With my patch: analitzadeclarativeplugin.so; module
With attachment 90903 [details]: libanalitzadeclarativeplugin.so; module
kalgebra fails with this error:
nieder $ /sw/Applications/KF5/kalgebramobile.app/Contents/MacOS/kalgebramobile
QQmlApplicationEngine failed to load component
file:///widgets/KAlgebraMobile.qml:-1 File not found
$ ls -l /sw/lib/qt5-mac/share/kalgebramobile/plugins/widgets/KAlgebraMobile.qml
-rw-r--r-- 1 root admin 2224 Nov 12 19:59 /sw/lib/qt5-mac/share/kalgebramobile/plugins/widgets/KAlgebraMobile.qml
So I seem to also have the unrelated issue with finding .qml modules...
Yes, looks like a different problem. You'll have to see why this returns empty: QStandardPaths::locate(QStandardPaths::DataLocation, "plugins", QStandardPaths::LocateDirectory); Do you get this problem with all alternatives? If you can provide the information requested in comment #5, please add it. Sorry about the delay. Life intruded. Unfortunately, I'm not a programmer, so I can't write the little program to check QStandardPaths::locate(QStandardPaths::DataLocation, "plugins", QStandardPaths::LocateDirectory). But if the code is provided, I should be able to compile it, run it, and provide the necessary feedback. Ok, you can also use the "qtpaths" tool provided by Qt, it should be something like: $ qtpaths --locate-dirs GenericDataLocation kalgebramobile/plugins /home/kde-devel/kde5/share/kalgebramobile/plugins $ qtpaths --locate-dirs GenericDataLocation kalgebramobile $ qtpaths --locate-dirs GenericDataLocation /sw/Applications/KF5/kalgebramobile.app/Contents/MacOS/kalgebramobile $ qtpaths --locate-dirs GenericDataLocation /sw/Applications/KF5/kalgebramobile.app/Contents/MacOS/kalgebramobile/plugins (and to make sure qtpaths is actually working)... $ qtpaths --display GenericDataLocation Application Support $ qtpaths --paths GenericDataLocation /Users/nieder/Library/Application Support:/Library/Application Support For kalgebramobile (comment 4), the app failed to start up a GUI and gave the "QQmlApplicationEngine failed to load component" error regardless of how the analitzadeclarativeplugin was built (kalgebramobile was rebuilt after each rebuild of analitza to make sure it was looking for the new analitzadeclarativeplugin file). The app process runs, it just doesn't display anything. So the problem seems to be that files are being installed in the wrong path. You are installing the file into: /sw/lib/qt5-mac/share/kalgebramobile/plugins/widgets/KAlgebraMobile.qml But then QStandardPaths reports it should be in /sw/Applications/KF5/kalgebramobile.app/Contents/MacOS/kalgebramobile/plugins/widgets/KAlgebraMobile.qml Now this should be figured out at CMake level. Unfortunately, the path /sw/Applications/KF5/kalgebramobile.app/Contents/MacOS/kalgebramobile/plugins/widgets can't exist with the current layout because the actual runtime executable inside the .app bundle is /sw/Applications/KF5/kalgebramobile.app/Contents/MacOS/kalgebramobile (file/directory collision). I renamed the executable to kalgebramobile-bin and then copied KAlgebraMobile.qml into each of the following directories with no change in the results. /sw/Applications/KF5/kalgebramobile.app/Contents/MacOS /sw/Applications/KF5/kalgebramobile.app/Contents/MacOS/kalgebramobile /sw/Applications/KF5/kalgebramobile.app/Contents/MacOS/kalgebramobile/widgets /sw/Applications/KF5/kalgebramobile.app/Contents/MacOS/kalgebramobile/plugins/widgets /sw/Applications/KF5/kalgebramobile.app/Contents/MacOS/widgets /sw/Applications/KF5/kalgebramobile.app/Contents/MacOS/plugins/widgets I also copied the executable to /sw/lib/qt5-mac/bin so it would be in the same directory tree as KAlgebraMobile.qml, but again, no change. Well, maybe you want to get in touch with the kde-mac guys. I'd love to find solution to that, but it's clearly something not KAlgebra-specific. Feel free to CC me. Thank you for the bug report. As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved. |