Building-Qt-Creator-Packages: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
==General Building of Qt Creator==
[[Category:Tools::QtCreator]]
 
== General Building of Qt Creator ==


# 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 <span class="caps">CONFIG</span>+=release” “<span class="caps">DEFINES</span>+=IDE_REVISION=$GIT_COMMIT” “<span class="caps">QTC</span>_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><span class="caps">QTC</span>_PREFIX</code> is the directory prefix used for the 7zips that are created by the bindist target (see below).
# &lt;code&amp;gt;qmake $SOURCES/qtcreator.pro CONFIG+=release&amp;quot; &quot;DEFINES+=IDE_REVISION=$GIT_COMMIT&amp;quot; &quot;QTC_PREFIX=/qt-creator-x.y.z&amp;quot;&lt;/code&amp;gt; where &lt;code&amp;gt;$GIT_COMMIT&amp;lt;/code&amp;gt; should be the sha1 of the commit that you build, and where the &lt;code&amp;gt;QTC_PREFIX&amp;lt;/code&amp;gt; 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><span class="caps">INSTALL</span>_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)
## &lt;code&amp;gt;INSTALL_ROOT&amp;lt;/code&amp;gt;: changes the location for the install dir when doing &lt;code&amp;gt;make install&amp;lt;/code&amp;gt;, e.g. &lt;code&amp;gt;$BUILDDIR/install/qtcreator&amp;lt;/code&amp;gt; (not used on Mac)
## <code><span class="caps">INSTALL</span>_EDITION</code>: can be set to e.g. <code>-opensource</code>, used for 7z and dmg file names, <code>$${PLATFORM}$(<span class="caps">INSTALL</span>_EDITION)-$${QTCREATOR_VERSION}$(<span class="caps">INSTALL</span>_POSTFIX)</code>
## &lt;code&amp;gt;INSTALL_EDITION&amp;lt;/code&amp;gt;: can be set to e.g. &lt;code&amp;gt;&amp;#45;opensource&amp;lt;/code&amp;gt;, used for 7z and dmg file names, &lt;code&amp;gt;$${PLATFORM}$(INSTALL_EDITION)<s>$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)&lt;/code&amp;gt;<br />## &lt;code&amp;gt;INSTALL_POSTFIX&amp;lt;/code&amp;gt;: used for 7z and dmg file names, &lt;code&amp;gt;$${PLATFORM}$(INSTALL_EDITION)</s>$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)&lt;/code&amp;gt;
## <code><span class="caps">INSTALL</span>_POSTFIX</code>: used for 7z and dmg file names, <code>$${PLATFORM}$(<span class="caps">INSTALL</span>_EDITION)-$${QTCREATOR_VERSION}$(<span class="caps">INSTALL</span>_POSTFIX)</code>
# &lt;code&amp;gt;make&amp;lt;/code&amp;gt;
# <code>make</code>
# &lt;code&amp;gt;make docs&amp;lt;/code&amp;gt;
# <code>make docs</code>
# &lt;code&amp;gt;make install&amp;lt;/code&amp;gt; (don't use on Mac)
# <code>make install</code> (don’t use on Mac)
# &lt;code&amp;gt;make install_docs&amp;lt;/code&amp;gt; (don't use on Mac)
# <code>make install_docs</code> (don’t use on Mac)
# &lt;code&amp;gt;make deployqt&amp;lt;/code&amp;gt;
# <code>make deployqt</code>
 
After these calls the <code><span class="caps">INSTALL</span>_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


# <code>make deployartifacts</code>
After these calls the &lt;code&amp;gt;INSTALL_ROOT&amp;lt;/code&amp;gt; (Windows/Linux) or &lt;code&amp;gt;$BUILDDIR/bin/Qt Creator.app&amp;lt;/code&amp;gt; (Mac) contains a distributable binary build.


To create a 7zip with the binary build, call
To add &quot;external&amp;quot; executables (jom, qtcreatorcdbext64) that we deploy for Windows builds to your install, call<br /># &lt;code&amp;gt;make deployartifacts&amp;lt;/code&amp;gt;


