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
QtWS25 Last Chance

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 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
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Will the end user compile the project him self ?

      A 1 Reply Last reply
      0
      • mrjjM mrjj

        Hi
        Will the end user compile the project him self ?

        A Offline
        A Offline
        anuj nogja
        wrote on last edited by
        #3

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

        1 Reply Last reply
        1
        • mrdebugM Offline
          mrdebugM Offline
          mrdebug
          wrote on 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
          2
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on 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
            4
            • mrdebugM mrdebug

              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 last edited by
              #6

              @mrdebug Thanks for help...

              1 Reply Last reply
              0
              • SGaistS SGaist

                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 last edited by
                #7

                @SGaist Thanks

                1 Reply Last reply
                0
                • mrdebugM mrdebug

                  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 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
                  • mrdebugM Offline
                    mrdebugM Offline
                    mrdebug
                    wrote on 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

                    • Login

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