Building-Qt-Creator-Packages: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
(Decode HTML entity numbers)
(clean up)
Line 1: Line 1:
{{Cleanup | reason=Auto-imported from ExpressionEngine.}}
[[Category:Tools::QtCreator]]
[[Category:Tools::QtCreator]]


Line 6: Line 4:


# It is recommended to build in a shadow build directory
# It is recommended to build in a shadow build directory
# <code>qmake $SOURCES/qtcreator.pro CONFIG+=release" "DEFINES+=IDE_REVISION=$GIT_COMMIT" "QTC_PREFIX=/qt-creator-x.y.z"</code> where <code>$GIT_COMMIT</code> should be the sha1 of the commit that you build, and where the <code>QTC_PREFIX</code> is the directory prefix used for the 7zips that are created by the bindist target (see below).
# <code>qmake "$SOURCES/qtcreator.pro" CONFIG+=release "DEFINES+=IDE_REVISION=$GIT_COMMIT" "QTC_PREFIX=/qt-creator-x.y.z"</code>
where <tt>$GIT_COMMIT</tt> should be the sha1 of the commit that you build, and where the <tt>QTC_PREFIX</tt> is the directory prefix used for the 7zips that are created by the bindist target (see below).
# set the following environment variables:
# set the following environment variables:
## <code>INSTALL_ROOT</code>: changes the location for the install dir when doing <code>make install</code>, e.g. <code>$BUILDDIR/install/qtcreator</code> (not used on Mac)
## <tt>INSTALL_ROOT</tt>: changes the location for the install dir when doing <tt>make install</tt>, e.g. <tt>$BUILDDIR/install/qtcreator</tt> (not used on Mac)
## <code>INSTALL_EDITION</code>: can be set to e.g. <code>-opensource</code>, used for 7z and dmg file names, <code>$${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)</code>
## <tt>INSTALL_EDITION</tt>: can be set to e.g. <tt>-opensource</tt>, used for 7z and dmg file names, <tt>$${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)</tt>
## <code>INSTALL_POSTFIX</code>: used for 7z and dmg file names, <code>$${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)</code>
## <tt>INSTALL_POSTFIX</tt>: used for 7z and dmg file names, <tt>$${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)</tt>
# <code>make</code>
# <tt>make</tt>
# <code>make docs</code>
# <tt>make docs</tt>
# <code>make install</code> (don't use on Mac)
# <tt>make install</tt> (don't use on Mac)
# <code>make install_docs</code> (don't use on Mac)
# <tt>make install_docs</tt> (don't use on Mac)
# <code>make deployqt</code>
# <tt>make deployqt</tt>
 
After these calls the <tt>INSTALL_ROOT</tt> (Windows/Linux) or <tt>$BUILDDIR/bin/Qt Creator.app</tt> (Mac) contains a distributable binary build.


After these calls the <code>INSTALL_ROOT</code> (Windows/Linux) or <code>$BUILDDIR/bin/Qt Creator.app</code> (Mac) contains a distributable binary build.
To add "external" executables (jom, qtcreatorcdbext64) that we deploy for Windows builds to your install, call <tt>make deployartifacts</tt>


To add "external" executables (jom, qtcreatorcdbext64) that we deploy for Windows builds to your install, call
To create a 7zip with the binary build, call <tt>make bindist</tt>
# <code>make deployartifacts</code>


To create a 7zip with the binary build, call
That packages the files with a directory starting with the <tt>QTC_PREFIX</tt> you set in the qmake call.
# <code>make bindist</code>
That packages the files with a directory starting with the <code>QTC_PREFIX</code> you set in the qmake call.


To create a 7zip that can be used for installers, that directly contains the files without additional directory prefix (i.e. directly bin/, lib/, and so on), call
To create a 7zip that can be used for installers, that directly contains the files without additional directory prefix (i.e. directly bin/, lib/, and so on), call <tt>make bindist_installer</tt>
# <code>make bindist_installer</code>


