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. The problem of a .qs file when creating a shortcut

The problem of a .qs file when creating a shortcut

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 3 Posters 1.5k 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.
  • tomyT Offline
    tomyT Offline
    tomy
    wrote on last edited by tomy
    #1

    Hi all,

    I think you all have experienced this step and for me it's the first time.
    I'm going to create an installer for my Qt app using Qt Installer Framework.
    The scenario is as follows:

    I have a Qt Cal_app.exe file and a package_directory folder on my Windows Desktop with the following contents:

    • The package_directory's contents.

    • The config folder contains a config.xml file.

    • The packages folder contains a subfolder named com.vendor.product. And it, contains two other subfolders named data and meta.

    • The data subfolder contains a file named data.7z.

    • The meta subfolder contains three files: A license.txt file, a package.xml file, and a installscript.qs file.

    By a Command Line, I try to use the binarycreator.exe file to create the installer this way:

    C:\Qt\QtIFW2.0.3\bin\binarycreator.exe -c C:\Users\CS\Desktop\package_directory\config\config.xml -p C:\Users\CS\Desktop\package_directory\packages C:\Users\CS\Desktop\Cal_app.exe

    The Command is run well and without any error and it creates an installer (program) named Cal_app on my Desktop.

    When I run that program to install it on my Windows machine, it will be installed and it also (like any usual program) creates a shortcut named Calon the Desktop. Until now everything OK.

    But the problem!
    The problem is that, that shortcut file (Cal) is an unknown file and it shows an error message!

    My question is, what is the problem with the installscript.qs file that creates an "unknown" shortcut, and how to solve it, so that it creates a useful shortcut please?

    J.HilkJ 1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      Couple of other questions. Does your software works from the directory where it is installed? Are able to create shortcut for your program manua and does it works ?

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      tomyT 1 Reply Last reply
      4
      • tomyT tomy

        Hi all,

        I think you all have experienced this step and for me it's the first time.
        I'm going to create an installer for my Qt app using Qt Installer Framework.
        The scenario is as follows:

        I have a Qt Cal_app.exe file and a package_directory folder on my Windows Desktop with the following contents:

        • The package_directory's contents.

        • The config folder contains a config.xml file.

        • The packages folder contains a subfolder named com.vendor.product. And it, contains two other subfolders named data and meta.

        • The data subfolder contains a file named data.7z.

        • The meta subfolder contains three files: A license.txt file, a package.xml file, and a installscript.qs file.

        By a Command Line, I try to use the binarycreator.exe file to create the installer this way:

        C:\Qt\QtIFW2.0.3\bin\binarycreator.exe -c C:\Users\CS\Desktop\package_directory\config\config.xml -p C:\Users\CS\Desktop\package_directory\packages C:\Users\CS\Desktop\Cal_app.exe

        The Command is run well and without any error and it creates an installer (program) named Cal_app on my Desktop.

        When I run that program to install it on my Windows machine, it will be installed and it also (like any usual program) creates a shortcut named Calon the Desktop. Until now everything OK.

        But the problem!
        The problem is that, that shortcut file (Cal) is an unknown file and it shows an error message!

        My question is, what is the problem with the installscript.qs file that creates an "unknown" shortcut, and how to solve it, so that it creates a useful shortcut please?

        J.HilkJ Offline
        J.HilkJ Offline
        J.Hilk
        Moderators
        wrote on last edited by
        #3

        @tomy

        it sounds like the installer did exactly that, what you told him to do.

        The problem seems to be in the data folder. Here you'll have to place all necessary files and dlls your program needst o run, including your executable.

        If you pack your file to a *.7z file instead of placing them uncompressed into the folder. The installer does not know, that it has to unpack the files in the data folder, and you'll have to tell him, to do so.

        I'm not sure if or how you can tell the QtInstallerframework that the files in data-folder need to be unpacked. I'm afraid, I'm not using the framework often enough myself.


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        1 Reply Last reply
        1
        • dheerendraD dheerendra

          Couple of other questions. Does your software works from the directory where it is installed? Are able to create shortcut for your program manua and does it works ?

          tomyT Offline
          tomyT Offline
          tomy
          wrote on last edited by
          #4

          @dheerendra

          Does your software works from the directory where it is installed?

          It is installed in the InstallationDirectory directory in the path: C:\Users\CS. (as stated in the config.xml file <TargetDir>@HomeDir@/InstallationDirectory</TargetDir>).

          But the Cal.exe file doesn't work there!

          Are able to create shortcut for your program manua and does it works ?

          I think the problem is about the data subdirectory.

          @J.Hilk

          it sounds like the installer did exactly that, what you told him to do.

          The problem seems to be in the data folder. Here you'll have to place all necessary files and dlls your program needst o run, including your executable.

          If you pack your file to a *.7z file instead of placing them uncompressed into the folder. The installer does not know, that it has to unpack the files in the data folder, and you'll have to tell him, to do so.

          Yes, I, too, think that (as the error message in my previous post stated) the problem is of the data folder.

          1 Reply Last reply
          0
          • tomyT Offline
            tomyT Offline
            tomy
            wrote on last edited by tomy
            #5

            I tried to fix the issue of the data folder this way:

            I firstly placed the Cal.exe with its required .dll files into the data folder in its path:
            C:\Users\CS\Desktop\package_directory\packages\com.vendor.product\data
            I tested the Cal.exe and it worked fine.

            Then I ran the windeployqt on that data folder. The Command created some extra files and folders there. Now once again I went for testing the Cal.exe to see if it works or not. It didn't!!! It didn't work! :(

            Gave this error message.

            If it works after running windeployqt, I will make it a .7z file and go for creating the installer.

            J.HilkJ 1 Reply Last reply
            0
            • tomyT tomy

              I tried to fix the issue of the data folder this way:

              I firstly placed the Cal.exe with its required .dll files into the data folder in its path:
              C:\Users\CS\Desktop\package_directory\packages\com.vendor.product\data
              I tested the Cal.exe and it worked fine.

              Then I ran the windeployqt on that data folder. The Command created some extra files and folders there. Now once again I went for testing the Cal.exe to see if it works or not. It didn't!!! It didn't work! :(

              Gave this error message.

              If it works after running windeployqt, I will make it a .7z file and go for creating the installer.

              J.HilkJ Offline
              J.HilkJ Offline
              J.Hilk
              Moderators
              wrote on last edited by
              #6

              @tomy

              if it works after running windeployqt, don't make a .7z out of it, just copy the files as they are to the data folder.

              I know it says otherwise in the docu:

              Data Directory
              
              The data directory contains the content that the installer extracts during the installation. You must package the data as a 7zip archive (.7z). You can use either the archivegen tool that is delivered with the Qt Installer Framework or some other tool that generates 7zip archives.
              

              but I did not read that previously and the installer framework works 100% fine and correct for me. This entry might refer to an older version of the installer.


              Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


              Q: What's that?
              A: It's blue light.
              Q: What does it do?
              A: It turns blue.

              tomyT 1 Reply Last reply
              1
              • J.HilkJ J.Hilk

                @tomy

                if it works after running windeployqt, don't make a .7z out of it, just copy the files as they are to the data folder.

                I know it says otherwise in the docu:

                Data Directory
                
                The data directory contains the content that the installer extracts during the installation. You must package the data as a 7zip archive (.7z). You can use either the archivegen tool that is delivered with the Qt Installer Framework or some other tool that generates 7zip archives.
                

                but I did not read that previously and the installer framework works 100% fine and correct for me. This entry might refer to an older version of the installer.

                tomyT Offline
                tomyT Offline
                tomy
                wrote on last edited by
                #7

                @J.Hilk
                Yeah, but the problem is that .exe file works before running the windeployqt, but not after it!! :(

                The data folder can be downloaded from here.

                J.HilkJ 1 Reply Last reply
                0
                • tomyT tomy

                  @J.Hilk
                  Yeah, but the problem is that .exe file works before running the windeployqt, but not after it!! :(

                  The data folder can be downloaded from here.

                  J.HilkJ Offline
                  J.HilkJ Offline
                  J.Hilk
                  Moderators
                  wrote on last edited by
                  #8

                  @tomy
                  mmh
                  seems like windeployqt uses outdated dll's.
                  the dlls have the qt-versions code of 5.7.0.0 Did you compile for 5.7 or 5.8?

                  I replaced the dll's with those from my qt5.8 folder and I could start your programm.


                  Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                  Q: What's that?
                  A: It's blue light.
                  Q: What does it do?
                  A: It turns blue.

                  tomyT 1 Reply Last reply
                  1
                  • J.HilkJ J.Hilk

                    @tomy
                    mmh
                    seems like windeployqt uses outdated dll's.
                    the dlls have the qt-versions code of 5.7.0.0 Did you compile for 5.7 or 5.8?

                    I replaced the dll's with those from my qt5.8 folder and I could start your programm.

                    tomyT Offline
                    tomyT Offline
                    tomy
                    wrote on last edited by
                    #9

                    @J.Hilk

                    sometime ago I was using Qt Creator 5.5.1. But when mrjj suggested using 5.7, I uninstalled 5.5.1 and installed 5.7.

                    The program is built rand run using 5.7.
                    Do you mean that I should uninstall 5.7 and install 5.8?

                    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