This is juuust a bit embarrassing. I'm trying to import a plugin, just as I did years ago in my tiny app Kitchen Timer[1]. On the other hand, I couldn't even explain how I did it 4 years ago[2] :P With the best of my weary eyes, I can't see what I'm missing, but I have changed the build setup more logically sane, thanks to advice from Martin Kampas :)
The main project file[3] links to two other: app.pro[4] and a QML plugin
(skeleton)[5].
# harbour-currencyconverter.pro:
TEMPLATE = subdirs
SUBDIRS += app \
lib/fileproxy
# app.pro:
TARGET = harbour-currencyconverter
TEMPLATE = app
CONFIG += sailfishapp
CONFIG += sailfishapp_i18n
QT += dbus quick
# And some other stuff
# lib/fileproxy/fileproxy.pro:
TEMPLATE = lib
PROJECT = currencyconverter
TARGET = fileproxy
QT += quick
QT -= gui
CONFIG += qt plugin
TARGET = $$qtLibraryTarget($$TARGET)
target.path = /usr/share/harbour-$$PROJECT/lib/harbour/$$PROJECT/$$TARGET
uri = harbour.$$PROJECT.TARGET
# SOURCES and HEADERS
OTHER_FILES = qmldir
qmldir.files += $$_PRO_FILE_PWD_/qmldir
qmldir.path += $$target.path
INSTALLS += target qmldir
Everything builds and installs fine:
$ ls
/usr/share/harbour-currencyconverter/lib/harbour/currencyconverter/fileproxy/
libfileproxy.so qmldir
$ ls /usr/share/harbour-currencyconverter/
flags lib qml translations
$ ls /usr/bin/harbour-currencyconverter
/usr/bin/harbour-currencyconverter
Exactly the same way as [1].
So, everything is fine until the import of the module[6], which off
course exits with "module "harbour.currencyconverter.fileproxy" is not
installed" :/
I am as good as certain, that I'm just missing some copy/paste error,
but I have been thru the code a gazillion times now, and I just can't
find it.
Sorry for the broken lines. How do you disable line-breaks in Thunderbird?
[1] https://github.com/tanghus/kitchen-timer-qml/
[2] https://lists.sailfishos.org/pipermail/devel/2015-September/006533.html
[3]
https://github.com/tanghus/currency-converter-qml/blob/master/harbour-currencyconverter.pro
[4] https://github.com/tanghus/currency-converter-qml/blob/master/app.pro
[5]
https://github.com/tanghus/currency-converter-qml/blob/master/lib/fileproxy/fileproxy.pro
[6]
https://github.com/tanghus/currency-converter-qml/blob/master/qml/harbour-currencyconverter.qml#L34
--
/Thomas
signature.asc
Description: OpenPGP digital signature
_______________________________________________ SailfishOS.org Devel mailing list To unsubscribe, please send a mail to [email protected]
