Problem about the "CreateDesktopEntry" operation



  • 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 ?



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

    "workingDirectory=@TargetDir@"

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.