README 9.48 KB
Newer Older
Joachim Eibl's avatar
Joachim Eibl committed
1 2 3
KDiff3-Readme
=============

Joachim Eibl's avatar
Joachim Eibl committed
4
Author: Joachim Eibl  (joachim.eibl at gmx.de)
Michael Reeves's avatar
Michael Reeves committed
5 6
Copyright: (C) 2002-2009 by Joachim Eibl
KDiff3-Version: 0.9.94
Joachim Eibl's avatar
Joachim Eibl committed
7

Joachim Eibl's avatar
Joachim Eibl committed
8 9 10 11
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.

Joachim Eibl's avatar
Joachim Eibl committed
12
From version 0.9.94 on the main target platform is KDE4/Qt4.
Joachim Eibl's avatar
Joachim Eibl committed
13 14 15 16 17 18 19 20 21 22 23 24 25
For KDiff3 for KDE3/Qt3 use KDiff3-0.9.92 or older.

Contents
--------

- Introduction
- License
- Requirements & Installation
  - For KDE4
  - With Qt4-libs, without KDE
    - for Linux/Un*x
    - for Windows
    - Debugging with MinGW under Windows:
Michael Reeves's avatar
Michael Reeves committed
26
    - for Mac: Building KDiff3 for Mac OSX (with Intel processor) as a universal binary
Joachim Eibl's avatar
Joachim Eibl committed
27
    - Creating and installing translation messages
Joachim Eibl's avatar
Joachim Eibl committed
28 29 30 31 32
- Additional hints


Introduction
------------
Joachim Eibl's avatar
Joachim Eibl committed
33 34

KDiff3 is a program that
Joachim Eibl's avatar
Joachim Eibl committed
35
- compares and merges two or three input files or directories,
Joachim Eibl's avatar
Joachim Eibl committed
36 37 38
- shows the differences line by line and character by character (!),
- provides an automatic merge-facility and
- an integrated editor for comfortable solving of merge-conflicts
Joachim Eibl's avatar
Joachim Eibl committed
39 40 41 42
- has support for KDE-KIO (ftp, sftp, http, fish, smb),
- has an intuitive graphical user interface,
- provides a context menu for KDE-Konqueror and Windows-Explorer,
- supports 64 bit systems. (Some build issues are discussed in here.)
Joachim Eibl's avatar
Joachim Eibl committed
43 44

Do you want help translating? Read the README in the po-subdirectory!
Joachim Eibl's avatar
Joachim Eibl committed
45 46


Joachim Eibl's avatar
Joachim Eibl committed
47 48 49
License
-------

Joachim Eibl's avatar
Joachim Eibl committed
50 51 52 53 54 55 56 57 58 59 60 61 62
    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
Michael Reeves's avatar
Michael Reeves committed
63
    Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA  02111-1307  USA
Joachim Eibl's avatar
Joachim Eibl committed
64 65 66

    For details see file "COPYING".

Michael Reeves's avatar
Michael Reeves committed
67 68 69 70 71 72 73
Exception from the GPL:
    As a special exception, the copyright holder Joachim Eibl gives permission
    to link this program with the Qt-library (commercial or open source edition)
    from Trolltech (www.trolltech.com), and he permits to distribute the resulting
    executable, without including the source code for the Qt-library in the
    source distribution.

Joachim Eibl's avatar
Joachim Eibl committed
74

Joachim Eibl's avatar
Joachim Eibl committed
75 76 77 78
Requirements & Installation
---------------------------

- for KDE4:
Joachim Eibl's avatar
Joachim Eibl committed
79
   From version 0.9.94 on KDiff3 supports KDE4.
Michael Reeves's avatar
Michael Reeves committed
80
   For installation on most distributions you usually also require these packages (names as on opensuse):
Joachim Eibl's avatar
Joachim Eibl committed
81 82 83
   - g++ (g++, version 3.4 or newer)
   - libqt4-devel (Qt4-libs, version 4.4.0 or newer)
   - libkde4-devel (KDE4 Header files and development libraries)
