Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Reducing Qt installation directory size
QtWS25 Last Chance

Reducing Qt installation directory size

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
qt 4.8configuresizebuildinstall
8 Posts 3 Posters 4.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.
  • B Offline
    B Offline
    Bart_Vandewoestyne
    wrote on 27 Jan 2016, 13:17 last edited by
    #1

    We manually build Qt 4.8.7 here. I am trying to reduce the size of our Qt installation directory as much as possible. One of my strategies is to exclude as much as possible at configure time. For example, this is my configure command:

    configure -prefix D:\Qt\builds\win32-x86-vc110-xp\4.8.7 ^
                   -confirm-license ^
                   -debug-and-release ^
                   -opensource ^
                   -platform win32-msvc2012 ^
                   -no-sse ^
                   -no-sse2 ^
                   -openssl -I D:\OpenSSL\builds\win32-x86-vc110-xp\1.0.2e\include -L D:\OpenSSL\builds\win32-x86-vc110-xp\1.0.2e ^
                   -no-webkit ^
                   -no-opengl ^
                   -no-phonon ^
                   -no-phonon-backend ^
                   -no-multimedia ^
                   -no-audio-backend ^
                   -no-scripttools ^
                   -no-declarative ^
                   -no-declarative-debug ^
                   -nomake examples ^
                   -nomake demos ^
                   -mp ^
                   -saveconfig bart
    

    However, after an nmake install, my install directory is still 784 MB, of which the doc directory takes 323 MB:

    $ du -sc * | sort -n
    28      demos
    176     examples
    336     phrasebooks
    336     q3porting.xml
    2132    mkspecs
    8201    translations
    14812   include
    30460   plugins
    103096  bin
    302028  lib
    323108  doc
    784713  total
    

    My question is twofold:

    1. Is there a way to avoid the docs being generated and copied over to the Qt installation directory? I don't see a -no-docs option at configure time... I could of course manually remove the doc directory after the nmake install, but if I can avoid that it is being created by using the appropriate configure option, that would even be nicer (shorter build times and no need to manually delete afterwards).

    2. Are there any other configure tricks that I can use to reduce the size of my installation directory after an nmake install?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 28 Jan 2016, 05:53 last edited by
      #2

      Not an answer to your questions: why do you use -no-sse and -no-sse2? This will not make your binaries smaller but slower.
      If you don't need debug information you should not use -debug-and-release, use -release instead.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      K B 2 Replies Last reply 28 Jan 2016, 06:01
      1
      • J jsulm
        28 Jan 2016, 05:53

        Not an answer to your questions: why do you use -no-sse and -no-sse2? This will not make your binaries smaller but slower.
        If you don't need debug information you should not use -debug-and-release, use -release instead.

        K Offline
        K Offline
        kshegunov
        Moderators
        wrote on 28 Jan 2016, 06:01 last edited by
        #3

        Not an answer to your questions: why do you use -no-sse and -no-sse2? This will not make your binaries smaller but slower.

        I second that!

        @Bart_Vandewoestyne

        Is there a way to avoid the docs being generated and copied over to the Qt installation directory?

        I for one don't know of any.

        Are there any other configure tricks that I can use to reduce the size of my installation directory after an nmake install?

        Your installation directory is what you use to extract the binaries for deployment, it's not supposed to be deployed as such.

        Additionally, you seem to use nmake, which as far as I know is MS's variant of the linux's make, but somehow du -sc * | sort -n? It doesn't make much sense to me.

        Kind regards.

        Read and abide by the Qt Code of Conduct

        B 1 Reply Last reply 28 Jan 2016, 09:27
        0
        • J jsulm
          28 Jan 2016, 05:53

          Not an answer to your questions: why do you use -no-sse and -no-sse2? This will not make your binaries smaller but slower.
          If you don't need debug information you should not use -debug-and-release, use -release instead.

          B Offline
          B Offline
          Bart_Vandewoestyne
          wrote on 28 Jan 2016, 09:24 last edited by
          #4

          @jsulm said:

          Not an answer to your questions: why do you use -no-sse and -no-sse2? This will not make your binaries smaller but slower.

          One of the target platforms we still have to support is a Windows XP Embedded device with a Geode processor. According to http://wiki.laptop.org/go/Geode_instruction_set it does not fully support SSE nor SSE2. If we did compile with SSE and SSE2, we got "Illegal Instruction" errors at runtime.

          If you don't need debug information you should not use -debug-and-release, use -release instead.

          We do need debug info.

          1 Reply Last reply
          0
          • K kshegunov
            28 Jan 2016, 06:01

            Not an answer to your questions: why do you use -no-sse and -no-sse2? This will not make your binaries smaller but slower.

            I second that!

            @Bart_Vandewoestyne

            Is there a way to avoid the docs being generated and copied over to the Qt installation directory?

            I for one don't know of any.

            Are there any other configure tricks that I can use to reduce the size of my installation directory after an nmake install?

            Your installation directory is what you use to extract the binaries for deployment, it's not supposed to be deployed as such.

            Additionally, you seem to use nmake, which as far as I know is MS's variant of the linux's make, but somehow du -sc * | sort -n? It doesn't make much sense to me.

            Kind regards.

            B Offline
            B Offline
            Bart_Vandewoestyne
            wrote on 28 Jan 2016, 09:27 last edited by
            #5

            @kshegunov

            Additionally, you seem to use nmake, which as far as I know is MS's variant of the linux's make, but somehow du -sc * | sort -n? It doesn't make much sense to me.

            We indeed use Visual Studio 2012 on Windows, but that doesn't mean we can't use Cygwin: http://cygwin.org/ ;-)

            K 1 Reply Last reply 28 Jan 2016, 09:32
            0
            • B Bart_Vandewoestyne
              28 Jan 2016, 09:27

              @kshegunov

              Additionally, you seem to use nmake, which as far as I know is MS's variant of the linux's make, but somehow du -sc * | sort -n? It doesn't make much sense to me.

              We indeed use Visual Studio 2012 on Windows, but that doesn't mean we can't use Cygwin: http://cygwin.org/ ;-)

              K Offline
              K Offline
              kshegunov
              Moderators
              wrote on 28 Jan 2016, 09:32 last edited by
              #6

              @Bart_Vandewoestyne
              Yes I forgot that this exists. Anyway, this was a side note and it's not very important. However I still don't get why do you need to reduce the size of your build folder ... you just deploy those dll's that you're actually using, no?

              Read and abide by the Qt Code of Conduct

              B 1 Reply Last reply 28 Jan 2016, 15:29
              0
              • K kshegunov
                28 Jan 2016, 09:32

                @Bart_Vandewoestyne
                Yes I forgot that this exists. Anyway, this was a side note and it's not very important. However I still don't get why do you need to reduce the size of your build folder ... you just deploy those dll's that you're actually using, no?

                B Offline
                B Offline
                Bart_Vandewoestyne
                wrote on 28 Jan 2016, 15:29 last edited by
                #7

                @kshegunov said:

                @Bart_Vandewoestyne
                However I still don't get why do you need to reduce the size of your build folder ... you just deploy those dll's that you're actually using, no?

                I forgot to mention: we're storing our Qt build in our version management system, so that's why I want to keep its size as minimal as possible (without loosing any functionality).

                K 1 Reply Last reply 28 Jan 2016, 16:49
                0
                • B Bart_Vandewoestyne
                  28 Jan 2016, 15:29

                  @kshegunov said:

                  @Bart_Vandewoestyne
                  However I still don't get why do you need to reduce the size of your build folder ... you just deploy those dll's that you're actually using, no?

                  I forgot to mention: we're storing our Qt build in our version management system, so that's why I want to keep its size as minimal as possible (without loosing any functionality).

                  K Offline
                  K Offline
                  kshegunov
                  Moderators
                  wrote on 28 Jan 2016, 16:49 last edited by kshegunov
                  #8

                  @Bart_Vandewoestyne said:

                  we're storing our Qt build in our version management system

                  This is a strange thing to do, since Qt guarantees binary compatibility between minor versions, but well, you're free to choose. Unfortunately, I don't see how you could decrease the size further, beside deleting the docs, as the libraries are in the /lib directory and they're the next biggest size. Maybe store only the libs that you're using, i.e. these that you're going to deploy. No point in keeping QtXml if you're not using it, right?

                  Read and abide by the Qt Code of Conduct

                  1 Reply Last reply
                  0

                  4/8

                  28 Jan 2016, 09:24

                  • Login

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