-
Notifications
You must be signed in to change notification settings - Fork 115
/
INSTALL
126 lines (83 loc) · 4.67 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
How to build
=====================
The instructions should help you build the Installer Framework from scratch. Alternatively, you can use prebuilt binaries which are available in Qt Online Installer.
Get the sources
---------------------
Use Git to check out the Qt Installer Framework sources that are hosted at:
http://code.qt.io/cgit/installer-framework/installer-framework.git/
Build a static Qt
---------------------
Building the Qt Installer Framework from sources requires at least Qt version 6.6.0.
Supported compilers are MSVC 2019 or newer, GCC 9 or newer,
and Xcode 14 or newer. Currently, the tested combination for Windows is Qt 6.7.2 with MSVC 2019 (Windows 11).
If you want to ship your installer as a single file you have to build
Qt and the Qt Installer Framework statically.
See the Qt documentation for the prerequisites and steps to build Qt from sources.
Please read SSL Import and Export Restrictions from http://doc.qt.io/qt-6/ssl.html if
you are statically linking against OpenSSL libraries.
### Windows
Recommended configuration options for Microsoft Windows:
configure -prefix %CD%\qtbase -release -static -static-runtime -accessibility -no-icu -no-sql-sqlite -no-qml-debug -nomake examples -nomake tests
Build Qt:
cmake --build . --parallel
cmake --install .
### Linux
Recommended configuration options for Linux:
configure -prefix $PWD/qtbase -release -static -accessibility -qt-zlib -qt-libpng -qt-libjpeg -qt-pcre -no-glib -no-cups -no-sql-sqlite -no-feature-gssapi -no-qml-debug -no-opengl -no-egl -no-xinput2 -no-sm -no-icu -nomake examples -nomake tests -no-libudev -bundled-xcb-xinput -qt-harfbuzz -qt-doubleconversion
Build Qt:
cmake --build . --parallel
cmake --install .
### macOS
Recommended configuration options for macOS:
configure -prefix $PWD/qtbase -release -static -accessibility -qt-zlib -qt-libpng -no-cups -no-sql-sqlite -no-qml-debug -nomake examples -nomake tests -no-freetype
Build Qt:
cmake --build . --parallel
cmake --install .
Third party dependencies
---------------------
The Qt Installer Framework sources contain a redistribution of parts of the
libarchive compression and archive library, which requires you to link against
additional libraries; liblzma, zlib, libbzip2, and on macOS, libiconv.
The usage of libarchive is recommended and can be enabled by adding the libarchive
configuration feature to the list of values specified by the CONFIG variable. Installers
created with this configuration support the (de)compression of 7zip, zip, and tar archive
files, with gzip, bzip2, and xz as available compression methods.
The IFW_ZLIB_LIBRARY, IFW_BZIP2_LIBRARY, IFW_LZMA_LIBRARY, and IFW_ICONV_LIBRARY variables
can be used to specify the exact library files if required.
If the Qt version used to build the Qt Installer Framework was configured with -qt-zlib and
IFW_ZLIB_LIBRARY variable is empty, libarchive will attempt to use the zlib library compiled
into the QtCore module, which removes the need for an external library.
If you do not enable libarchive support, the builtin LZMA SDK library will be used as a
fallback and installation of the additional dependencies can be skipped, but created
installers will only support the 7zip format. Note that building IFW with LZMA SDK is
deprecated and may not be available in future versions.
### Windows
The liblzma, zlib, libbzip2 libraries are required. The source archives
can be downloaded from:
https://tukaani.org/xz/
https://zlib.net/
https://www.sourceware.org/bzip2/
When building the third party libraries with MSVC, make sure to use the
same version that you used to build Qt, and that the compiler option used
to select the run-time library matches the configuration options for Qt
(debug/release, static/dynamic runtime).
### Linux
The required third party compression libraries are likely available from
your distribution's package manager repositories.
For example, on Ubuntu 22.04 you can invoke the following to install the
missing development packages:
$ sudo apt install zlib1g-dev liblzma-dev libbz2-dev
### macOS
The easiest way to install the missing libraries is with a third party
package manager solution, like Homebrew or MacPorts. On macOS 11 you
should only need to additionally install the liblzma library.
On Homebrew this would be:
$ brew install xz
### Troubleshooting
For libarchive related compilation errors, you may need to edit the definitions in
a configuration header file respective to your platform, which can be found from the
'src/libs/3rdparty/libarchive/config/*' directory of the Installer Framework sources.
Build the Framework
---------------------
Run 'qmake && make' (or 'nmake' ...) to build the Qt Installer
Framework. The documentation can be generated by 'make docs'.