Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [SOLVED] Single instance applications on N950
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Single instance applications on N950

Scheduled Pinned Locked Moved Mobile and Embedded
50 Posts 9 Posters 23.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    matrixx
    wrote on last edited by
    #26

    @Alicemirror: If you are creating an application with the "Harmattan Application" template on QtCreator, you don't have to care about those lines Tomma mentioned, they are automatically added to your .pro file by QtCreator.

    Instead, if you are porting an existing application and want to use your original .pro file, you need to add those lines manually to be able to use the single-instance invoker.

    That might be a good addition to the wiki, if someone wants to port apps without creating a new project template and copying over existing files of the project.

    Nokia Certified Qt Specialist

    1 Reply Last reply
    0
    • AlicemirrorA Offline
      AlicemirrorA Offline
      Alicemirror
      wrote on last edited by
      #27

      @matrixx: thank you for the precision. In effect the first application that I have created with the template had not this omission, but the problem of the export appeared only at the end of the solution of the qt-complex project ported from a first symbian version. I should add tnis to the wiki page.

      I am also planning to write a page with the elemts that should change between a symbian and harmattan QML application using the two different imports of the new Qt Quick components for page navigation and page stack management.

      Many thanks

      Enrico Miglino (aka Alicemirror)
      Balearic Dynamics
      Islas Baleares, Ibiza (Spain)
      www.balearicdynamics.com

      1 Reply Last reply
      0
      • S Offline
        S Offline
        senu188
        wrote on last edited by
        #28

        Hi
        Alicemirror I followed instrution from here -http://developer.qt.nokia.com/wiki/Single_Instance_Harmattan_Applications#57bd2611a5f660693bc0b0d96860058e
        and changed my desktop entry as follows
        @[Desktop Entry]
        Encoding=UTF-8
        Version=1.0
        Type=Application
        Terminal=false
        Name=insulincal
        Exec=Exec=invoker --single-instance --type=e /opt/insulincal/bin/insulincal
        Icon=/usr/share/icons/hicolor/64x64/apps/insulincal.png
        X-Window-Icon=
        X-HildonDesk-ShowInToolbar=true
        X-Osso-Type=application/x-executable
        @
        insulincal is my app name.
        I still get multiple app launches in N950 [on remote data access - I am still waiting for my device]
        Can you pl check what is wrong above ?Thanks

        http://qt-apps.org/usermanager/search.php?username=senu&action=contents

        1 Reply Last reply
        0
        • M Offline
          M Offline
          matrixx
          wrote on last edited by
          #29

          @senu188
          For some people mere recompiling fixes the issue, but at least I needed to do also this following workaround step:

          Edit rules debian packaging file adding a space after MAKE, but remember to preserve tabs in the file, otherwise it will break.

          Nokia Certified Qt Specialist

          1 Reply Last reply
          0
          • S Offline
            S Offline
            senu188
            wrote on last edited by
            #30

            Thanks I will try that and report if [hopefully not!] there is a problem

            http://qt-apps.org/usermanager/search.php?username=senu&action=contents

            1 Reply Last reply
            0
            • AlicemirrorA Offline
              AlicemirrorA Offline
              Alicemirror
              wrote on last edited by
              #31

              hi senu188,

              following the wiki page the described method includes also the suggestion of matrixx.
              What I see in your code is that in line 7 of the post above there is the repetition of Exec= that is an error. Please try again correcting this bug and let me know if it works.

              Cheers.

              Enrico Miglino (aka Alicemirror)
              Balearic Dynamics
              Islas Baleares, Ibiza (Spain)
              www.balearicdynamics.com

              1 Reply Last reply
              0
              • M Offline
                M Offline
                matrixx
                wrote on last edited by
                #32

                @Alicemirror
                I believe someone has been modifying the wiki page, cause the "rules hack" is not there.

                Nokia Certified Qt Specialist

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  senu188
                  wrote on last edited by
                  #33

                  [quote author="Alicemirror" date="1313055734"]hi senu188,

                  following the wiki page the described method includes also the suggestion of matrixx.
                  What I see in your code is that in line 7 of the post above there is the repetition of Exec= that is an error. Please try again correcting this bug and let me know if it works.

                  Cheers.[/quote]
                  I immediately removed one 'Exec' as mentioned in my similar post posted separately[http://developer.qt.nokia.com/forums/viewthread/8687 ]. I am now trying to change the 'rule' file but I seem to have broken the build. I am trying again. The wiki page doesn't have anything about 'rule' I guess someone edited it off. Thanks will try and report

                  http://qt-apps.org/usermanager/search.php?username=senu&action=contents

                  1 Reply Last reply
                  0
                  • AlicemirrorA Offline
                    AlicemirrorA Offline
                    Alicemirror
                    wrote on last edited by
                    #34

                    @senu188
                    @matrixx

                    Mistery solved !!!

                    Please take a look to this post: "Wiki pages edited without control":http://developer.qt.nokia.com/forums/viewthread/8699/

                    Now the page is complete again. Please senu188, check if it works fine.

                    Thank you.

                    Enrico Miglino (aka Alicemirror)
                    Balearic Dynamics
                    Islas Baleares, Ibiza (Spain)
                    www.balearicdynamics.com

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      senu188
                      wrote on last edited by
                      #35

                      I did the following in 'insulincal.desktop' - insulincal is my app name
                      @[Desktop Entry]
                      Encoding=UTF-8
                      Version=1.0
                      Type=Application
                      Terminal=false
                      Name=insulincal
                      Exec=invoker --single-instance --type=e /opt/usr/bin/insulincal
                      Icon=/usr/share/icons/hicolor/64x64/apps/insulincal.png
                      X-Window-Icon=
                      X-HildonDesk-ShowInToolbar=true
                      X-Osso-Type=application/x-executable@

                      The deb is built but still multi-instance so

                      I added a space after $(MAKE) in 'rules' file
                      @
                      $(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/insulincal install

                      I get packaging error
                      Packaging Error: Command 'c:/qtsdk/madde/bin/mad dpkg-buildpackage -nc -uc -us' failed.Exit code: 2
                      @
                      I tried in 2 ways to add space-

                      1. I just add a space using spacebar in rules file inside Qt creator
                      2. I copy the rules file and paste it in Notepad, add a space and again paste that in Qt creator and rebuild
                        In both cases I get error. Is there any other way to add space so build will be proper. Thanks for help

                      http://qt-apps.org/usermanager/search.php?username=senu&action=contents

                      1 Reply Last reply
                      0
                      • AlicemirrorA Offline
                        AlicemirrorA Offline
                        Alicemirror
                        wrote on last edited by
                        #36

                        Sure you get error.

                        The problem is just there: the rules file includes special characters i.e. tabs starting on every line and - I think - linefeeds instead of cr/lf at the end of line. The fact is that you should edit anyway this file with a binary editor else when you save it some essential character is lost.

                        I use Mac with a binary editor, but I am sure that you can find some opensource editor in windows. Wincommander for example has a hex editor and binary editor and other files too. you can try to send me this file (those original working) and I edit it for you. When we are sure that this is the only problem, you search for an adequate program.

                        Enrico Miglino (aka Alicemirror)
                        Balearic Dynamics
                        Islas Baleares, Ibiza (Spain)
                        www.balearicdynamics.com

                        1 Reply Last reply
                        0
                        • AlicemirrorA Offline
                          AlicemirrorA Offline
                          Alicemirror
                          wrote on last edited by
                          #37

                          Sorry, I read again your post.

                          If you open the rules file in the editor then try in any other way - correct or wrong - you loose the original formatting so the file remain fake at all :)

                          Please send it to me so I try with one of mine that is working recovery the special characters.

                          Enrico Miglino (aka Alicemirror)
                          Balearic Dynamics
                          Islas Baleares, Ibiza (Spain)
                          www.balearicdynamics.com

                          1 Reply Last reply
                          0
                          • M Offline
                            M Offline
                            matrixx
                            wrote on last edited by
                            #38

                            I edited my rules file with QtCreator. Before opening the file, I changed preferences to use TABs instead of spaces.

                            Nokia Certified Qt Specialist

                            1 Reply Last reply
                            0
                            • AlicemirrorA Offline
                              AlicemirrorA Offline
                              Alicemirror
                              wrote on last edited by
                              #39

                              @matrixx

                              This is interesting, I have not trusted in Qt creator. If it is sufficient to set how to manage the tabs I'll use next time I need. Thanks.

                              Enrico Miglino (aka Alicemirror)
                              Balearic Dynamics
                              Islas Baleares, Ibiza (Spain)
                              www.balearicdynamics.com

                              1 Reply Last reply
                              0
                              • L Offline
                                L Offline
                                leon.anavi
                                wrote on last edited by
                                #40

                                [quote author="Alicemirror" date="1312095237"]Later I will try with different operating systems than Mac, What platform do you used ? Mac or Win?[/quote]

                                Hi Enrico,

                                Please excuse me for the delay in my answer. I am using Qt SDK on Win XP.

                                Cheers,
                                Leon

                                http://anavi.org/

                                1 Reply Last reply
                                0
                                • AlicemirrorA Offline
                                  AlicemirrorA Offline
                                  Alicemirror
                                  wrote on last edited by
                                  #41

                                  Hi, Leon.

                                  Does the method works now ?

                                  As a matter of fact, if after the rules file edit you have errors this means that edit went wrong. This is a thing I am almost sure.

                                  Enrico Miglino (aka Alicemirror)
                                  Balearic Dynamics
                                  Islas Baleares, Ibiza (Spain)
                                  www.balearicdynamics.com

                                  1 Reply Last reply
                                  0
                                  • L Offline
                                    L Offline
                                    leon.anavi
                                    wrote on last edited by
                                    #42

                                    [quote author="Alicemirror" date="1313226303"]Hi, Leon.

                                    Does the method works now ?

                                    As a matter of fact, if after the rules file edit you have errors this means that edit went wrong. This is a thing I am almost sure.[/quote]

                                    Yes, following the advises that I found in your discussion with matrixx I have managed to publish my app "location2sms":http://store.ovi.com/content/168861 for MeeGo Harmattan in Nokia Ovi Store. Thanks again :)

                                    http://anavi.org/

                                    1 Reply Last reply
                                    0
                                    • AlicemirrorA Offline
                                      AlicemirrorA Offline
                                      Alicemirror
                                      wrote on last edited by
                                      #43

                                      Well, I am happy for this. Now the wiki page is restored to its original content.

                                      Enrico Miglino (aka Alicemirror)
                                      Balearic Dynamics
                                      Islas Baleares, Ibiza (Spain)
                                      www.balearicdynamics.com

                                      1 Reply Last reply
                                      0
                                      • Y Offline
                                        Y Offline
                                        yazwas
                                        wrote on last edited by
                                        #44

                                        I've read thru all of these pages, and also the wiki, and changed my app but I cant seem to make it run!

                                        This is the line in the rules file
                                        $(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/emirates247 install

                                        in the .desktop file this is the content
                                        [Desktop Entry]
                                        Encoding=UTF-8
                                        Version=1.0
                                        Type=Application
                                        Terminal=false
                                        Name=Emirates 24|7
                                        Exec=invoker --single-instance --type=d /opt/emirates247/bin/emirates247
                                        Icon=/usr/share/icons/hicolor/64x64/apps/emirates247.png
                                        X-Window-Icon=
                                        X-HildonDesk-ShowInToolbar=true
                                        X-Osso-Type=application/x-executable

                                        Now this make the app's icon shows correctly, but when clicking on it, it only opens a black screen and it remains black.

                                        any suggestions?
                                        Thanks

                                        1 Reply Last reply
                                        0
                                        • AlicemirrorA Offline
                                          AlicemirrorA Offline
                                          Alicemirror
                                          wrote on last edited by
                                          #45

                                          Hello,

                                          sorry for the delay, I have read only in this moment the mail. Tomorrow morning I'll check you example with mine and see what It can be wrongl

                                          Enrico Miglino (aka Alicemirror)
                                          Balearic Dynamics
                                          Islas Baleares, Ibiza (Spain)
                                          www.balearicdynamics.com

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved