[Interest] Qt, QtIFW, CMake and CPackIFW

Konstantin Podsvirov konstantin at podsvirov.pro
Wed Mar 25 06:49:09 CET 2015


Hello, Rizzen!

24.03.2015, 21:54, "Rizzen Yazston" <rizzen.yazston at gmail.com>:
> Hi Konstantin,
>
> I hope you are the correct person I am contacting regarding the CPackIFW. After plenty of searching I came across an email post wanting to promote the usage of CPackIFW.

You have come to the right place. I am the Creator of CPack IFW generator, which allows you to create installers for CMake projects using QtIFW tools.

I want to congratulate you! You are the first person who contacted me personally and expressed a desire to use this generator packages.

> I fairly new to Qt and to using CMake. Not being very good with CMake at this stage, I found the example given on the CPackIFW vague web page. That is how to use CPackIFW and CPack within Cmake to automate working with QtIFW.

CPack IFW generator is a new module in CMake (added in version 3.1). The generator was tested on QtIFW tools version 1.5.0 (Linux and Windows. For MacOS not tested) that you can find on the download page of Qt:

http://download.qt.io/official_releases/qt-installer-framework/1.5.0

> I looking for a more complete more detailed example of CMakeList files using these components. Also the example making use of directory hierarchy structure instead of the flat QMake system used, that is separate bin, build, src, include, rpc, ui, lang (translations) and data (application data files that can't be included in binary).

Documentation specific to CPack IFW generator variables and functions (macros) is on the official website:

http://www.cmake.org/cmake/help/v3.1/module/CPackIFW.html

CPack IFW generator is the tip of the iceberg CMake :-) despite the fact that the generator is still young, he can solve your tasks.

> I hoping you have a more complete example that I can look at for setting up my build and packing process for multi platform support.

Unfortunately there are no detailed examples and tutorials for creating installer using CPack IFW generator. But I too want such materials have appeared in the documentation CMake and Qt.
I think it will be useful for pracital the module description CPackComponent:

http://www.cmake.org/cmake/help/v3.1/module/CPackComponent.html

As well as the documentation for the install command:

http://www.cmake.org/cmake/help/v3.1/command/install.html

In the CMake documentation but there is no place to create guidelines and examples.

The Qt documentation is a description of the work with CMake:

http://doc.qt.io/qt-5/cmake-manual.html

I was contacted by the developers of Qt and they welcomed the opportunity to add information about working with CPack IFW generator in their documentation.

Go back to your task.

Suggest to read the documentation provided in the above links.

Let's assume that you've already read.

CPack generator according to IFW-default.

You can specify CPACK_GENERATOR "IFW".
Or set the advanced option CPACK_BINARY_IFW to "ON" (AND the rest off :-) ).

You need to use the option COMPONENT along with the install command. Use different name (comp_id) component for different parts of the installed project.

Next, set CPACK_XXX variables describing the project.
Then enable the modules:

include(CPack)
include(CPackIFW)

You can use groups for gruppirovki components:

cpack_add_component_group(group_id ...)

Then add for each component CPack configuration:

cpack_add_component(comp_id ... GROUP group_id)

You can then configure specific IFW generator options:
cpack_ifw_configure_component(comp_id ...)
cpack_ifw_configure_component_group(group_id ...)

That's all! :-)

Now your project should appear in the target "package" - it creates the installer.

You can also create online installers, but more on that later if you need it.

We assume that the first guide CPack IFW generator is out!

Dear, Rizzen! If you still have questions, feel free to email me - let's deal!

Good luck in the development of modern tools :-)

--

Regards,
Konstantin Podsvirov
(Sorry for my English)



More information about the Interest mailing list