Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Problem about the "CreateDesktopEntry" operation
Forum Updated to NodeBB v4.3 + New Features

Problem about the "CreateDesktopEntry" operation

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 631 Views
  • 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.
  • Li MingL Offline
    Li MingL Offline
    Li Ming
    wrote on last edited by
    #1

    I want to create a *.desktop file on the linux platform with QtIFW.

    What I've done:

    I wrote a config.qs file as following:

    function Component() {
          component.addOperation("CreateDesktopEntry",
                                "executable.desktop",
                                "Exec=\"@TargetDir@/bin/executable\""
                                );
    }
    

    I told cmake to use this script:

    cpack_ifw_configure_component(applications
            VERSION "0.0.1" # Version of component
            SCRIPT "config.qs")
    

    What's right:
    The executable.desktop can be successfully generated during the installation process.

    What's wrong:
    QtIFW replaced the "TargetDir" variable with predifined path "/opt/", instead of the actual installation path. So the created executable.desktop is invalid.

    How to fix it ?

    RatzzR 1 Reply Last reply
    0
    • Li MingL Li Ming

      I want to create a *.desktop file on the linux platform with QtIFW.

      What I've done:

      I wrote a config.qs file as following:

      function Component() {
            component.addOperation("CreateDesktopEntry",
                                  "executable.desktop",
                                  "Exec=\"@TargetDir@/bin/executable\""
                                  );
      }
      

      I told cmake to use this script:

      cpack_ifw_configure_component(applications
              VERSION "0.0.1" # Version of component
              SCRIPT "config.qs")
      

      What's right:
      The executable.desktop can be successfully generated during the installation process.

      What's wrong:
      QtIFW replaced the "TargetDir" variable with predifined path "/opt/", instead of the actual installation path. So the created executable.desktop is invalid.

      How to fix it ?

      RatzzR Offline
      RatzzR Offline
      Ratzz
      wrote on last edited by Ratzz
      #2

      @Li-Ming
      This might be helpful.
      should not you add ?

      "workingDirectory=@TargetDir@"

      --Alles ist gut.

      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