Qt build Options to skip few modules through configuration file ?
I'm building Qt for iOS. I cloned Qt 5.8 from git. I would like to skip few of the modules. I'm aware of configure -skip option. Since there are many modules my command line becomes too big. I have following questions.
- Is there any configuration file I can supply to configure command by specifying the modules not to be build ?
- How do I get the correct 'module' names ?
Are you worried about typing out a big command line for configure or having it become so big that the shell won't handle it?
If the former, I usually just make a bash script that I execute, i.e.:
./configure <my options>
$ chmod 755 my-config $ ./my-config
:) Not a typing issue. I would like to ensure that I don't any mistake while placing all this. I thought Qt should have some option for this. I saw a file called configure.json. However configure command has no way to give this as input. Not sure how. I'm investigating now.
@dheerendra There may be, I've never seen/used it as I always just write a my-config file for my stuff. That way it also let's me remember my configure for each build as it will sit in the build directory.
cool. Thank you. Silly question..can I specify the -skip <module1> <module2> like this ? Saving my time :)
@dheerendra I think each one needs a
-skipbut that could have changed since I last tried it or it could just be wrong. You can test it but I think each one requires a skip.
First, find the feature list file which locates at "qtbase\src\corelib\global\qfeatures.txt".
Then, drop some features you don't want by configuration command like this -- "configure.bat -static -release -platform win32-g++ -no-opengl -prefix "C:\Qt\Qt5.8.0_MinGW_static" -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests -skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquickcontrols -skip qtquickcontrols2 -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qttools -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns -no-feature-texthtmlparser -no-feature-textodfwriter -no-feature-concurrent -no-feature-effects -no-feature-sharedmemory -no-feature-systemsemaphore -no-feature-im -no-feature-process -no-feature-dom -no-feature-filesystemmodel -no-feature-filesystemwatcher -no-feature-graphicsview -no-feature-graphicseffect -no-feature-sizegrip -no-feature-calendarwidget -no-feature-printpreviewwidget -no-feature-keysequenceedit -no-feature-colordialog -no-feature-filedialog -no-feature-fontdialog -no-feature-printpreviewdialog -no-feature-progressdialog -no-feature-inputdialog -no-feature-errormessage -no-feature-wizard -no-feature-datawidgetmapper -no-feature-imageformat_bmp -no-feature-imageformat_ppm -no-feature-imageformat_xbm -no-feature-imageformat_png -no-feature-imageformat_jpeg -no-feature-image_heuristic_mask -no-feature-image_text -no-feature-colornames -no-feature-cups -no-feature-paint_debug -no-feature-freetype -no-feature-translation -no-feature-codecs -no-feature-big_codecs -no-feature-iconv -no-feature-ftp -no-feature-udpsocket -no-feature-networkproxy -no-feature-socks5 -no-feature-networkdiskcache -no-feature-bearermanagement -no-feature-completer -no-feature-fscompleter -no-feature-desktopservices -no-feature-mimetype -no-feature-systemtrayicon -no-feature-undocommand -no-feature-undostack -no-feature-undogroup -no-feature-undoview -no-feature-statemachine -no-feature-gestures -no-feature-dbus"
In fact, Qt has provided Qt Configuration Tool which is a GUI application for the Qt feature system. You can open the link (http://doc.qt.io/QtEnterpriseEmbedded/qt-configuration-tool.html ) for more information. However, I have not found the link to download the tool. If you can find the tool, please tell me. Thanks.
PS: Some features may be marked as unessential module in the feature file, while they are important for your software like the type, Qsetting, which is essential for the GUI (maybe Core) module.
This post is deleted!
Thank you @Fly-Fan
qtbase\src\corelib\global\qfeatures.txt file NOT there in Qt 5.8 GIT checkout. Also modules names are same as the directory name exist in Qt source code. e.g if the directory name is qtcharts, if you don't want to build qtcharts just pass
-skip qtcharts. For each of the modules you need to specify the skip separately
e.g ./configure -skip qtcharts -skip qtquickcontrols
Partially correct. Many features are attached to one another, in that the feature list file is necessary which can provide you more infornation. But to my dismay, there are some errors in the file or I have not understood the file completely, like the Qsetting type I have mentioned before.
The version of Qt I have installed is qt-opensource-windows-x86-mingw530-5.8.0 and you can download it in the link --http://download.qt.io/official_releases/qt/5.8/5.8.0/. When install Qt, selecting the source option is necessary. I install Qt in this folder -- "C:\Qt", so the feature list file can be found at "C:\Qt\Qt5.8.0\5.8\Src\qtbase\src\corelib\global\qfeatures".
The following content is a part of qfeatures.txt file.
Generic entry format
#Feature: UPPERCASENAME (for the #define)
#Description: One sentence description of what this does.
#Name: CamelCaseName (often a class name)
#SeeAlso: UPPERCASENAME... (currently unused)
Description: Supports scripting Qt-based applications.
Description: Parser for HTML
Description: Provides an ODF writer
Description: Parser for Style Sheets
Description: Perl-compatible regular expression APIs
Description: Provides a high-level multi-threaded APIs
Description: Supports the drag and drop mechansim.
Name: Drag and drop
It seems that I have misunderstood your question aimed at reducing some modules which are unnecessary to your software. Opening Qt assistant, typing and searching the keywords --all modules, you will get what you want. Using command line like -skip qtcanvas3d -skip qtcharts to drop canvas3d and qtcharts modules.
The features I mentioned before is derived from Qt Lite project aimed at creating a more lightweight set of libraries for deployment. A rewritten configuration system that allows for easy customization of Qt builds is introduced by Qt 5.8. Removing some features uncessary to your program will reduce software volume further more.