# <code>make bindist</code><br /> That packages the files with a directory starting with the <code><span class="caps">QTC</span>_PREFIX</code> you set in the qmake call.
To create a 7zip with the binary build, call<br /># &lt;code&amp;gt;make bindist&amp;lt;/code&amp;gt;<br />That packages the files with a directory starting with the &lt;code&amp;gt;QTC_PREFIX&amp;lt;/code&amp;gt; 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<br /># &lt;code&amp;gt;make bindist_installer&amp;lt;/code&amp;gt;


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


To create actual Qt Creator-only installers, you need to have the installer framework binaries installed, then
To create a disk image (dmg) with the &lt;code&amp;gt;Qt Creator.app&amp;lt;/code&amp;gt; on Mac, call<br /># &lt;code&amp;gt;make dmg&amp;lt;/code&amp;gt;


# set the following additional environment variable:
== Things affecting the build/install ==
## <code><span class="caps">IFW</span>_PATH</code>: location where <code>make installer</code> looks for the installer framework binaries (i.e. its bin/ and lib/ directories)
# <code>make bindist_installer installer</code>


To create a disk image (dmg) with the <code>Qt Creator.app</code> on Mac, call
=== Environment Variables ===


# <code>make dmg</code>
{|
 
|INSTALL_ROOT
==Things affecting the build/install==
|Changes the location for the install dir when doing &lt;code&amp;gt;make install&amp;lt;/code&amp;gt;, e.g. &lt;code&amp;gt;$BUILDDIR/install/qtcreator&amp;lt;/code&amp;gt; (not used on Mac), installation is done into &lt;code&amp;gt;$(INSTALL_ROOT)$$QTC_PREFIX&amp;lt;/code&amp;gt;
 
===Environment Variables===
 
{| class="infotable line"
| <span class="caps">INSTALL</span>_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>$(<span class="caps">INSTALL</span>_ROOT)$$QTC_PREFIX</code>
|-
|-
| <span class="caps">INSTALL</span>_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}$(<span class="caps">INSTALL</span>_EDITION)-$${QTCREATOR_VERSION}$(<span class="caps">INSTALL</span>_POSTFIX)</code>
|Sets the base name used for the files created by make bindist, bindist_installer, dmg and dmg_installer. Defaults to &lt;code&amp;gt;qt-creator-$${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)&lt;/code&amp;gt;
|-
|-
| <span class="caps">INSTALL</span>_EDITION
|INSTALL_EDITION
| Can be set to e.g. <code>-opensource</code>, used for default <span class="caps">INSTALL</span>_BASENAME
|Can be set to e.g. &lt;code&amp;gt;&amp;#45;opensource&amp;lt;/code&amp;gt;, used for default INSTALL_BASENAME
|-
|-
| <span class="caps">INSTALL</span>_POSTFIX
|INSTALL_POSTFIX
| Used for default <span class="caps">INSTALL</span>_BASENAME
|Used for default INSTALL_BASENAME
|-
|-
| <span class="caps">IFW</span>_PATH
|IFW_PATH
| Location where <code>make installer</code> looks for the installer framework binaries (i.e. its bin/ and lib/ directories)
|Location where &lt;code&amp;gt;make installer&amp;lt;/code&amp;gt; looks for the installer framework binaries (i.e. its bin/ and lib/ directories)
|-
|-
| <span class="caps">INSTALLER</span>_ARCHIVE
|INSTALLER_ARCHIVE
| This overwrites the default value of the 7z filename which is used by the bindist_installer step, including file extension.
|This overwrites the default value of the 7z filename which is used by the bindist_installer step, including file extension.
|}
|}


===Qmake Variables===
=== Qmake Variables ===


