官术网_书友最值得收藏!

Time for action – setting up Qt sources using Git

First, you need to install Git on your system if you don't already have it. How to do that depends on your operating system. For Windows, simply download an installer from package manager. For instance, on Debian-based distributions, just issue the sudo apt-get install git command on a terminal and wait until the installation gets completed.

Afterwards, you need to clone Qt's Git repository. Since Git is a command-line tool, we'll be using the command line from now on. To clone Qt's repository to a directory where you want to keep the sources, issue the following command:

git clone git://code.qt.io/qt/qt5.git

If all goes well, Git will download a lot of source code from the network and create a qt5 directory, containing all the files that were downloaded. Then, change the current working directory to the one containing the freshly downloaded code:

cd qt5

Then you need to run a Perl script that will set up all the additional repositories for you. If you don't have Perl installed, you should do that now (you can get Perl for Windows from http://www.activestate.com/activeperl/downloads). Then, issue the following command:

perl init-repository

The script will start downloading all the modules required for Qt and should complete successfully after a period dependent on your network link speed.

What just happened?

At this point in the qt5 directory, you have a number of subdirectories for different Qt modules (some of them were mentioned in Chapter 1, Introduction to Qt) each with a local Git repository containing the source code for the respective Qt modules and tools. Each of the modules can be updated separately if required.

主站蜘蛛池模板: 定结县| 富顺县| 四会市| 留坝县| 江安县| 丁青县| 武乡县| 洪泽县| 揭东县| 萨迦县| 广东省| 资兴市| 应用必备| 静宁县| 民权县| 景东| 越西县| 晋宁县| 敦化市| 油尖旺区| 噶尔县| 炎陵县| 阜阳市| 沧州市| 舞阳县| 谷城县| 奉节县| 江门市| 侯马市| 天祝| 社会| 澄江县| 紫云| 潞西市| 布尔津县| 华阴市| 尖扎县| 彰武县| 常熟市| 广饶县| 大庆市|