table of Contents
1. Introduction to Qt Installer Framework
2. Qt Installer Framework installation
3. Using Qt Installer Framework
1. Introduction to Qt Installer Framework
Qt Installer Framework is an installation package production framework officially provided by Qt. It is widely used in installation package products such as Qt SDK, Qt Creator, etc.
Support: Linux, Microsoft Windows and OS X
Applications developed using the Qt library generally have two release methods:
a. Static compilation and release: Compile all the Qt core libraries into an executable file. Advantages: Simple and single; Disadvantages: The executable program is large.
b. Make the installation package and publish: Pack and compress the executable program and its dependent library files together, and make it into an installation package and publish it.
Official tutorial: https://doc.qt.io/qtinstallerframework/index.html
Chinese translation: https://www.cnblogs.com/oloroso/p/6775220.html
2. Qt Installer Framework installation
Download link: http://download.qt.io/official_releases/qt-installer-framework/
Download the linux version
Run ./QtInstallerFramework-linux-x64.run or double click
3. Using Qt Installer Framework
There are many examples in the installation path, xxx/QtIFW-3.0.4/examples
Copy one from the examples and modify it on this basis. This article uses the tutorial as an example:
1) Modify: config/config.xml
https://blog.csdn.net/weixin_33890526/article/details/86121199
<?xml version="1.0" encoding="UTF-8"?>
<Installer>
<Name>桌面定位工具</Name>
<Version>1.0.0</Version>
<Title>桌面定位工具安装</Title>
<Publisher>shenjun</Publisher>
<StartMenuDir>pos</StartMenuDir>
<TargetDir>@HomeDir@/opt/upos</TargetDir>
</Installer>
2) Refurbishment: packages / com.vendor.product / meta / package.xml
<?xml version="1.0" encoding="UTF-8"?>
<Package>
<DisplayName>README.txt</DisplayName>
<Description>A README.txt, accessible through a start menu entry.</Description>
<Version>0.1.0-1</Version>
<ReleaseDate>2020-08-15</ReleaseDate>
<Licenses>
<License name="Beer Public License Agreement" file="license.txt" />
</Licenses>
<Default>script</Default>
<Script>installscript.qs</Script>
<UserInterfaces>
<UserInterface>page.ui</UserInterface>
</UserInterfaces>
</Package>
3) The executable file is placed under: packages/com.vendor.product/data
4) Generate installation files: xxx/xxxx/binarycreator -c config/config.xml -p packages xxx.run
/home/eagle/QtIFW-3.0.4/bin/binarycreator -c config/config.xml -p packages pos_v1.0.run
The binarycreator tool is under QtIFW-3.0.4/bin, binarycreator参数说明:
https://doc.qt.io/qtinstallerframework/ifw-tools.html#binarycreator
---You're done-------------------
Exchange group number: 245022761 (IT project exchange group)