Clone of kdiff3 public repository http://sourceforge.net/p/kdiff3/code/ci/master/tree/kdiff3/
Clone of kdiff3 public repository http://sourceforge.net/p/kdiff3/code/ci/master/tree/kdiff3/
Author: Joachim Eibl (joachim.eibl at gmx.de) Copyright: (C) 2002-2012 by Joachim Eibl KDiff3-Version: 0.9.97
KDiff3 runs best on KDE but can be built without it, depending only on Qt-libs. These are available for Un*x, Windows, Mac. Thus there are many setup possibilities to consider.
From version 0.9.94 on the main target platform is KDE4/Qt4. For KDiff3 for KDE3/Qt3 use KDiff3-0.9.92 or older.
KDiff3 is a program that
Do you want help translating? Read the README in the po-subdirectory!
GNU GENERAL PUBLIC LICENSE, Version 2, June 1991
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307
USA
For details see file "COPYING".
for KDE4: From version 0.9.94 on KDiff3 supports KDE4. For installation on most distributions you usually also need these packages (names as on opensuse):
Typically in a terminal (e.g. konsole) you cd into the kdiff3-directory and
run ./configure kde4
. This script is essentially the same as these commands:
mkdir releaseKde
cd releaseKde
# Find out your KDE4-directory and note the result
kde4-config --prefix
# create Makefile, replace <KDE4-prefix> with the prior result
cmake .. -DCMAKE_INSTALL_PREFIX=<KDE4-prefix>
# run make (compile and link)
make
# install as root user
sudo make install
Now KDiff3 should be ready to use. Type kdiff3
to start it.
There should also be a entry in your KDE-start menu in
"(Applications->)Development".
For creating a debug version:
mkdir debug
cd debug
# Find out your KDE4-directory and note the result
kde4-config --prefix
cmake .. -DCMAKE_INSTALL_PREFIX=<KDE4-prefix> -DCMAKE_BUILD_TYPE=debugfull
make
sudo make install
The <KDE4-prefix>
depends on your distribution:
The command kde4-config --prefix
should tell you.
/usr
.Building KDiff3 with Qt4-libs, but without KDE
The version 0.9.97 requires Qt 4.4.0 or newer (from http://qt-project.org/) for compilation.
You always need:
- kdiff3-0.9.97.tar.gz
- for Un*x: gcc
, g++
with version >=3.4.2
Qt-X11-libraries
- for Windows: Qt-win-libs
If you have the Qt4 commercial edition, then compile with
Visual Studio.NET 2003 or newer.
If you use the Qt4 open source edition, then you'll need
MinGW.
I verified that compilation and debugging works with
these packages (probably newer ones will also work):
- Use MinGW-5.1.4.exe
or newer to install the following
or newer:
- gcc-core-3.4.5-20060117-1.tar.gz
- binutils-2.17.50-20060824-1.tar.gz
- gcc-g++-3.4.5-20060117-1.tar.gz
- mingw-runtime-3.14.tar.gz
- mingw32-make-3.81-2.tar.gz
- w32api-3.11.tar.gz
- gdb-6.3-2.exe
(for debugging)
- for Mac: gcc
, g++
with version >=3.4.2
Qt-Mac-libraries
- Optional: Qt Creator IDE: Development environment optimized for Qt
(from http://qt-project.org)
Build-instructions (Un*x): Assuming Qt is correctly installed run "./configure qt4" which essentially does the same as:
mkdir releaseQt
cd releaseQt
qmake ../src-QT4/kdiff3.pro
make
(or gmake
for GNU-Make)Build-instructions (Windows):
src-QT4\kdiff3.pro
set QTDIR=<QT4-dir>
e.g.: c:\qt\4.4.1
set "PATH=%QTDIR%\bin;%PATH%
vsvars32.bat
PATH=c:\mingw\bin;%PATH%
kdiff3-0.9.97\src-Qt4
and typeqmake kdiff3.pro
nmake
for Visual Studio or mingw32-make
depending on what youDebugging with MinGW under Windows:
qt-win-opensource-4.4.1-mingw.exe
only installs release dlls. Youqt-4.4.1-directory
and run configure -debug
and then mingw32-make
.Makefile.Debug
and in the LFLAGS replace-Wl,-subsystem,windows
with -Wl,-subsystem,console
(this ismingw32-make debug
(create a debuggable executable)gdb debug\kdiff3.exe
run
and enter to start.help
to find out about how to use gdb. (Important commands: run
,break
, backtrace
, print
, quit
)Building KDiff3 (Qt4) for Mac OSX: 0) Build with Qt Creator from the SDK and src-QT4\kdiff3.pro. Building a universal binary (by Michael Schmidt, perhaps outdated):
cd .../kdiff3-0.9.97/src-QT4
qmake kdiff3.pro
qmake -spec macx-xcode kdiff3.pro
make
kdiff3-0.9.97/src-QT4
/Applications
Creating and installing the translation messages The po directory contains translations from the KDE-translation teams. If you use the Qt-only-version of KDiff3, then the installation described above won't install translations automatically. To create and install the translations:
cd .../kdiff3-0.9.97/po
sh create_qm_files install
(asks for a super user password)sh create_qm_files local
Start from commandline:
kdiff3 file1 file2
kdiff3 file1 file2 -o outputfile
kdiff3 file1 file2 file3
kdiff3 file1 file2 file3 -o outputfile
If all files have the same name but are in different directories, you can reduce typework by specifying the filename only for the first file. E.g.:
kdiff3 dir1/filename dir2 dir3
If you start without arguments, then a dialog will appear where you can select your files via a filebrowser.
For more documentation, see the help-menu or the subdirectory doc.
Have fun!