Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. What is the best way to deploy my application in linux?
Forum Updated to NodeBB v4.3 + New Features

What is the best way to deploy my application in linux?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
linux deploy
11 Posts 6 Posters 4.9k Views 3 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.
  • D dearqt
    3 Apr 2023, 12:53

    Hello everyone,
    I want to deploy my app in ubuntu. How do you deploy your apps in linux, which way do you choose? Thanks in advance.

    J Offline
    J Offline
    JonB
    wrote on 3 Apr 2023, 13:08 last edited by
    #2

    @dearqt The natural answer would be linuxdeployqt.

    1 Reply Last reply
    0
    • D dearqt
      3 Apr 2023, 12:53

      Hello everyone,
      I want to deploy my app in ubuntu. How do you deploy your apps in linux, which way do you choose? Thanks in advance.

      J Offline
      J Offline
      JoeCFD
      wrote on 3 Apr 2023, 15:12 last edited by JoeCFD 4 Mar 2023, 17:04
      #3

      @dearqt is your qt version for deployment the same as the one installed in Ubuntu? If not, it can not be messy.

      D 1 Reply Last reply 5 Apr 2023, 17:34
      0
      • J JoeCFD
        3 Apr 2023, 15:12

        @dearqt is your qt version for deployment the same as the one installed in Ubuntu? If not, it can not be messy.

        D Offline
        D Offline
        dearqt
        wrote on 5 Apr 2023, 17:34 last edited by dearqt 4 May 2023, 17:38
        #4

        @JoeCFD How can I learn this? Which version should I use for ubuntu 22.04? So you are saying that I cannot deploy qt 5.12.12 version in ubuntu 22.04, did I get right?

        J 1 Reply Last reply 5 Apr 2023, 18:46
        0
        • D dearqt
          5 Apr 2023, 17:34

          @JoeCFD How can I learn this? Which version should I use for ubuntu 22.04? So you are saying that I cannot deploy qt 5.12.12 version in ubuntu 22.04, did I get right?

          J Offline
          J Offline
          JoeCFD
          wrote on 5 Apr 2023, 18:46 last edited by JoeCFD 4 May 2023, 20:19
          #5

          @dearqt I did not mean that. Of course, you can. The default Qt version on Ubuntu 22.04 is 5.15.3. If your Qt version for development is the same, you can simply deploy your app and ask the user to install Qt 5.15.3 by themselves(provide a script for users to do it easily).

          If 5.12.12 is applied, you have to install it with your app. The better location is /opt/Qt.
          And you may want to use running time path in cmake or qmake file for all Qt libs to point to /opt/Qt/***/lib.

          D 1 Reply Last reply 5 Apr 2023, 19:53
          0
          • J JoeCFD
            5 Apr 2023, 18:46

            @dearqt I did not mean that. Of course, you can. The default Qt version on Ubuntu 22.04 is 5.15.3. If your Qt version for development is the same, you can simply deploy your app and ask the user to install Qt 5.15.3 by themselves(provide a script for users to do it easily).

            If 5.12.12 is applied, you have to install it with your app. The better location is /opt/Qt.
            And you may want to use running time path in cmake or qmake file for all Qt libs to point to /opt/Qt/***/lib.

            D Offline
            D Offline
            dearqt
            wrote on 5 Apr 2023, 19:53 last edited by dearqt 4 May 2023, 19:56
            #6

            @JoeCFD Thank you for your answer , do you know any tutorial or guide that I can follow to deploy my app? and I did not get the part you said, ask the user to install Qt. SO even though I deploy my app and created and executable, should the user install qt?

            J 1 Reply Last reply 5 Apr 2023, 20:26
            0
            • D dearqt
              5 Apr 2023, 19:53

              @JoeCFD Thank you for your answer , do you know any tutorial or guide that I can follow to deploy my app? and I did not get the part you said, ask the user to install Qt. SO even though I deploy my app and created and executable, should the user install qt?

              J Offline
              J Offline
              JoeCFD
              wrote on 5 Apr 2023, 20:26 last edited by
              #7

              @dearqt Check JonB's reply. The code is here:
              https://github.com/probonopd/linuxdeployqt

              I use cpack of cmake to generate deb file to deploy my app and libs.

              D 1 Reply Last reply 6 Apr 2023, 08:42
              1
              • J JoeCFD
                5 Apr 2023, 20:26

                @dearqt Check JonB's reply. The code is here:
                https://github.com/probonopd/linuxdeployqt

                I use cpack of cmake to generate deb file to deploy my app and libs.

                D Offline
                D Offline
                dearqt
                wrote on 6 Apr 2023, 08:42 last edited by
                #8

                @JoeCFD Thank you.

                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  push_back
                  wrote on 8 Apr 2023, 19:44 last edited by
                  #9

                  Did you look at flatpak see here it's quite simple to generate your flatpak build with KDE framework as runtime (the runtime contains kde and qt framework)

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    JKSH
                    Moderators
                    wrote on 9 Apr 2023, 10:45 last edited by
                    #10

                    See also the official CMake deployment API for Qt (it is currently a Technical Preview, which means it's not complete yet): https://www.qt.io/blog/cmake-deployment-api

                    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                    1 Reply Last reply
                    1
                    • S Offline
                      S Offline
                      SimonSchroeder
                      wrote on 17 Apr 2023, 09:57 last edited by
                      #11

                      Flatpack was already mentioned as one example. We use AppImage instead. linuxdeployqt did not include everything as expected. Hence, we use both linuxdeploy and linuxdeployqt. Here is the main part of our script:

                      #!/bin/bash
                      export VERSION=1.0.0
                      
                      echo == Remove old AppDir. ==
                      rm -rf AppDir
                      
                      echo == Generate new AppDir. ==
                      ./linuxdeploy-x86_64.AppImage --appdir=AppDir --executable=../release/MyApp --desktop-file=MyApp.desktop --icon-file=MyApp.svg
                      
                      echo == Bundle Qt libs and create AppImage. ==
                      cd AppDir
                      ../linuxdeployqt-v8-x86_64.AppImage MyApp.desktop -qmake=/opt/Qt/5.13.2/gcc_64/bin/qmake -appimage
                      
                      echo == Finish up... ==
                      mv MyApp-*-x86_64.AppImage ../MyApp-x86_64.AppImage
                      
                      echo == Done. ==
                      

                      This works well across many Linux distributions. One disadvantage is that an AppImage includes all necessary Qt libraries instead of using those installed on the system. Therefore AppImages can become quite large. But they avoid most incompatibilities of different versions of dynamic libraries.

                      1 Reply Last reply
                      1

                      • Login

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