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. On the way of making an app installable
Forum Updated to NodeBB v4.3 + New Features

On the way of making an app installable

Scheduled Pinned Locked Moved Unsolved General and Desktop
49 Posts 3 Posters 14.4k Views 2 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.
  • SGaistS SGaist

    Why are you adding qt-installer-framework-opensource-2.0.1-x86 to your installer ?

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

    @SGaist
    I hadn't used it until now and thought it should be probably added to there. I just guessed. :(

    OK, I will remove it from there.

    And what then please?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #31

      Are you following the tutorial here ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      tomyT 1 Reply Last reply
      1
      • SGaistS SGaist

        Are you following the tutorial here ?

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

        @SGaist

        Summary:

        I have a package_directory folder on my Windows Desktop with these sub-folders. The config.xml file contains this. The data subfolder contains the data.7z file. The meta subfolder contains a package.xml file with this content.

        following the link, I got to the Creating the Installer Binary where it says:
        On Windows:
        ....\bin\binarycreator.exe -c config\config.xml -p packages YourInstaller.exe

        Whatever I searched I didn't find a .exe file named binarycreator. After searching the Web, I downloaded QtInstallerFramework-win-x86.exe from here and installed it and finally could find that .exe file in path: C:\Qt\QtIFW2.0.3\bin\binarycreator.exe

        Now everything is ready to implement the command above. So by a command like I went to the path of package_directory on my Desktop and typed C:\Qt\QtIFW2.0.3\bin\binarycreator.exe -c config\config.xml -p packages YourInstaller.exe and hit Enter.

        The message of the command line, as stated in the following, is seemingly all about the package.xml file.

        0_1486717978694_upload-c042a463-6e2c-4cdf-98f6-3a42621bb960

        And no installer is created on my package_directory folder unfortunately. :(

        Would you please tell me how to solve this?

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

          My last works:

          1- I changed the file config.xml to this.
          2- Created a licens.txt file on my Desktop and changed the file package.xml to this.

          3- Created a folder named Result on my Desktop and pasted the Cal.exe file from the Release folder onto it.
          4- Ran this command.

          Now what is the problem please?

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #34

            Put the license in the same folder as your script.

            On a side note, you are using single backslashes in your path which mean you are escaping characters.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            tomyT 1 Reply Last reply
            1
            • SGaistS SGaist

              Put the license in the same folder as your script.

              On a side note, you are using single backslashes in your path which mean you are escaping characters.

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

              @SGaist

              @SGaist said in On the way of making an app installable:

              Put the license in the same folder as your script.

              Do you mean into the meta folder?

              On a side note, you are using single backslashes in your path which mean you are escaping characters.

              Do you mean that I should use double-backslashes for my paths, like below?

              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\Result\Cal.exe

              It seems rather odd! (Each single backslash to be changed to a double-backslashes)

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #36

                In the same folder as package.xml

                I mean again in package.xml. Don't mix command line and text file content.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                tomyT 1 Reply Last reply
                0
                • SGaistS SGaist

                  In the same folder as package.xml

                  I mean again in package.xml. Don't mix command line and text file content.

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

                  @SGaist
                  OK, I copied the license.txt onto the mate folder (where the package.xml exists).
                  And changed package.xml license section to this:

                  <Licenses>
                          <License name="Beer Public License Agreement" file="C:\\Users\\CS\\Desktop\\license.txt" />
                      </Licenses>
                  

                  And then ran the command.
                  Again the same result.
                  http://uploads.im/d2bNT.jpg

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #38

                    If it's in the same folder then there's no need to put any path, just the file name

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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

                      Thank you, it worked. :)

                      But one question and one issue!

                      The question: I'd changed the config.xml to this and package.xml to this.

                      When I ran the command line, I got an issue about the Name tag as follows:

                      [1] Warning: The <Name> tag in the 'C:/Users/CS/Desktop/package_directory/packag
                      es/com.vendor.product/meta/package.xml' is ignored - the installer uses the path
                      element right before the 'meta' ('com.vendor.product').
                      C:\Qt\QtIFW2.0.3\bin>

                      Should I ignore it? If not how to solve it, too, please?

                      The issue: The installer file exists in the Result folder on Desktop. When I install it and select a folder on Start Menu (say Accessories or Start Up) to have the shortcut of the program, no shortcut will be created or saved there!! :(

                      What is the reason for that problem and how should I solve it please?

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #40

                        Fix the Name entry in your package.xml. It should be a domain-like identification.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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

                          I used com.vendor.product and it worked. Thank you. :)

                          Through helping I was said that I need a Script file called installscript.qs to be added to the same folder as package.xml (in meta folder) with these contents. And package.xml should also be changed to have the name of that Script.

                          I did these and ran the command again.
                          It created an unknown shortcut, with this error message.

                          If it's what the program needs to create a shortcut, so please tell that how to fix this one too?
                          I think it is the last step probably.

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #42

                            Is the file really where the link is pointing to ?

                            By the way there's also an example here for the start menu.

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            tomyT 1 Reply Last reply
                            0
                            • SGaistS SGaist

                              Is the file really where the link is pointing to ?

                              By the way there's also an example here for the start menu.

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

                              @SGaist said in On the way of making an app installable:

                              Is the file really where the link is pointing to ?

                              Yes, the file installscript.qs is in the meta folder with these contents.

                              By the way there's also an example here for the start menu.

                              Does it mean I should again read the Docs!? :( :( :(
                              They are not that clear and I will have to again ask 100 questions. :( :(

                              1 Reply Last reply
                              0
                              • SGaistS Offline
                                SGaistS Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on last edited by
                                #44

                                I mean, is Calc.exe really where the link is pointing to ?
                                Can you start it without using the link ?

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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

                                  I tried to understand that .qs file and only figured out that it tries to create a shortcut on both Start Menu and Desktop (Windows) and couldn't find any flaw in it.

                                  If the problem is of the paths as the error message says, so why that unknown shortcut is even created? If paths are not compatible, so no shortcut should be created, I assume.

                                  As another attempt to solve the problem, I copied the Cal.exe file (from Release folder) and pasted it on Desktop (to eliminate any incompatible paths ) and re-ran this command:

                                  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.exe

                                  Again, the same result, an "unknown" shortcut!!

                                  I also read this link and tried to find a clue to solve the issue, but didn't see any differences with my .qs file. :( :(

                                  1 Reply Last reply
                                  0
                                  • SGaistS Offline
                                    SGaistS Offline
                                    SGaist
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #46

                                    Because Windows doesn't forbid to create invalid links.

                                    Is it me or are you naming your installer the same name as your application ?

                                    Interested in AI ? www.idiap.ch
                                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                    tomyT 1 Reply Last reply
                                    0
                                    • SGaistS SGaist

                                      Because Windows doesn't forbid to create invalid links.

                                      Is it me or are you naming your installer the same name as your application ?

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

                                      @SGaist
                                      Please SGaist remember that I'm a newcomer of Qt and the first time I hear Qt Installer Framework, .qs files, creating an installer and .xml files.

                                      OK, I copied the Cal.exe file on Desktop and named it Cal_app. Then ran the Command:

                                      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

                                      Exactly the same outcome!

                                      1 Reply Last reply
                                      0
                                      • SGaistS Offline
                                        SGaistS Offline
                                        SGaist
                                        Lifetime Qt Champion
                                        wrote on last edited by
                                        #48

                                        The content of the CreateShortcut command should point to where your executable will be installed. In your code your application is called Cal.exe.

                                        Then in your binarycreator.exe call, you name the installer also Cal.exe thus aren't they both having the same name ?

                                        Interested in AI ? www.idiap.ch
                                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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

                                          Please read my previous edited post. I changed the name of Cal.exe file.

                                          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