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. Multiple instances even after editing .desktop file

Multiple instances even after editing .desktop file

Scheduled Pinned Locked Moved Mobile and Embedded
7 Posts 4 Posters 3.2k 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.
  • S Offline
    S Offline
    senu188
    wrote on last edited by
    #1

    Hi
    I followed instruction 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

    Edit: clarified title a little bit; Andre

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

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

      I noticed the 2 'Exec' and I removed one of the 'Exec' but still I get multiple instance.
      @Exec=Exec=invoker --single-instance --type=e /opt/insulincal/bin/insulincal@
      changed to
      @Exec=invoker --single-instance --type=e /opt/insulincal/bin/insulincal@

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

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mlong
        wrote on last edited by
        #3

        Did that solve the problem?

        Software Engineer
        My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

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

          Unfortunately no. I am also trying to add space in rules file but I get packaging error. This is in discussion in the following thread-
          http://developer.qt.nokia.com/forums/viewthread/8132/P30/
          Thanks

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

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kkrzewniak
            wrote on last edited by
            #5

            Have a look at the created package, in my case it never actually used my desktop file and packaged a default one not using invoker at all/

            Me, Grimlock, not "nice dino". ME BASH BRAINS!

            1 Reply Last reply
            0
            • P Offline
              P Offline
              profuma
              wrote on last edited by
              #6

              Hi,
              So how can I add the modified desktop file in my deb file? I extracted my deb file with 'universal extractor' and found that the desktop file is different. I want to replace this file with the 'single instance' modified desktop file. What program do you use. Please note that if I replace the modified desktop file in 'Debian' folder and try tom compile the deb file, I again get a new desktop file in the deb pack so I need to replace the desktop file in the compiled deb file.
              Ok, I think that was way too confusing. All I want to know is how to replace desktop file in deb file (like is there a winrar for deb?). I use windows XP SP3 edition.

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kkrzewniak
                wrote on last edited by
                #7

                Try adding:

                @
                defineTest(qtcAddDeployment) {
                for(deploymentfolder, DEPLOYMENTFOLDERS) {
                item = item$${deploymentfolder}
                itemsources = $${item}.sources
                $$itemsources = $$eval($${deploymentfolder}.source)
                itempath = $${item}.path
                $$itempath= $$eval($${deploymentfolder}.target)
                export($$itemsources)
                export($$itempath)
                DEPLOYMENT += $$item
                }

                MAINPROFILEPWD = $$PWD

                unix {
                maemo5 {
                desktopfile.path = /usr/share/applications/hildon
                } else {
                desktopfile.path = /usr/share/applications
                copyCommand =
                for(deploymentfolder, DEPLOYMENTFOLDERS) {
                source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
                source = $$replace(source, \\, /)
                macx {
                target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
                } else {
                target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
                }
                target = $$replace(target, \\, /)
                sourcePathSegments = $$split(source, /)
                targetFullPath = $$target/$$last(sourcePathSegments)
                !isEqual(source,$$targetFullPath) {
                !isEmpty(copyCommand):copyCommand += &&
                copyCommand += $(MKDIR) "$$target"
                copyCommand += && $(COPY_DIR) "$$source" "$$target"
                }
                }
                !isEmpty(copyCommand) {
                copyCommand = @echo Copying application data... && $$copyCommand
                copydeploymentfolders.commands = $$copyCommand
                first.depends = $(first) copydeploymentfolders
                export(first.depends)
                export(copydeploymentfolders.commands)
                QMAKE_EXTRA_TARGETS += first copydeploymentfolders
                }
                }
                installPrefix = /opt/$${TARGET}
                for(deploymentfolder, DEPLOYMENTFOLDERS) {
                item = item$${deploymentfolder}
                itemfiles = $${item}.files
                $$itemfiles = $$eval($${deploymentfolder}.source)
                itempath = $${item}.path
                $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target)
                export($$itemfiles)
                export($$itempath)
                INSTALLS += $$item
                }
                icon.files = $${TARGET}.png
                icon.path = /usr/share/icons/hicolor/64x64/apps
                desktopfile.files = $${TARGET}.desktop
                target.path = $${installPrefix}/bin
                export(icon.files)
                export(icon.path)
                export(desktopfile.files)
                export(desktopfile.path)
                export(target.path)
                INSTALLS += desktopfile icon target
                }

                export (ICON)
                export (INSTALLS)
                export (DEPLOYMENT)
                export (TARGET.EPOCHEAPSIZE)
                export (TARGET.CAPABILITY)
                export (LIBS)
                export (QMAKE_EXTRA_TARGETS)
                }
                @

                to your pro file. This is just an extract for the deployment.pri file you'd normally find in a Qt for symbian project and I found it that this solved the problem of the desktop file not being used.

                Me, Grimlock, not "nice dino". ME BASH BRAINS!

                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