summaryrefslogtreecommitdiffstats
path: root/doc/src/development/rcc.qdoc
blob: a9edb639737920a617fcba8c54c07d8804bbc57d (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
/****************************************************************************
**
** 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 rcc.html
    \title Resource Compiler (rcc)
    \ingroup qttools
    \keyword rcc

    The \c rcc tool is used to embed resources into a Qt application during
    the build process. It works by generating a C++ source file containing
    data specified in a Qt resource (.qrc) file.

    Usage:
    \snippet snippets/code/doc_src_rcc.qdoc 0

    RCC accepts the following command line options:

    \table
    \header \li Option         \li Argument \li Description

    \row \li \c{-o} \li \c{file} \li Write output to \c{file} rather than to stdout.

    \row \li \c{-name} \li \c{name} \li Create an external initialization
                                     function with \c{name}.

    \row \li \c{-threshold} \li \c{level} \li Specifies a threshold \c{level} (as a
                           percentage) to use when deciding whether to compress
                           a file. If the reduction in the file size is greater than
                           the threshold \c{level}, it is compressed; otherwise,
                           the uncompressed data is stored instead. The default
                           threshold level is 70%, meaning that compressed files
                           which are 30% or less of their original size are
                           stored as compressed data.

    \row \li \c{-compress-algo} \li \c{algorithm} \li The algorithm to compress files with.
                            Supported algorithms are \c{zstd}, \c{zlib}, and \c{none}, which
                            respectively mean to compress the content using the
                            \l{Zstandard}{https://zstd.net} library, \l{zlib}{https://zlib.net}
                            library, and no compression. The default is \c{zstd} if that
                            library was found at compile time, \c{zlib} if not.

    \row \li \c{-compress} \li \c{level} \li Compress input files to the given compression
                            \c{level}, which is algorithm-dependent. If the algorithm is
                            \c{zstd}, the valid levels are 1 to 19, with the special values of
                            0 and -1 meaning \c{libzstd}'s and \c {rcc}'s default compressions.
                            If the algorithm is \c{zlib}, the level is an integer in the range
                            1 to 9. For both algorithms, level 1 does the least compression
                            but is fastest. Levels 9 or 19 do the most compression but are
                            slowest. To turn off compression, use \c{-no-compress}. The default
                            value for \c{level} is -1.

    \row \li \c{-root} \li \c{path} \li Prefix the resource access path with \c{path}.
                                     The default is no prefix.

    \row \li \c{-no-compress} \li \li Disable compression.

    \row \li \c{-binary} \li \li Output a binary file for use as a dynamic resource.

    \row \li \c{-version} \li \li Display version information.

    \row \li \c{-help} \li \li Display usage information.

    \row \li \c{-t, --temp <file>} \li \li Use temporary <file> for big resources.

    \row \li \c{--namespace} \li \li Turn off namespace macros.

    \row \li \c{--verbose} \li \li Enable verbose mode.

    \row \li \c{--list} \li \li Only list .qrc file entries, do not generate code.

    \row \li \c{-project} \li \li Output a resource file containing all files from the
                                  current directory.





    \endtable

    See also \l{The Qt Resource System} for more information about embedding
    resources in Qt applications.
*/