To create actual Qt Creator-only installers, you need to have the installer framework binaries installed, then
To create actual Qt Creator-only installers, you need to have the installer framework binaries installed, then
# set the following additional environment variable:
# set the following additional environment variable:
## <code>IFW_PATH</code>: location where <code>make installer</code> looks for the installer framework binaries (i.e. its bin/ and lib/ directories)
## <tt>IFW_PATH</tt>: location where <tt>make installer</tt> looks for the installer framework binaries (i.e. its bin/ and lib/ directories)
# <code>make bindist_installer installer</code>
# <tt>make bindist_installer installer</tt>


To create a disk image (dmg) with the <code>Qt Creator.app</code> on Mac, call
To create a disk image (dmg) with the <tt>Qt Creator.app</tt> on Mac, call <tt>make dmg</tt>
# <code>make dmg</code>


== Things affecting the build/install ==
== Things affecting the build/install ==
Line 43: Line 39:
{|
{|
|INSTALL_ROOT
|INSTALL_ROOT
|Changes the location for the install dir when doing <code>make install</code>, e.g. <code>$BUILDDIR/install/qtcreator</code> (not used on Mac), installation is done into <code>$(INSTALL_ROOT)$$QTC_PREFIX</code>
|Changes the location for the install dir when doing <tt>make install</tt>, e.g. <tt>$BUILDDIR/install/qtcreator</tt> (not used on Mac), installation is done into <tt>$(INSTALL_ROOT)$$QTC_PREFIX</tt>
|-
|-
|INSTALL_BASENAME
|INSTALL_BASENAME
|Sets the base name used for the files created by make bindist, bindist_installer, dmg and dmg_installer. Defaults to <code>qt-creator-$${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)</code>
|Sets the base name used for the files created by make bindist, bindist_installer, dmg and dmg_installer. Defaults to <tt>qt-creator-$${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)</tt>
|-
|-
|INSTALL_EDITION
|INSTALL_EDITION
|Can be set to e.g. <code>-opensource</code>, used for default INSTALL_BASENAME
|Can be set to e.g. <tt>-opensource</tt>, used for default INSTALL_BASENAME
|-
|-
|INSTALL_POSTFIX
|INSTALL_POSTFIX
Line 55: Line 51:
|-
|-
|IFW_PATH
|IFW_PATH
|Location where <code>make installer</code> looks for the installer framework binaries (i.e. its bin/ and lib/ directories)
|Location where <tt>make installer</tt> looks for the installer framework binaries (i.e. its bin/ and lib/ directories)
|-
|-
|INSTALLER_ARCHIVE
|INSTALLER_ARCHIVE
Line 65: Line 61:
{|
{|
|QTC_PREFIX
|QTC_PREFIX
|directory prefix for the install directory <code>make install</code> and for what is packaged with <code>make bindist</code>, must start with a <code>/</code>, e.g. <code>/qt-creator-x.y.z</code>, installation is done into <code>$(INSTALL_ROOT)$$QTC_PREFIX</code>
|directory prefix for the install directory <tt>make install</tt> and for what is packaged with <tt>make bindist</tt>, must start with a <tt>/</tt>, e.g. <tt>/qt-creator-x.y.z</tt>, installation is done into <tt>$(INSTALL_ROOT)$$QTC_PREFIX</tt>
|-
|-
|IDE_PACKAGE_MODE
|IDE_PACKAGE_MODE
Line 87: Line 83:
|-
|-
|IDE_SETTINGSVARIANT
|IDE_SETTINGSVARIANT
|Changes the directory where Qt Creator looks for user settings and resources. E.g. <code>~/.config/IDE_SETTINGSVARIANT/qtcreator.ini</code> on Linux. Defaults to "Nokia".
|Changes the directory where Qt Creator looks for user settings and resources. E.g. <tt>~/.config/IDE_SETTINGSVARIANT/qtcreator.ini</tt> on Linux. Defaults to "QtProject".
|}
|}


=== Install Settings ===
=== Install Settings ===


Qt Creator reads the QtCreator.ini, qtversion.xml and toolchains.xml from its installation directory as "install settings". (The directory is <code>share/qtcreator/IDE_SETTINGSVARIANT/</code> on Windows and Linux, <code>Qt Creator.app/Contents/Resources/IDE_SETTINGSVARIANT/</code> on Mac.)
Qt Creator reads the QtCreator.ini, qtversion.xml and toolchains.xml from its installation directory as "install settings". (The directory is <tt>share/qtcreator/IDE_SETTINGSVARIANT/</tt> on Windows and Linux, <tt>Qt Creator.app/Contents/Resources/IDE_SETTINGSVARIANT/</tt> on Mac.)


The qt versions from the qtversion.xml and tool chains from toolchains.xml are added as "autodetected" to Qt Creator. The settings file (.ini) is used for QSettings::SystemScope. An installer can give any Qt Creator setting a default value by writing into this .ini file.
The qt versions from the qtversion.xml and tool chains from toolchains.xml are added as "autodetected" to Qt Creator. The settings file (.ini) is used for QSettings::SystemScope. An installer can give any Qt Creator setting a default value by writing into this .ini file.


The following special settings (or specially notable settings) are also read by Qt Creator:
The following special settings (or specially notable settings) are also read by Qt Creator:
| ExampleManifests | Array of strings. Paths to manifest xml files that describe examples to show in Qt Creator's example browser.|
{|
| Plugins/Ignored | QStringList (i.e. string containing of comma-separated values). Names of plugins that should not be loaded by default (even though they are installed and not marked experimental).|
| ExampleManifests
| Plugins/ForceEnabled | QStringList (i.e. string containing of comma-separated values). Names of plugins that should be loaded even though they would not be loaded by default (e.g. because they are marked as experimental).|
| Array of strings. Paths to manifest xml files that describe examples to show in Qt Creator's example browser.
| Help/InstalledDocumentation | QStringList (i.e. string containing of comma-separated values). Paths to qch (documentation) files and directories containing qch files that should be registered with Qt Creator|
|-
 
| Plugins/Ignored  
== Todo ==
| QStringList (i.e. string containing of comma-separated values). Names of plugins that should not be loaded by default (even though they are installed and not marked experimental).
|-
| Plugins/ForceEnabled  
| QStringList (i.e. string containing of comma-separated values). Names of plugins that should be loaded even though they would not be loaded by default (e.g. because they are marked as experimental).
|-
| Help/InstalledDocumentation  
| QStringList (i.e. string containing of comma-separated values). Paths to qch (documentation) files and directories containing qch files that should be registered with Qt Creator
|}

Revision as of 07:52, 16 March 2015


General Building of Qt Creator

  1. It is recommended to build in a shadow build directory
  2. qmake "$SOURCES/qtcreator.pro" CONFIG+=release "DEFINES+=IDE_REVISION=$GIT_COMMIT" "QTC_PREFIX=/qt-creator-x.y.z"
    

where $GIT_COMMIT should be the sha1 of the commit that you build, and where the QTC_PREFIX is the directory prefix used for the 7zips that are created by the bindist target (see below).

  1. set the following environment variables:
    1. INSTALL_ROOT: changes the location for the install dir when doing make install, e.g. $BUILDDIR/install/qtcreator (not used on Mac)
    2. INSTALL_EDITION: can be set to e.g. -opensource, used for 7z and dmg file names, $${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)
    3. INSTALL_POSTFIX: used for 7z and dmg file names, $${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)
  2. make
  3. make docs
  4. make install (don't use on Mac)
  5. make install_docs (don't use on Mac)
  6. make deployqt

After these calls the INSTALL_ROOT (Windows/Linux) or $BUILDDIR/bin/Qt Creator.app (Mac) contains a distributable binary build.

To add "external" executables (jom, qtcreatorcdbext64) that we deploy for Windows builds to your install, call make deployartifacts

To create a 7zip with the binary build, call make bindist

That packages the files with a directory starting with the QTC_PREFIX you set in the qmake call.

To create a 7zip that can be used for installers, that directly contains the files without additional directory prefix (i.e. directly bin/, lib/, and so on), call make bindist_installer

To create actual Qt Creator-only installers, you need to have the installer framework binaries installed, then

  1. set the following additional environment variable:
    1. IFW_PATH: location where make installer looks for the installer framework binaries (i.e. its bin/ and lib/ directories)
  2. make bindist_installer installer

To create a disk image (dmg) with the Qt Creator.app on Mac, call make dmg

Things affecting the build/install

Environment Variables

INSTALL_ROOT Changes the location for the install dir when doing make install, e.g. $BUILDDIR/install/qtcreator (not used on Mac), installation is done into $(INSTALL_ROOT)$$QTC_PREFIX
INSTALL_BASENAME Sets the base name used for the files created by make bindist, bindist_installer, dmg and dmg_installer. Defaults to qt-creator-$${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)
INSTALL_EDITION Can be set to e.g. -opensource, used for default INSTALL_BASENAME
INSTALL_POSTFIX Used for default INSTALL_BASENAME
IFW_PATH Location where make installer looks for the installer framework binaries (i.e. its bin/ and lib/ directories)
INSTALLER_ARCHIVE This overwrites the default value of the 7z filename which is used by the bindist_installer step, including file extension.

Qmake Variables

QTC_PREFIX directory prefix for the install directory make install and for what is packaged with make bindist, must start with a /, e.g. /qt-creator-x.y.z, installation is done into $(INSTALL_ROOT)$$QTC_PREFIX
IDE_PACKAGE_MODE Disables building the HellWorld and UpdateInfo plugins (which are built but marked experimental otherwise)
UPDATEINFO_ENABLE Enables the UpdateInfo plugin and enables it for the build (usually it is marked as experimental)
QT_PRIVATE_HEADERS Set to QTDIR/include where private headers are installed, if your Qt version doesn't have them in its standard include directory

C Defines

IDE_VERSION_DESCRIPTION Text description for the Qt Creator version, shown in parenthesis after the version number in the About dialog. For example used to show "Qt Creator 2.4.82 (2.5.0-beta)" (IDE_VERSION_DESCRIPTION="2.5.0-beta" in that case)
IDE_REVISION String to show as revision in About dialog. Should be set to the git sha that the Qt Creator was built from.
IDE_SETTINGSVARIANT Changes the directory where Qt Creator looks for user settings and resources. E.g. ~/.config/IDE_SETTINGSVARIANT/qtcreator.ini on Linux. Defaults to "QtProject".

Install Settings

Qt Creator reads the QtCreator.ini, qtversion.xml and toolchains.xml from its installation directory as "install settings". (The directory is share/qtcreator/IDE_SETTINGSVARIANT/ on Windows and Linux, Qt Creator.app/Contents/Resources/IDE_SETTINGSVARIANT/ on Mac.)

The qt versions from the qtversion.xml and tool chains from toolchains.xml are added as "autodetected" to Qt Creator. The settings file (.ini) is used for QSettings::SystemScope. An installer can give any Qt Creator setting a default value by writing into this .ini file.

The following special settings (or specially notable settings) are also read by Qt Creator:

ExampleManifests Array of strings. Paths to manifest xml files that describe examples to show in Qt Creator's example browser.
Plugins/Ignored QStringList (i.e. string containing of comma-separated values). Names of plugins that should not be loaded by default (even though they are installed and not marked experimental).
Plugins/ForceEnabled QStringList (i.e. string containing of comma-separated values). Names of plugins that should be loaded even though they would not be loaded by default (e.g. because they are marked as experimental).
Help/InstalledDocumentation QStringList (i.e. string containing of comma-separated values). Paths to qch (documentation) files and directories containing qch files that should be registered with Qt Creator