{| class="infotable line"
{|
| <span class="caps">QTC</span>_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>$(<span class="caps">INSTALL</span>_ROOT)$$QTC_PREFIX</code>
|directory prefix for the install directory &lt;code&amp;gt;make install&amp;lt;/code&amp;gt; and for what is packaged with &lt;code&amp;gt;make bindist&amp;lt;/code&amp;gt;, must start with a &lt;code&amp;gt;/&amp;lt;/code&amp;gt;, e.g. &lt;code&amp;gt;/qt-creator-x.y.z&amp;lt;/code&amp;gt;, installation is done into &lt;code&amp;gt;$(INSTALL_ROOT)$$QTC_PREFIX&amp;lt;/code&amp;gt;
|-
|-
| <span class="caps">IDE</span>_PACKAGE_MODE
|IDE_PACKAGE_MODE
| Disables building the HellWorld and UpdateInfo plugins (which are built but marked experimental otherwise)
|Disables building the HellWorld and UpdateInfo plugins (which are built but marked experimental otherwise)
|-
|-
| <span class="caps">UPDATEINFO</span>_ENABLE
|UPDATEINFO_ENABLE
| Enables the UpdateInfo plugin and enables it for the build (usually it is marked as experimental)
|Enables the UpdateInfo plugin and enables it for the build (usually it is marked as experimental)
|-
|-
| QT_PRIVATE_HEADERS
|QT_PRIVATE_HEADERS
| Set to <span class="caps">QTDIR</span>/include where private headers are installed, if your Qt version doesn’t have them in its standard include directory
|Set to QTDIR/include where private headers are installed, if your Qt version doesn't have them in its standard include directory
|}
|}


===C Defines===
=== C Defines ===


{| class="infotable line"
{|
| <span class="caps">IDE</span>_VERSION_DESCRIPTION
|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)(<span class="caps">IDE</span>_VERSION_DESCRIPTION=“2.5.0-beta” in that case)
|Text description for the Qt Creator version, shown in parenthesis after the version number in the About dialog. For example used to show &quot;Qt Creator 2.4.82 (2.5.0-beta)&quot; (IDE_VERSION_DESCRIPTION=&quot;2.5.0-beta&amp;quot; in that case)
|-
|-
| <span class="caps">IDE</span>_REVISION
|IDE_REVISION
| String to show as revision in About dialog. Should be set to the git sha that the Qt Creator was built from.
|String to show as revision in About dialog. Should be set to the git sha that the Qt Creator was built from.
|-
|-
| <span class="caps">IDE</span>_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. &lt;code&amp;gt;~/.config/IDE_SETTINGSVARIANT/qtcreator.ini&amp;lt;/code&amp;gt; on Linux. Defaults to &quot;Nokia&amp;quot;.
|}
|}


===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.)
 
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:<br />
 
{| class="infotable line"
| 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
|}


==Todo==
Qt Creator reads the QtCreator.ini, qtversion.xml and toolchains.xml from its installation directory as &quot;install settings&amp;quot;. (The directory is &lt;code&amp;gt;share/qtcreator/IDE_SETTINGSVARIANT/&amp;lt;/code&amp;gt; on Windows and Linux, &lt;code&amp;gt;Qt Creator.app/Contents/Resources/IDE_SETTINGSVARIANT/&amp;lt;/code&amp;gt; on Mac.)


<nowiki>{{DISPLAYTITLE:Building Qt Creator Packages}}</nowiki>
The qt versions from the qtversion.xml and tool chains from toolchains.xml are added as &quot;autodetected&amp;quot; to Qt Creator. The settings file &amp;#40;.ini&amp;amp;#41; is used for QSettings::SystemScope. An installer can give any Qt Creator setting a default value by writing into this .ini file.


===Categories:===
The following special settings (or specially notable settings) are also read by Qt Creator:<br />| ExampleManifests | Array of strings. Paths to manifest xml files that describe examples to show in Qt Creator's example browser.|<br />| 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).|<br />| 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).|<br />| 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|


* [[:Category:Tools|Tools]]
== Todo ==
** [[:Category:Tools::QtCreator|QtCreator]]

Revision as of 14:38, 23 February 2015


General Building of Qt Creator

  1. It is recommended to build in a shadow build directory
  2. <code&gt;qmake $SOURCES/qtcreator.pro CONFIG+=release&quot; "DEFINES+=IDE_REVISION=$GIT_COMMIT&quot; "QTC_PREFIX=/qt-creator-x.y.z&quot;</code&gt; where <code&gt;$GIT_COMMIT&lt;/code&gt; should be the sha1 of the commit that you build, and where the <code&gt;QTC_PREFIX&lt;/code&gt; is the directory prefix used for the 7zips that are created by the bindist target (see below).
  3. set the following environment variables:
    1. <code&gt;INSTALL_ROOT&lt;/code&gt;: changes the location for the install dir when doing <code&gt;make install&lt;/code&gt;, e.g. <code&gt;$BUILDDIR/install/qtcreator&lt;/code&gt; (not used on Mac)
    2. <code&gt;INSTALL_EDITION&lt;/code&gt;: can be set to e.g. <code&gt;&#45;opensource&lt;/code&gt;, used for 7z and dmg file names, <code&gt;$${PLATFORM}$(INSTALL_EDITION)$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)</code&gt;
      ## <code&gt;INSTALL_POSTFIX&lt;/code&gt;: used for 7z and dmg file names, <code&gt;$${PLATFORM}$(INSTALL_EDITION)
      $${QTCREATOR_VERSION}$(INSTALL_POSTFIX)</code&gt;
  4. <code&gt;make&lt;/code&gt;
  5. <code&gt;make docs&lt;/code&gt;
  6. <code&gt;make install&lt;/code&gt; (don't use on Mac)
  7. <code&gt;make install_docs&lt;/code&gt; (don't use on Mac)
  8. <code&gt;make deployqt&lt;/code&gt;

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

To add "external&quot; executables (jom, qtcreatorcdbext64) that we deploy for Windows builds to your install, call
# <code&gt;make deployartifacts&lt;/code&gt;

To create a 7zip with the binary build, call
# <code&gt;make bindist&lt;/code&gt;
That packages the files with a directory starting with the <code&gt;QTC_PREFIX&lt;/code&gt; 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
# <code&gt;make bindist_installer&lt;/code&gt;

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

To create a disk image (dmg) with the <code&gt;Qt Creator.app&lt;/code&gt; on Mac, call
# <code&gt;make dmg&lt;/code&gt;

Things affecting the build/install

Environment Variables

INSTALL_ROOT Changes the location for the install dir when doing <code&gt;make install&lt;/code&gt;, e.g. <code&gt;$BUILDDIR/install/qtcreator&lt;/code&gt; (not used on Mac), installation is done into <code&gt;$(INSTALL_ROOT)$$QTC_PREFIX&lt;/code&gt;
INSTALL_BASENAME Sets the base name used for the files created by make bindist, bindist_installer, dmg and dmg_installer. Defaults to <code&gt;qt-creator-$${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)</code&gt;
INSTALL_EDITION Can be set to e.g. <code&gt;&#45;opensource&lt;/code&gt;, used for default INSTALL_BASENAME
INSTALL_POSTFIX Used for default INSTALL_BASENAME
IFW_PATH Location where <code&gt;make installer&lt;/code&gt; 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 <code&gt;make install&lt;/code&gt; and for what is packaged with <code&gt;make bindist&lt;/code&gt;, must start with a <code&gt;/&lt;/code&gt;, e.g. <code&gt;/qt-creator-x.y.z&lt;/code&gt;, installation is done into <code&gt;$(INSTALL_ROOT)$$QTC_PREFIX&lt;/code&gt;
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&quot; 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. <code&gt;~/.config/IDE_SETTINGSVARIANT/qtcreator.ini&lt;/code&gt; on Linux. Defaults to "Nokia&quot;.

Install Settings

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

The qt versions from the qtversion.xml and tool chains from toolchains.xml are added as "autodetected&quot; to Qt Creator. The settings file &#40;.ini&amp;#41; 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|

Todo