Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Reducing Qt installation directory size

    Installation and Deployment
    qt 4.8 configure size build install
    3
    8
    4093
    Loading More Posts
    • 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
      Bart_Vandewoestyne last edited by

      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 Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion last edited by

        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

        kshegunov B 2 Replies Last reply Reply Quote 1
        • kshegunov
          kshegunov Moderators @jsulm last edited by

          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 Reply Quote 0
          • B
            Bart_Vandewoestyne @jsulm last edited by

            @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 Reply Quote 0
            • B
              Bart_Vandewoestyne @kshegunov last edited by

              @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/ ;-)

              kshegunov 1 Reply Last reply Reply Quote 0
              • kshegunov
                kshegunov Moderators @Bart_Vandewoestyne last edited by

                @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 Reply Quote 0
                • B
                  Bart_Vandewoestyne @kshegunov last edited by

                  @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).

                  kshegunov 1 Reply Last reply Reply Quote 0
                  • kshegunov
                    kshegunov Moderators @Bart_Vandewoestyne last edited by kshegunov

                    @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 Reply Quote 0
                    • First post
                      Last post