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. questions about make install and uninstall
Forum Updated to NodeBB v4.3 + New Features

questions about make install and uninstall

Scheduled Pinned Locked Moved Solved General and Desktop
11 Posts 2 Posters 1.6k 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.
  • T Offline
    T Offline
    Tink
    wrote on last edited by Tink
    #1

    Hi,

    I'm wondering how DESTDIR compares with other build systems. Sometimes i see make DESTDIR=/dir install like this . Is that usable with qmake as well?

    Also, i noticed that after qmake and make install and make uninstall, empty top level directories will remain . E.g. make install creates /opt/share/doc/<appname>/<filename>. And after make uninstall, /opt/share/doc/ is still there with nothing else in the directory since it was created by the make install. This seems to happen for every directory that was created to have other directories. Is this expected behaviour?

    T 1 Reply Last reply
    0
    • T Tink

      Hi,

      I'm wondering how DESTDIR compares with other build systems. Sometimes i see make DESTDIR=/dir install like this . Is that usable with qmake as well?

      Also, i noticed that after qmake and make install and make uninstall, empty top level directories will remain . E.g. make install creates /opt/share/doc/<appname>/<filename>. And after make uninstall, /opt/share/doc/ is still there with nothing else in the directory since it was created by the make install. This seems to happen for every directory that was created to have other directories. Is this expected behaviour?

      T Offline
      T Offline
      Tink
      wrote on last edited by
      #2

      Can anyone comment on this?
      Or should this be asked in another part of the forum..?

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

        Hi,

        Please show some patience and allow at least 24 hours before bumping your own thread. This is a voluntary driven forum and people may not even live in the same time zone as you.

        As for your question, you should not try to hard code through qmake where your application should go. That's rather a choice for your users.

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

        T 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          Please show some patience and allow at least 24 hours before bumping your own thread. This is a voluntary driven forum and people may not even live in the same time zone as you.

          As for your question, you should not try to hard code through qmake where your application should go. That's rather a choice for your users.

          T Offline
          T Offline
          Tink
          wrote on last edited by
          #4

          Hey @SGaist

          I will be more patient in the future. And i do appreciate the efforts of people like you responding as much as you do. They should pay you i think. Or give you a free lifelong license at least!

          As for my question, i'm not trying to hard code the final destination. But trying to understand what can be done for packaging. With GNU Autotools i see DESTDIR a lot for a temporary destination.

          The DESTDIR variable can be used to perform a staged installation. The package should be configured as if it was going to be installed in its final location (e.g., --prefix /usr), but when running make install, the DESTDIR should be set to the absolute name of a directory into which the installation will be diverted. From this directory it is easy to review which files are being installed where, and finally copy them to their final location by some means. (https://www.gnu.org/software/automake/manual/html_node/DESTDIR.html)

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

            Packaging is even a different thing. Can you explain what kind of package you want to create ?

            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
            • T Offline
              T Offline
              Tink
              wrote on last edited by
              #6

              Well for whatever Linux distro is being used. It can be accomplished with cp commands but if it can be done with a make command, it would be the more elegant solution i think. Since all the install sets are already defined in the project file for a make install.

              1 Reply Last reply
              0
              • T Offline
                T Offline
                Tink
                wrote on last edited by Tink
                #7

                Ok, it seems that for this purpose $INSTALL_ROOT exist. https://doc.qt.io/qt-5.9/deployment-android.html

                The documentation is a bit confusing/lacking at times when one expects to find the info in a certain place only to discover it on stackoverflow first and then on an android specific page...

                Which leaves the other question of the remaining empty directories, if anyone knows how to fix that?

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

                  That's were there's something not clear. You are talking about packaging your application, yet you would use make install which implies compiled your code.

                  So which is your use case ?

                  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
                  • T Offline
                    T Offline
                    Tink
                    wrote on last edited by Tink
                    #9

                    People, end user or packager, can download the code, qmake, make, make install. And in the case of creating a package, they can use make install with INSTALL_ROOT and then use the specific distribution's packaging method. Which uses the temporary install location which has the correct filesystem layout, to create a package.

                    Makes sense?

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

                      Yes it does, in the case if DESTDIR, it's rather for when you use the subdir template. For example to group your libs together. Nowadays, you would use it with OUT_PWD so you can easily use out of source build while having the option to structure your generated applications/libraries.

                      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
                      • T Offline
                        T Offline
                        Tink
                        wrote on last edited by Tink
                        #11

                        Ah i see. Well i just use the app template.

                        The other question i had about the empty directories not getting removed, is because the Makefile has a plain rmdir for the DEL_DIR variable. Changing that with rmdir -p fixes it. E.g. make uninstall DEL_DIR='rmdir -p'.

                        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