summaryrefslogtreecommitdiffstats
path: root/doc/src/deployment/deployment.qdoc
blob: a56276853853072837411d30e786528ebb3a1ef0 (plain)
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
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
    \page deployment.html
    \title Deploying Qt Applications

    Deploying an Qt application does not require any C++
    programming. All you need to do is to build Qt and your
    application in release mode, following the procedures described in
    this documentation.

    \section1 Static vs. Shared Libraries

    There are two ways of deploying an application:

    \list
        \li Static Linking
        \li Shared Libraries (Frameworks on Mac)
    \endlist

    Static linking results in a stand-alone executable. The advantage
    is that you will only have a few files to deploy. The
    disadvantages are that the executables are large and with no
    flexibility (i.e a new version of the application, or of Qt, will
    require that the deployment process is repeated), and that you
    cannot deploy plugins.

    To deploy plugin-based applications, you can use the shared
    library approach. Shared libraries also provide smaller, more
    flexible executables. For example, using the shared library
    approach, the user is able to independently upgrade the Qt library
    used by the application.

    Another reason why you might want to use the shared library
    approach, is if you want to use the same Qt libraries for a family
    of applications. In fact, if you download the binary installation
    of Qt, you get Qt as a shared library.

    The disadvantage with the shared library approach is that you
    will get more files to deploy. For more information, see
    \l{Creating Shared Libraries}.

    \section1 Deploying Qt's Libraries

    Unless Qt is part of the system libraries it must be redistributed
    with your application. The minimum is to redistribute the run-time
    of the libraries used by the application.  However, with static linking,
    the Qt run-times can be compiled into the executable.

    In general, you should deploy all plugins that your Qt build uses,
    excluding those that you have identified as unnecessary for your
    application and its users.

    For instance, you may need to deploy plugins for JPEG support and
    SQL drivers, but you should also deploy plugins that your users may
    require, including those for accessibility.
    For more information about plugins, see \l{How to Create Qt Plugins}.

    Applications using \l{Qt QML} also need to ship the
    \l{All QML Modules}{QML modules} they use.

    While deploying an application using the shared library approach,
    you must ensure that the Qt libraries use the correct path to
    find the Qt plugins, documentation, translation, and so on. To do this, you
    can use a \c qt.conf file. For more information, see \l {Using
    qt.conf}.

    Depending on configuration, compiler-specific libraries must be
    redistributed as well. For more information, see the
    platform-specific application dependencies for
    \l{Qt for Linux/X11 - Deployment#Application Dependencies}{X11},
    \l{Qt for Windows - Deployment#Application Dependencies}{Windows},
    and \l{Qt for macOS}{\macos}.

    \section1 Licensing

    Some of Qt's libraries are based on third party libraries that are
    not licensed using the same dual-license model as Qt. As a result,
    care must be taken when deploying applications that use these
    libraries, particularly when the application is statically linked
    to them.
    For more information, see \l{Third-Party Licenses Used in Qt}.

    Some configurations of QtNetwork use OpenSSL at run-time. Deployment
    of OpenSSL libraries is subject to both licensing and export restrictions.
    For more information, see \l{Secure Sockets Layer (SSL) Classes}.

    \section1 Platform-Specific Notes

    The procedure of deploying Qt applications is different for the
    various platforms:

    \list
        \li \l{Qt for Linux/X11 - Deployment}{Qt for X11 Platforms}
        \li \l{Qt for Windows - Deployment}{Qt for Windows}
        \li \l{Qt for macOS#Deploying Applications on macOS}{Qt for macOS}
        \li \l{Deploying an Application on Android}{Qt for Android}
    \endlist

    \sa {Deploying Translations}
*/