|
|
(27 intermediate revisions by 18 users not shown) |
Line 1: |
Line 1: |
| | | {{LangSwitch}} |
| | |
| [[Category:HowTo]] | | [[Category:HowTo]] |
| [[Category:Developing_with_Qt::Qt 5]] | | [[Category:Tools::QtCreator]] |
| | |
| '''English''' [[Building-Qt-Creator-from-Git-SimplifiedChinese|简体中文]]
| |
| | |
| | |
| | |
| | |
| | |
| == Dependencies ==
| |
| | |
| To build Qt Creator from git, you need to first prepare some dependencies:
| |
| * Qt libraries from Qt 5.3.1 (or newer) are needed. You can use one of the prebuilt packages from [http://qt.io/download the Downloads Page], or, if you want to go with git all the way, [http://wiki.qt.io/Building_Qt_5_from_Git compile Qt 5 from git] . These Qt modules are required: qtscript, qttools and qtdeclarative.
| |
| | |
| If you have Qt installed, you probably have all the other dependencies of Qt Creator, too. There are numerous Qt Creator plugins, and they may require additional packages to be installed (but they usually don't block the compilation, so don't worry).
| |
| | |
| == Getting the source code ==
| |
| | |
| To get Qt Creator source code, type this. If you do not want to include the QBS (Qt Build Suite) plugin, you may omit —recursive:
| |
| <code>
| |
| git clone —recursive https://git.gitorious.org/qt-creator/qt-creator.git
| |
| </code>
| |
| | |
| This should be enough to compile Qt Creator from source. If you are interested in using other branches of the Qt Creator repository, please see the Qt Creator section at [http://wiki.qt.io/Branches Branch Guidelines].
| |
| | |
| == Compiling Qt Creator ==
| |
| | |
| For building Qt Creator, an out-of-source build is recommended. For simplicity, this tutorial gives instructions for a build directory (namely 'qt-creator-build') that is located in parallel to the source directory ('qt-creator'), but any other folder can be used. If you have checked out '''QBS''', it will be compiled together with the rest of the code, you do not need to do anything special.
| |
| | |
| Before you start with building, make sure you are using correct version of Qt. This can be done with the following command:
| |
| <code>
| |
| qmake -v
| |
| </code>
| |
| | |
| If the output points to a wrong version of Qt, or returns an error, you need to show the qmake binary to your environment (it may also mean that something is wrong with your Qt installation). You need to modify your PATH environment variable to include the directory with the qmake executable, e.g. <Qt installation directory>/qtbase/bin.
| |
| | |
| <code>
| |
| mkdir qt-creator-build
| |
| cd qt-creator-build
| |
| qmake -r ../qt-creator/qtcreator.pro
| |
| </code>
| |
| | |
| This will prepare the Makefile.
| |
|
| |
|
| '''Note:''' If you built qt5 from the git repository and you get an error like
| | ==Getting the source code== |
|
| |
|
| <code>Project ERROR: Unknown module(s) in QT: script</code>
| | Qt Creator is open source. The arguably most convenient way to get the Qt Creator sources is with [https://git-scm.com/ Git]. |
|
| |
|
| ..then In your qt5 repository run: | | To get Qt Creator source code from git, you need first to install a [https://git-scm.com/downloads git client]. |
|
| |
|
| <code>make module-qtscript</code>
| | If you have the git command client installed, you can then check out the sources from a terminal: |
|
| |
|
| Now, you can order the compilation:
| | <pre> |
| On Linux, OS X:
| | git clone --recursive https://code.qt.io/qt-creator/qt-creator.git |
| <code> | | </pre> |
| make -j <number-of-cpu-cores+1>
| |
| </code> | |
| On Windows (MSVC):
| |
| <code>
| |
| nmake
| |
| </code>
| |
|
| |
|
| Compilation takes a while (only a bit less than compilation of Qt libraries themselves)- so be patient. After it's finished, you can safely start using Qt Creator (binaries are located in qt-creator-build/bin directory).
| | This will check out the latest development version of Qt Creator in a qt-creator directory. If you are interested in using other branches of the Qt Creator repository, please see the Qt Creator section at [http://wiki.qt.io/Branches Branch Guidelines]. |
|
| |
|
| == Installing Qt Creator (optional) == | | ==Building Qt Creator== |
|
| |
|
| No further steps are required, but if you want to install it on your machine, type this:
| | Follow the [https://github.com/qt-creator/qt-creator/blob/master/README.md#compiling-qt-creator Compiling Qt Creator] section in [https://github.com/qt-creator/qt-creator/blob/master/README.md README.md]. You can find the file also in the local qt-creator directory. |
| Linux:
| |
| <code>
| |
| make install INSTALL_ROOT=$INSTALL_DIRECTORY
| |
| </code>
| |
| On Windows:
| |
| <code>
| |
| nmake install INSTALL_ROOT=$INSTALL_DIRECTORY
| |
| </code>
| |
|
| |
|
| On OS X, just move the Qt Creator app bundle where you like.
| | ==Ubuntu Linux 22.04== |
| | For building Qt Creator from Git on Ubuntu 22.04 have a look at the following [[Building Qt Creator from Git on Ubuntu 22.04|page]]. |
| | ==Fedora 38== |
| | For building Qt Creator from Git on Fedora 38 have a look at the following [[Building Qt Creator from Git on Fedora 38|page]]. |
En
Ar
Bg
De
El
Es
Fa
Fi
Fr
Hi
Hu
It
Ja
Kn
Ko
Ms
Nl
Pl
Pt
Ru
Sq
Th
Tr
Uk
Zh
Getting the source code
Qt Creator is open source. The arguably most convenient way to get the Qt Creator sources is with Git.
To get Qt Creator source code from git, you need first to install a git client.
If you have the git command client installed, you can then check out the sources from a terminal:
git clone --recursive https://code.qt.io/qt-creator/qt-creator.git
This will check out the latest development version of Qt Creator in a qt-creator directory. If you are interested in using other branches of the Qt Creator repository, please see the Qt Creator section at Branch Guidelines.
Building Qt Creator
Follow the Compiling Qt Creator section in README.md. You can find the file also in the local qt-creator directory.
Ubuntu Linux 22.04
For building Qt Creator from Git on Ubuntu 22.04 have a look at the following page.
Fedora 38
For building Qt Creator from Git on Fedora 38 have a look at the following page.