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. How to generate executable for the user

How to generate executable for the user

Scheduled Pinned Locked Moved Solved General and Desktop
9 Posts 4 Posters 1.8k 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.
  • A Offline
    A Offline
    anuj nogja
    wrote on 18 Mar 2018, 10:10 last edited by
    #1

    Hi All,
    I have developed a project in qt using QtCreator in Linux7.2.
    After rebuild, build directory created and to run this project. I goto that build directory and then run the project executable using ./<project-name>.
    User want this executable in its home directory such that he need not go to build folder, directly he can run by going into its home directory.
    Please suggest, how to achieve this..
    Regards,
    Anuj

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 18 Mar 2018, 11:02 last edited by
      #2

      Hi
      Will the end user compile the project him self ?

      A 1 Reply Last reply 18 Mar 2018, 13:21
      0
      • M mrjj
        18 Mar 2018, 11:02

        Hi
        Will the end user compile the project him self ?

        A Offline
        A Offline
        anuj nogja
        wrote on 18 Mar 2018, 13:21 last edited by
        #3

        @mrjj no...i have to give compiled version.
        User will run the software.

        1 Reply Last reply
        1
        • M Offline
          M Offline
          mrdebug
          wrote on 18 Mar 2018, 15:28 last edited by
          #4

          It is very easy.If the machine is the same you have only to create a link to the exe from his home dir.
          If the exe is in another machine you have only to learn how to link the .so and plugins objects.

          Need programmers to hire?
          www.labcsp.com
          www.denisgottardello.it
          GMT+1
          Skype: mrdebug

          A 2 Replies Last reply 23 Mar 2018, 04:39
          2
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 18 Mar 2018, 22:02 last edited by
            #5

            Hi,

            Then you need to do a proper deployment of your application.

            linuxdeployqt is a pretty good helper for that.

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

            A 1 Reply Last reply 23 Mar 2018, 04:39
            4
            • M mrdebug
              18 Mar 2018, 15:28

              It is very easy.If the machine is the same you have only to create a link to the exe from his home dir.
              If the exe is in another machine you have only to learn how to link the .so and plugins objects.

              A Offline
              A Offline
              anuj nogja
              wrote on 23 Mar 2018, 04:39 last edited by
              #6

              @mrdebug Thanks for help...

              1 Reply Last reply
              0
              • S SGaist
                18 Mar 2018, 22:02

                Hi,

                Then you need to do a proper deployment of your application.

                linuxdeployqt is a pretty good helper for that.

                A Offline
                A Offline
                anuj nogja
                wrote on 23 Mar 2018, 04:39 last edited by
                #7

                @SGaist Thanks

                1 Reply Last reply
                0
                • M mrdebug
                  18 Mar 2018, 15:28

                  It is very easy.If the machine is the same you have only to create a link to the exe from his home dir.
                  If the exe is in another machine you have only to learn how to link the .so and plugins objects.

                  A Offline
                  A Offline
                  anuj nogja
                  wrote on 24 Mar 2018, 12:31 last edited by
                  #8

                  @mrdebug could u pls tell me that how to link .so and plugin objects to run application on linux 7.2 machine.

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mrdebug
                    wrote on 24 Mar 2018, 18:14 last edited by
                    #9

                    On Linux I normally put this lines of code in the .pro file

                    unix:!mac {
                      LIBS += -Wl,-rpath=\\\$$ORIGIN/libs
                    }
                    

                    For the plugins the path is in the qt.conf file. My qt.conf file is

                    [Paths]
                    Plugins=plugins
                    Libraries=libs
                    

                    At this point, in the executable folder, I create a link called libs that point to the libraries folder, the folder where there are the Qt libraries and the others used by the executable.
                    I have notice that some Qt plugins used the Qt libraries folder, searching for a folder named lib so I normally create a lib link to libs (ln libs lib)

                    Need programmers to hire?
                    www.labcsp.com
                    www.denisgottardello.it
                    GMT+1
                    Skype: mrdebug

                    1 Reply Last reply
                    2

                    1/9

                    18 Mar 2018, 10:10

                    • Login

                    • Login or register to search.
                    1 out of 9
                    • First post
                      1/9
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved