Install and configure tortoisehg and kdiff3 on Redhat/centos

Source: Internet
Author: User
Tags mercurial

I. Preface
This article was originally part of the 3rd development toolbox system, but some of our colleagues encountered a lot of software version and dependency problems when installing tortoisehg and kdiff3, resulting in a failure to install them smoothly. Therefore, I would like to share in advance the complete process of installing these software and hope to help other students.

II. Environment and preparation
1. Operating System: redhat5/centos5
2. The software to be prepared and its version (both are installed through source code compilation ):

  • Python2.7 (Python 2.4 is installed by default on redhat5 and centos5. Please upgrade to 2.7. After upgrading python, recompile and install mercurial-1.9)
  • Qt-4.7.3
  • Kdiff3-0.9.95
  • QScintilla-gpl-2.5.1
  • Iniparse-0.4
  • Sip-4.12.4
  • PyQt-x11-gpl-4.8.5
  • Tortoisehg-2.1

Shows their dependencies:

3. Install qt4
1. Download the source code:
Wget
Http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.3.tar.gz

2. decompress the source code package:
Tar-zxvf qt-everywhere-opensource-src-4.7.3.tar.gz

3. Three Steps for compilation and installation:
Go to the decompressed directory and execute the following commands in order:
1 ). /configure-Prefix/home/nieyong/local/qt-4.7.3, this step takes a long time and is executed on my machine for about 2.5 hours)
2) gmake
3) gmake install

 

4. Install kdiff3
1. Download the source code
Wget
Http://nchc.dl.sourceforge.net/project/kdiff3/kdiff3/0.9.95/kdiff3-0.9.95.tar.gzgmake

2. Extract the source code
Tar-zxvf kdiff3-0.9.95.tar.gz

3. Configure Environment Variables
1) edit the. bash_profile file in the current user directory
VI ~ /. Bash_profile
Add the following Configuration:
Qtdir = $ home/local/qt-4.7.3 (subject to local environment changes)
Export qtdir

Path = $ qtdir/bin: $ path
Export path

LD_LIBRARY_PATH = $ home/local/qt-4.7.3/lib: $ LD_LIBRARY_PATH (depending on the local environment)
Export LD_LIBRARY_PATH

2) make the environment variable configuration take effect
Source ~ /. Bash_profile

4. Install kdiff3
Run the following command to install the directory after kdiff3-0.9.95.tar.gz is decompressed:
./Configure qt4

5. Configure kdiff3
1. Edit the. hgrc file in the current user directory and execute the following command:
VI ~ /. Hgrc

Add the following Configuration:
[Extensions]
Hgext. extdiff =

[Extdiff]
Cmd. kdiff3 =

[Merge-tools]
Kdiff3.args = $ base $ local $ other-o $ output

6. Install iniparse
1. Download the source code
Wget
Http://iniparse.googlecode.com/files/iniparse-0.4.tar.gz

2. decompress the source code package
Tar-zxvf iniparse-0.4.tar.gz

3. Installation
Go to the iniparse-0.4 decompressed directory and execute the following command to install:
Python setup. py build
Python setup. py install (run as root)

7. Install qscintilla
1. Download the source code
Wget
Http://www.riverbankcomputing.co.uk/static/Downloads/QScintilla2/QScintilla-gpl-2.5.1.tar.gz

2. decompress the source code package
Tar-zxvf QScintilla-gpl-2.5.1.tar.gz

3. Compile and install qscintilla
1) Go To The qt4 directory under the decompressed qscintilla directory and execute the following three commands in sequence:
Qmake qscintilla. Pro
Make
Make install

2) Go to the python directory in the directory after extracting qscintilla and execute the following commands in sequence:
Python./configure. py
Make
Make install (run as root)

8. Install sip
1. Download the source code
Wget
Http://www.riverbankcomputing.co.uk/static/Downloads/sip4/sip-4.12.4.tar.gz

2. decompress the source code package
Tar-zxvf sip-4.12.4.tar.gz

3. Compile and install the SIP
Go to the extract directory of SIP-4.12.4 and execute the following three commands:
Python./configure. py
Make
Make install (run as root)

9. Install pyqt4
1. Download the source code
Wget
Http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-x11-gpl-4.8.5.tar.gz

2. decompress the source code package
Tar-zxvf PyQt-x11-gpl-4.8.5.tar.gz

3. Install pyqt4
Go to the directory after pyqt decompression, and execute the following three commands in order to install:
Python Configure. py

The following protocol information is displayed:
Determining the layout of your QT installation...
This is the GPL version of pyqt 4.8.5 (licensed under the GNU General Public
License) for python 2.7.2 on linux2.

Type '2' to view the GPL V2 license.
Type '3' to view the GPL V3 license.
Type 'yes' to accept the terms of the license.
Type 'no' to decline the terms of the license.

Do you accept the terms of the license? (Enter Yes here and press enter to agree to the agreement and continue the subsequent installation steps)

Finally, execute:
Make
Make install (run as root)

10. Install tortoisehg
Note: The tortoisehg version corresponding to mercurial-1.9 is 2.1, which may cause problems when installing other versions.
1. Download the source code
Wget

Https://bitbucket.org/tortoisehg/targz/downloads/tortoisehg-2.1.tar.gz

2. decompress the source code package

Tar-zxvf tortoisehg-2.1.tar.gz

3. Install tortoisehg
Go to the extract directory of the tortoisehg-2.1 and run the following two commands in sequence to install:
Python setup. py build
Python setup. py install (run as root)

11. Summary of problems encountered during installation
Install the SDK according to the above steps. Otherwise, you may encounter many problems. This part of content will be supplemented later ......

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.