Michael Reeves's avatar
Michael Reeves committed
84
   - libkonq-devel (optional, needed for the kdiff3-plugin, if not installed 
Joachim Eibl's avatar
Joachim Eibl committed
85
                    then the contextmenu plugin for konqueror won't be built.)
Michael Reeves's avatar
Michael Reeves committed
86 87 88 89 90 91 92 93 94 95
   - cmake (>2.6, checks dependencies and creates the Makefiles appopriate for your system)

   Typically in a terminal (e.g. konsole) you cd into the kdiff3-directory and run these commands.

      mkdir release                                  # create sub directory
      cd release                                     # cd into that directory
      kde4-config --prefix                           # Find out your KDE4-directory and note the result
      cmake .. -DCMAKE_INSTALL_PREFIX=<KDE4-prefix>  # create Makefile, replace <KDE4-prefix> with the prior result
      make                                           # run make (compile and link)
      sudo make install                              # install as root user
Joachim Eibl's avatar
Joachim Eibl committed
96 97

   Now KDiff3 should be ready to use. Type "kdiff3" to start it.
Michael Reeves's avatar
Michael Reeves committed
98
   There should also be a entry in your KDE-start menu in "(Applications->)Development".
Joachim Eibl's avatar
Joachim Eibl committed
99 100 101 102

   For creating a debug version:
      mkdir debug
      cd debug
Michael Reeves's avatar
Michael Reeves committed
103 104
      kde4-config --prefix                           # Find out your KDE4-directory and note the result
      cmake .. -DCMAKE_INSTALL_PREFIX=<KDE4-prefix>  -DCMAKE_BUILD_TYPE=debugfull
Joachim Eibl's avatar
Joachim Eibl committed
105
      make
Joachim Eibl's avatar
Joachim Eibl committed
106
      sudo make install
Joachim Eibl's avatar
Joachim Eibl committed
107

Joachim Eibl's avatar
Joachim Eibl committed
108 109 110
   The <KDE4-prefix> depends on your distribution:
   The command "kde4-config --prefix" should tell you.
   - For opensuse 11 use "/usr".
Joachim Eibl's avatar
Joachim Eibl committed
111

Joachim Eibl's avatar
Joachim Eibl committed
112 113 114 115
- Building KDiff3 with Qt4-libs, but without KDE
    - for Linux/Un*x
    - for Windows
    - for Mac
Joachim Eibl's avatar
Joachim Eibl committed
116

Michael Reeves's avatar
Michael Reeves committed
117
   The version 0.9.94 requires Qt 4.4.0 or newer (from www.trolltech.com) for compilation. 
118

Michael Reeves's avatar
Michael Reeves committed
119 120
   You always need
      - kdiff3-0.9.94.tar.gz
Joachim Eibl's avatar
Joachim Eibl committed
121 122 123 124 125

      - for Un*x:    gcc, g++ with version >=3.4.2
                     Qt-X11-libraries

      - for Windows: Qt-win-libs
Michael Reeves's avatar
Michael Reeves committed
126 127 128 129
                     If you have the Qt4 commercial edition, then compile with Visual Studio.NET2003 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:
Joachim Eibl's avatar
Joachim Eibl committed
130 131 132 133 134 135 136
                       - 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)
Joachim Eibl's avatar
Joachim Eibl committed
137 138 139

      - for Mac:     gcc, g++ with version >=3.4.2
                     Qt-Mac-libraries
Michael Reeves's avatar
Michael Reeves committed
140
      - Optional: Qt Creator IDE: Development environment optimized for Qt (http://trolltech.com/developer/qt-creator)
Joachim Eibl's avatar
Joachim Eibl committed
141 142

  Build-instructions (Un*x):
Michael Reeves's avatar
Michael Reeves committed
143 144 145 146
    - Make sure your shell-variable QTDIR is correct and that 
      your path contains the Qt4-bin-directory.
    - cd into the directory kdiff3-0.9.94/src-QT4 and type
    - qmake kdiff3.pro
Joachim Eibl's avatar
Joachim Eibl committed
147 148 149 150 151
    - make (or "gmake" for GNU-Make)

  Build-instructions (Windows):
    - set QTDIR=<QT4-dir>         e.g.: c:\qt\4.4.1
      set "PATH=%QTDIR%\bin;%PATH%"
Michael Reeves's avatar
Michael Reeves committed
152
    - cd into the directory kdiff3-0.9.94\src-Qt4 and type
Joachim Eibl's avatar
Joachim Eibl committed
153
    - qmake kdiff3.pro
Michael Reeves's avatar
Michael Reeves committed
154
    - Either "nmake" for Visual Studio or "mingw32-make" depending on what you have.
Joachim Eibl's avatar
Joachim Eibl committed
155 156

  Debugging with MinGW under Windows:
Michael Reeves's avatar
Michael Reeves committed
157
    - Qt Creator worked very good as debugger frontend too!
Joachim Eibl's avatar
Joachim Eibl committed
158
    - Debugging without gdb on the console:
Michael Reeves's avatar
Michael Reeves committed
159 160 161 162 163
      - The qt-win-opensource-4.4.1-mingw.exe only installs release dlls. You will have to compile the
         debug dlls yourself. Enter the qt-4.4.1-directory and run "configure -debug" and then "mingw32-make".
      - cd into the directory kdiff3-0.9.94\src-Qt4
      - edit the file "Makefile.Debug" and in the LFLAGS replace "-Wl,-subsystem,windows" with "-Wl,-subsystem,console"
         (this is necessary so that gdb can send a break signal to the running program)
Joachim Eibl's avatar
Joachim Eibl committed
164 165 166
      - mingw32-make debug (create a debuggable executable)
      - gdb debug\kdiff3.exe
      - At the "(gdb)"-prompt type "run" and enter to start.
Michael Reeves's avatar
Michael Reeves committed
167 168 169 170 171 172 173 174
      - While the program runs you can't set breakpoints, first interrupt it with Ctrl-C.
      - Use "help" to find out about how to use gdb. (Important commands: run, break, backtrace, print, quit)
         Using break with c++-methods requires to specify the parameter types too. Breakpoints in constructors might not work.

  Building KDiff3 (Qt4) for Mac OSX (with Intel processor) as a universal binary (by Michael Schmidt)
    1) Install Qt/Mac 4.x with thread support, static libraries and universal flag.
       (For Qt4 run "configure -static"; only necessary if the final binary should not require shared Qt4-libs.)
    2) cd .../kdiff3-0.9.94/src-QT4
Joachim Eibl's avatar
Joachim Eibl committed
175 176
    3a) Create a makefile for kdiff3 by executing:
       qmake kdiff3.pro
Michael Reeves's avatar
Michael Reeves committed
177
    3b) optionally generate XCode-Project (for debugging purposes only) by executing:
Joachim Eibl's avatar
Joachim Eibl committed
178 179 180
       qmake -spec macx-xcode kdiff3.pro
    4) Execute:
       make
Michael Reeves's avatar
Michael Reeves committed
181
    5) After the build completes copy kdiff3 from the kdiff3-0.9.94/src-QT4 directory to
Joachim Eibl's avatar
Joachim Eibl committed
182
       /Applications
Joachim Eibl's avatar
Joachim Eibl committed
183

Joachim Eibl's avatar
Joachim Eibl committed
184 185
  Creating and installing the translation messages
    The po directory contains translations from the KDE-translation teams.
Michael Reeves's avatar
Michael Reeves committed
186 187
    If you use the Qt-only-version of KDiff3, then the installation described above 
    won't install translations automatically.
Joachim Eibl's avatar
Joachim Eibl committed
188
    To create and install the translations:
Michael Reeves's avatar
Michael Reeves committed
189 190 191
    0) Make sure /usr/lib/qt3/bin/msg2qm exists 
       (comes with qt3-devel-tools. [Yes, really Qt3. There is no Qt4 replacement yet.])
    1) cd .../kdiff3-0.9.95/po
Joachim Eibl's avatar
Joachim Eibl committed
192
    2) sh create_qm_files install    (asks for a super user password)
Michael Reeves's avatar
Michael Reeves committed
193
    Just to create the files in the po directory (as needed for the windows version): 
Joachim Eibl's avatar
Joachim Eibl committed
194 195
    2) sh create_qm_files local

Joachim Eibl's avatar
Joachim Eibl committed
196

Joachim Eibl's avatar
Joachim Eibl committed
197 198 199
(End of KDiff3 with Qt4-instructions)
------------------------------------------------------------------------

Joachim Eibl's avatar
Joachim Eibl committed
200 201
Additional hints
----------------
Joachim Eibl's avatar
Joachim Eibl committed
202

Joachim Eibl's avatar
Joachim Eibl committed
203 204 205 206 207 208
   Start from commandline:
   - Comparing 2 files:     kdiff3 file1 file2
   - Merging 2 files:       kdiff3 file1 file2 -o outputfile
   - Comparing 3 files:     kdiff3 file1 file2 file3
   - Merging 3 files:       kdiff3 file1 file2 file3 -o outputfile
        Note that file1 will be treated as base of file2 and file3.
Joachim Eibl's avatar
Joachim Eibl committed
209

Joachim Eibl's avatar
Joachim Eibl committed
210 211 212 213
   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.:
   - Comparing 3 files:     kdiff3 dir1/filename dir2 dir3
   (This also works in the open-dialog.)
214

Joachim Eibl's avatar
Joachim Eibl committed
215 216
   If you start without arguments, then a dialog will appear where you can
   select your files via a filebrowser.
Joachim Eibl's avatar
Joachim Eibl committed
217

Joachim Eibl's avatar
Joachim Eibl committed
218
   For more documentation, see the help-menu or the subdirectory doc.
Joachim Eibl's avatar
Joachim Eibl committed
219

Joachim Eibl's avatar
Joachim Eibl committed
220
   Have fun!