Accessing ShareUI on Harmattan/MeeGo ?
I am looking to add social sharing into our applications but cannot figure out how to access the sharing API from Qt/QML.
The sharing UI feature is documented here:
[url]http://www.developer.nokia.com/swipe/ux/pages/Sharing.html[/url]
The key differentiator is that any app or service could handle the share request.
The MeeGo open source project hosts the sharing libraries here:
[url]http://meego.gitorious.org/meego-sharing-framework[/url]
I have tried to adapt some of the examples in the git repository, but they all rely on importing ShareUI ie
#include <ShareUI/Item>
which I cannot resolve.
I can see that the SharingUI libs are built into the SDK on this path:
<Qt SDK Root>/Madde/sysroots/harmattan-arm-sysroot/usr/include/ShareUI
but I do not see the ShareUI dir in the same location on the N950.
Any advice on this would be most appreciated.
Thanks,
Maciej
Re: Accessing ShareUI on Harmattan/MeeGo ?
[QUOTE=mac1ej;850571]
I have tried to adapt some of the examples in the git repository, but they all rely on importing ShareUI ie
#include <ShareUI/Item>
which I cannot resolve.[/QUOTE]
Why? Are you using pkg-config?
[QUOTE=mac1ej;850571]
I can see that the SharingUI libs are built into the SDK on this path:
<Qt SDK Root>/Madde/sysroots/harmattan-arm-sysroot/usr/include/ShareUI
but I do not see the ShareUI dir in the same location on the N950.[/QUOTE]
These are development files (needed for compilation) are not need on the device for execution.
Re: Accessing ShareUI on Harmattan/MeeGo ?
Is your question why I cannot resolve #include <ShareUI/Item>? I assume that I cannot because my project is not correctly configured, that I need something like:
CONFIG += share-ui
in my .pro file (the above does not help by the way) or the correct equivalent.
I am not using pkg-config, should I be? Its wiki page seems like it might be helpful:
[url]http://en.wikipedia.org/wiki/Pkg-config[/url]
As far as the libraries on the device, I am questioning whether the ShareUI libs are available on the hardware. I noticed that
<Qt SDK Root>/Madde/sysroots/harmattan-nokia-arm-sysroot
seems like a closer approximation of the file system on the N950 and I spotted the following libs
/usr/lib/libmaemomeegotouchshareuiinterface.<shared objects and version numbers>
Any advice on getting Harmattan/MeeGo's sharing feature linked up working?
Best,
Maciej
Re: Accessing ShareUI on Harmattan/MeeGo ?
[url]http://www.developer.nokia.com/Community/Wiki/Using_pkg-config_with_qmake[/url]
Name of the library is libshare-ui and name of .pc files are
share-ui-plugin.pc, share-widgets.pc, share-ui-common.pc
Re: Accessing ShareUI on Harmattan/MeeGo ?
Thanks for your responses, but I am still missing something fundamental.
If I check out this project:
[url]http://meego.gitorious.org/~jussini/meego-sharing-framework/jussinis-qml-share-enablers/trees/master/share-ui-declarative[/url]
open up the top level (or any level actually) .pro file and add
# share lib setup
CONFIG += libshare-ui
PKGCONFIG += share-ui-plugins share-widgets share-ui-common
to the .pro file then it still does not link the ShareUI or compile. The error is
../../share-ui-declarative/libshare-ui-declarative/src/itemcontainer.cpp:26:33: error: ShareUI/ItemContainer: No such file or directory
I am tempted to copy in a ShareUI directory, but I still think it should link without any placeholders in the file system.
Maybe compiling one of the MeeGo sharing framework projects is irrelevant? I was hoping to wrap up the sharing API in QML components and that seems to be accomplished by those projects.
Will try pulling in a SharedUI dir and then try importing the ShareUI in my hello world project.
Re: Accessing ShareUI on Harmattan/MeeGo ?
Quick follow up, tried the following with no success:
1. In a hello world project try to:
#include <ShareUI/Item>
while having the following in the .pro file:
# share lib setup
CONFIG += libshare-ui
PKGCONFIG += share-ui-plugins share-widgets share-ui-common
which does not link up
2. Copy in a ShareUI folder
This is one of the outer rings of dependency hell, the ShareUI links but then wants thumbnailer/Thumbnailer for which I do not have a stub package.
Going to try the 'go out to lunch' option now, might get some ideas..
Re: Accessing ShareUI on Harmattan/MeeGo ?
libshare-ui has 3 qmake configurations: share-widgets, share-ui-plugin, share-ui-common.
There is no libshare-ui configuration.
Also there is no share-ui-plugins.pc.
Re: Accessing ShareUI on Harmattan/MeeGo ?
Tried this again and still no success, my main/cpp looks like:
#include <QtGui/QApplication>
#include <QtDeclarative>
#include <ShareUI/Item>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QDeclarativeView view;
view.setSource(QUrl("qrc:/qml/main.qml"));
view.showFullScreen();
return app.exec();
}
and I have added the following to my .pro file:
# share ui setup
CONFIG += share-widget share-ui-plugin share-ui-common
PKGCONFIG += share-widget share-ui-plugin share-ui-common
The ShareUI lib still will not link. Error is
../sharebear/main.cpp:3: fatal error: ShareUI/Item: No such file or directory
Where sharebear is the name of my hello world project. Seems like this should be simple, but it is not documented anywhere.
Any advice would be appreciated!
Thanks,
Maciej
Re: Accessing ShareUI on Harmattan/MeeGo ?
Could you please show full content of the project file?
Re: Accessing ShareUI on Harmattan/MeeGo ?
You forgot to add link_pkgconfig to the CONFIG var:
CONFIG += link_pkgconfig
Re: Accessing ShareUI on Harmattan/MeeGo ?
Thanks for your replies! Still no luck!
Does the order of CONFIG entries matter?
I have posted up my hello-world project on github: [url]https://github.com/matyjas/share-bear[/url]
You can see the full content of the .pro file here : [url]https://github.com/matyjas/share-bear/blob/master/sharebear.pro[/url]
Looking forward to any further comments!
Re: Accessing ShareUI on Harmattan/MeeGo ?
Sometimes it helps to read error messages
[CODE]
[sbox-arm: ~/matyjas-share-bear-6b73654] > qmake
Package share-widget was not found in the pkg-config search path.
Perhaps you should add the directory containing `share-widget.pc'
to the PKG_CONFIG_PATH environment variable
No package 'share-widget' found
Package share-widget was not found in the pkg-config search path.
Perhaps you should add the directory containing `share-widget.pc'
to the PKG_CONFIG_PATH environment variable
No package 'share-widget' found
Package share-widget was not found in the pkg-config search path.
Perhaps you should add the directory containing `share-widget.pc'
to the PKG_CONFIG_PATH environment variable
No package 'share-widget' found
[sbox-arm: ~/matyjas-share-bear-6b73654] > dpkg -L libshare-ui-dev | grep pc
/usr/lib/pkgconfig/share-ui-plugin.pc
/usr/lib/pkgconfig/share-widgets.pc
/usr/lib/pkgconfig/share-ui-common.pc
[/CODE]
Re: Accessing ShareUI on Harmattan/MeeGo ?
I have tried setting PKG_CONFIG_PATH in my .zshrc as well as the Projects/Build Environment section of Qt Creator, but still get the same error. My setting looks like:
export PKG_CONFIG_PATH=/Users/maciej/QtSDK1.1/Madde/sysroots/harmattan-arm-sysroot/usr/lib/pkgconfig/
or the equivalent in the Build Environment section. Does not seem to make any difference. Here is some interesting output:
[13:04:42] maciej:~ $ mad pkg-config share-widgets
Package share-widgets was not found in the pkg-config search path.
No package 'share-widgets' found
[13:05:01] maciej:~ $ echo $PKG_CONFIG_PATH
/Users/maciej/QtSDK1.1/Madde/sysroots/harmattan-arm-sysroot/usr/lib/pkgconfig/
[13:05:12] maciej:~ $
Where/how should I be setting PKG_CONFIG_PATH? Ideally, I would like to set it in my .pro file so I can share the configuration with my team.
Thanks!
Re: Accessing ShareUI on Harmattan/MeeGo ?
[QUOTE=mac1ej;850843]I have tried setting PKG_CONFIG_PATH in my .zshrc as well as the Projects/Build Environment section of Qt Creator, but still get the same error. My setting looks like:
export PKG_CONFIG_PATH=/Users/maciej/QtSDK1.1/Madde/sysroots/harmattan-arm-sysroot/usr/lib/pkgconfig/
or the equivalent in the Build Environment section. Does not seem to make any difference.
Where/how should I be setting PKG_CONFIG_PATH? Ideally, I would like to set it in my .pro file so I can share the configuration with my team.
Thanks![/QUOTE]
Are you trolling here?
Re: Accessing ShareUI on Harmattan/MeeGo ?
Not trolling, really trying to solve this, have gone to great lengths to figure this out and I appreciate your responses so far. I do not think I am the only one struggling with this and I fully intend to document this once it is resolved.
Also see my output from the command line:
[13:04:42] maciej:~ $ mad pkg-config share-widgets
Package share-widgets was not found in the pkg-config search path.
No package 'share-widgets' found
[13:05:01] maciej:~ $ echo $PKG_CONFIG_PATH
/Users/maciej/QtSDK1.1/Madde/sysroots/harmattan-arm-sysroot/usr/lib/pkgconfig/
[13:05:12] maciej:~ $