×

Discussion Board

Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 35
  1. #16
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Accessing ShareUI on Harmattan/MeeGo ?

    When one asks 7 questions related to 5 minutes task it looks really suspicious
    ./QtSDK/Madde/bin/mad -t harmattan-platform-api pkg-config --libs share-widgets
    -lshare-widgets -L//usr/lib -lshare-ui-common -lmdatauri

  2. #17
    Registered User
    Join Date
    Mar 2003
    Posts
    22

    Re: Accessing ShareUI on Harmattan/MeeGo ?

    I can reproduce that on the command line, but I am not really sure what to do with it.

    - I cannot pass '-lshare-widgets -L//usr/lib -lshare-ui-common -lmdatauri' to the LIBS += in my .pro file
    - Qt Creator still has the same error 'Package share-ui-common was not found in the pkg-config search path.
    No package 'share-ui-common' found'
    - Qt Creator does not seem to pick up PKG_CONFIG_PATH from either my environment nor the Projects/Build Environment section

    The only option I can think of now is to write my own build script which sets PKG_CONFIG_PATH, but I do not know how to get qmake to pick up the right environment vars, ie

    [15:31:19] maciej:sharebear gitmaster*) $ mad -t harmattan-platform-api pkg-config --libs share-widgets
    -lshare-widgets -L//usr/lib -lshare-ui-common -lmdatauri
    [15:34:28] maciej:sharebear gitmaster*) $ mad -t harmattan-platform-api pkg-config --libs share-widgets
    -lshare-widgets -L//usr/lib -lshare-ui-common -lmdatauri
    [15:44:23] maciej:sharebear gitmaster*) $ qmake sharebear.pro -r -spec linux-g++-maemo -unix
    -unix is deprecated.
    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

    Any additional help would be most appreciated!

  3. #18
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Accessing ShareUI on Harmattan/MeeGo ?

    So, should not you finally correct typo in your project file and replace "share-widget" with "share-widgets"?

  4. #19
    Registered User
    Join Date
    Mar 2003
    Posts
    22

    Re: Accessing ShareUI on Harmattan/MeeGo ?

    Fixed that and it makes no difference

    I updated the github project with the corrections and a build script.

  5. #20
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Accessing ShareUI on Harmattan/MeeGo ?


  6. #21
    Registered User
    Join Date
    Mar 2003
    Posts
    22

    Re: Accessing ShareUI on Harmattan/MeeGo ?

    Indeed, after cleaning up my environment the pkg-config errors do go away!

    But did you comment out:

    #include <ShareUI/Item>

    in main.cpp?

    Just curious, since mine still throws an error:

    ../sharebear/main.cpp:3: fatal error: ShareUI/Item: No such file or directory
    compilation terminated.
    make: *** [main.o] Error 1

  7. #22
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Accessing ShareUI on Harmattan/MeeGo ?

    Quote Originally Posted by mac1ej View Post
    But did you comment out:

    #include <ShareUI/Item>

    in main.cpp?
    Why would I do that?

  8. #23
    Registered User
    Join Date
    Mar 2003
    Posts
    22

    Re: Accessing ShareUI on Harmattan/MeeGo ?

    Because I do not see any errors in your screenshot, whereas when I run the same project the following error turns up:

    ../sharebear/main.cpp:3: fatal error: ShareUI/Item: No such file or directory
    compilation terminated.
    make: *** [main.o] Error 1

    Any idea why that might be?

  9. #24
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Accessing ShareUI on Harmattan/MeeGo ?

    I don't know why the tool you are using doesn't find Item include.
    $ find ~ -name "Item"
    /home/divanov/QtSDK/Madde/sysroots/harmattan-meego-arm-sysroot-1122-slim/usr/include/ShareUI/Item
    The only thing I know is that your project compiles perfectly with QtSDK 1.1.2 and inside scratchbox.

  10. #25
    Registered User
    Join Date
    Mar 2003
    Posts
    22

    Re: Accessing ShareUI on Harmattan/MeeGo ?

    I do not have the same sysroot (harmattan-meego-arm-sysroot-1122-slim) as you but one of mine (harmattan-arm-sysroot) does have the requisite ShareUI folder with all the right contents.

    My co-worker tried that repo on his windows machine and had the same results, I been running on mac os and Qt Creator 2.2.1 if that changes anything.

    Also, I am going to give scratchbox a try, have not used it yet.

    Finally I have raised a paid support ticket on this issue, so will leave you alone.

    But if you run into anything useful feel free to get in touch.

    Thanks for your help.

  11. #26
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Accessing ShareUI on Harmattan/MeeGo ?

    In installed Qt SDK you should have at least the same components I have
    http://img5.imageshack.us/img5/9329/maintainqtsdk.png

  12. #27
    Registered User
    Join Date
    Aug 2011
    Posts
    17

    Re: Accessing ShareUI on Harmattan/MeeGo ?

    Maciej, I believe what you are trying to achieve is to call out to Share UI with your own parameters. If that's right guess, then you are doing it all wrong. Libraries you are trying to use are designed to create Share UI-like UIs. For dispatching request to existing platform-provided Share UI you need to use ShareUiInterface. Here is an appropriate generic example: http://meego.gitorious.org/meego-sha...ervice-example and interface file is http://meego.gitorious.org/meego-sha...iInterface.xml

    There is C++ wrapper around this DBUS interface, provided by maemo-meegotouch-interfaces package (development package is maemo-meegotouch-dev).

    Below are modified examples from the link above to accomodate changes specific to Harmattan (sharing framework upstream is targetting non-MeeGoTouch MeeGo environment):
    -------------------------
    ######################################################################
    # Automatically generated by qmake (2.01a) Tue Jul 28 10:16:12 2009
    ######################################################################

    TEMPLATE = app

    DEPENDPATH += .

    CONFIG += shareuiinterface-maemo-meegotouch debug qt

    QMAKE_CXXFLAGS += -Werror -Wall

    OBJECTS_DIR = ./obj
    MOC_DIR = ./moc
    QMAKE_CLEAN += obj/* \
    moc/*

    SOURCES += Share-UI-Example.cpp
    -------------------------

    And a demo command line application:
    -------------------------
    #include <shareuiinterface.h>
    #include <shareuiinterfaceproxy.h>
    #include <QStringList>
    #include <QDebug>
    #include <iostream>


    int main(int argc, char **argv)
    {

    QCoreApplication app(argc, argv);
    // Create a QStringlist where file uri will be stored
    QStringList itemList;

    // Append the file uris to the list (files need to indexed by Tracker)
    // If application is reading files from Tracker then Tracker's "file ID
    // URIs" should be used instead. These are URIs of files entry in Tracker
    // database. In this example simple file path URI is used to keep code
    // simple.

    bool help = false;
    for(int i = 1; i < argc; ++i) {
    const QString arg = argv[i];
    if (arg == "--help" || arg == "-h") {
    help = true;
    break;
    }

    if(arg.startsWith("-")) {
    // This is probably some kind of option, like -software. Ignore.
    qDebug() << "Ignoring option" << arg;
    continue;
    }

    if (arg.startsWith ("data:") == true) {
    qDebug() << "Share data URI" << arg;
    itemList << arg;
    } else {
    QFileInfo fileInfo (arg);
    QString fileUri = fileInfo.canonicalFilePath();
    if (fileUri.isEmpty ()) {
    qDebug() << "Share Tracker IRI (?)" << arg;
    itemList << arg;
    } else {
    fileUri.prepend("file://");
    qDebug() << "Share file path uri" << fileUri;
    itemList << fileUri;
    }
    }
    }

    if (help || itemList.isEmpty()) {
    std::cout << "Usage: " << argv[0] << " { <data-uri> | <tracker-iri> | <file-uri> }+ "
    << std::endl;
    exit(0);
    }

    // Create a interface object
    ShareUiInterface shareIf;

    // You can check if interface is valid
    if (shareIf.isValid()) {
    // Start ShareUI application with selected files.
    qDebug() << "Signalling share-ui daemon...";
    shareIf.share (itemList);
    } else {
    qCritical() << "Invalid interface";
    return -1;
    }
    }
    -------------------------

    I tried it on the device with ./service-example /home/user/MyDocs/DCIM/somejpeg.jpg and it launched Share UI properly like Gallery or Camera do.

    Now, there is a caveat. As you can see from a library name, these bindings are done with the help of MeeGoTouch. While it is not a big deal (you can see that my app is using QCoreApplication, after all), for some QML apps it might be a big deal. One particular important thing with MeeGoTouch-based applications that if their D-BUS interface descriptions include task chaining (chainTask="true" attribute, see definitions in /usr/share/dbus-1/interfaces/), then the D-BUS interface behind the scene has additional argument which is an ID of a calling application's main window. This additional argument is passed *first* rather than last, thus it is important to pass it properly. maemo-meegotouch-interfaces bindings hide this from you but if nothing will work for QML app, you would resort back to plain QDBUS calls and then you need to know this.
    Last edited by bokovoy; 2011-08-01 at 11:45.

  13. #28
    Registered User
    Join Date
    Oct 2011
    Posts
    33

    Re: Accessing ShareUI on Harmattan/MeeGo ?

    Hi all!
    I little bit confused about ShareUI. I read all thread, looked at Share-bear project (https://github.com/matyjas/share-bear) but don't understand how to use it. I can't find in my Qt SDK any includes such as mdatauri.h, shareuiinterface.h.
    Do I need to install or enable somehow ShareUI in Qt SDK?

  14. #29
    Registered User
    Join Date
    Sep 2011
    Posts
    449

    Re: Accessing ShareUI on Harmattan/MeeGo ?

    Have you installed the harmattan platform api support from the package manager in qtsdk?

  15. #30
    Registered User
    Join Date
    Oct 2011
    Posts
    33

    Re: Accessing ShareUI on Harmattan/MeeGo ?

    I think I did. I develop N9 application, it's running well on device. For that reason I think I have all required packages. Haven't I? Maybe I need some special packages such as Experimental?

Similar Threads

  1. Grab Volume Keys on Harmattan
    By mzanetti1 in forum Nokia N9
    Replies: 5
    Last Post: 2011-10-25, 22:25
  2. MeeGo on BeagleBoard xm
    By ketan_kamat in forum Nokia N9
    Replies: 1
    Last Post: 2011-06-23, 15:57
  3. Resources on Harmattan
    By goshakkk in forum Nokia N9
    Replies: 5
    Last Post: 2011-06-23, 13:57
  4. Meego on N900
    By waelfarouk in forum Nokia N9
    Replies: 3
    Last Post: 2011-06-23, 13:47
  5. Replies: 2
    Last Post: 2010-10-22, 23:35

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×