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

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.

主站蜘蛛池模板: 惠来县| 建昌县| 涟水县| 镇赉县| 集贤县| 余姚市| 泰来县| 逊克县| 石楼县| 墨竹工卡县| 开化县| 辽阳县| 白朗县| 乌苏市| 杭州市| 疏勒县| 淄博市| 仁怀市| 东乡族自治县| 怀柔区| 安庆市| 伊金霍洛旗| 商水县| 临桂县| 沅陵县| 武陟县| 文昌市| 贵港市| 长寿区| 肇东市| 大港区| 宜阳县| 商城县| 大埔县| 介休市| 桃园市| 邛崃市| 鸡西市| 马山县| 萍乡市| 连城县|