joachim99@2
|
1 KDiff3-Readme
|
joachim99@2
|
2 =============
|
joachim99@2
|
3
|
joachim99@69
|
4 Author: Joachim Eibl (joachim.eibl at gmx.de)
|
joachim99@69
|
5 Copyright: (C) 2002-2006 by Joachim Eibl
|
joachim99@75
|
6 KDiff3-Version: 0.9.91
|
joachim99@2
|
7
|
joachim99@2
|
8
|
joachim99@2
|
9 KDiff3 is a program that
|
joachim99@53
|
10 - compares and merges two or three input files or directories,
|
joachim99@2
|
11 - shows the differences line by line and character by character (!),
|
joachim99@2
|
12 - provides an automatic merge-facility and
|
joachim99@2
|
13 - an integrated editor for comfortable solving of merge-conflicts
|
joachim99@53
|
14 - has support for KDE-KIO (ftp, sftp, http, fish, smb)
|
joachim99@53
|
15 - and has an intuitive graphical user interface.
|
joachim99@53
|
16
|
joachim99@53
|
17
|
joachim99@53
|
18 Do you want help translating? Read the README in the po-subdirectory!
|
joachim99@2
|
19
|
joachim99@2
|
20
|
joachim99@2
|
21 Licence:
|
joachim99@2
|
22 GNU GENERAL PUBLIC LICENSE, Version 2, June 1991
|
joachim99@2
|
23 This program is free software; you can redistribute it and/or modify
|
joachim99@2
|
24 it under the terms of the GNU General Public License as published by
|
joachim99@2
|
25 the Free Software Foundation; either version 2 of the License, or
|
joachim99@2
|
26 (at your option) any later version.
|
joachim99@2
|
27
|
joachim99@2
|
28 This program is distributed in the hope that it will be useful,
|
joachim99@2
|
29 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
joachim99@2
|
30 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
joachim99@2
|
31 GNU General Public License for more details.
|
joachim99@2
|
32
|
joachim99@2
|
33 You should have received a copy of the GNU General Public License
|
joachim99@2
|
34 along with this program; if not, write to the Free Software
|
joachim99@69
|
35 Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307 USA
|
joachim99@2
|
36
|
joachim99@2
|
37 For details see file "COPYING".
|
joachim99@2
|
38
|
joachim99@75
|
39 Exception from the GPL:
|
joachim99@75
|
40 As a special exception, the copyright holder Joachim Eibl gives permission
|
joachim99@75
|
41 to link this program with the Qt-library (commercial or non-commercial edition)
|
joachim99@75
|
42 from Trolltech (www.trolltech.com), and he permits to distribute the resulting
|
joachim99@75
|
43 executable, without including the source code for the Qt-library in the
|
joachim99@75
|
44 source distribution.
|
joachim99@75
|
45
|
joachim99@2
|
46
|
joachim99@2
|
47 Requirements & Installation:
|
joachim99@75
|
48 Version 0.9.91 provides special support for KDE3, but it can also be
|
joachim99@75
|
49 built without KDE3 if the Qt-libraries are available.
|
joachim99@75
|
50 (I also test and use the program under Windows.)
|
joachim99@75
|
51 It is now also possible to build with Qt4 (See further below).
|
joachim99@2
|
52
|
joachim99@12
|
53 You always need
|
joachim99@75
|
54 - kdiff3-0.9.91.tar.gz
|
joachim99@75
|
55
|
joachim99@75
|
56 For building the KDE3-version
|
joachim99@75
|
57 - KDE>=3.3 and QT>=3.3-libraries. (but not with KDE4)
|
joachim99@75
|
58 - gcc, g++ with version >=3.2
|
joachim99@75
|
59
|
joachim99@75
|
60 For building the Qt-only-version
|
joachim99@75
|
61 - QT-libraries (version >=3.3.0, but <4.0 or >=4.2.0).
|
joachim99@75
|
62 (www.trolltech.com)
|
joachim99@75
|
63 - for Un*x: gcc, g++ with version >=3.2
|
joachim99@75
|
64 - for Windows: VC6 / VC7.1
|
joachim99@75
|
65
|
joachim99@75
|
66 On some distributions it will be necessary to install developer
|
joachim99@75
|
67 packages (RPMs) that contain include files for compilation:
|
joachim99@75
|
68 - xorg-x11-devel (or x11-devel)
|
joachim99@75
|
69 - qt-devel
|
joachim99@75
|
70 - kdelibs-devel
|
joachim99@75
|
71
|
joachim99@75
|
72 Installation for KDE3:
|
joachim99@75
|
73 - Make sure your shell-variable QTDIR is correct. (echo $QTDIR).
|
joachim99@75
|
74 If it doesn't contain the correct path, type
|
joachim99@75
|
75 export QTDIR=your_path_to_qt (e.g. /usr/lib/qt3)
|
joachim99@75
|
76 - cd into the directory kdiff3-0.9.91 and type
|
joachim99@75
|
77 - ./configure --prefix=/opt/kde3 (your KDE3 directory here)
|
joachim99@75
|
78 - (make clean) (Required if you already compiled once.)
|
joachim99@75
|
79 - make (Run compilation)
|
joachim99@75
|
80 - make install (You must have root-rights for this step.)
|
joachim99@75
|
81
|
joachim99@75
|
82 For details also see the generic instructions in file "INSTALL".
|
joachim99@75
|
83
|
joachim99@75
|
84 If some icons are not visible or don't seem right, probably the prefix
|
joachim99@75
|
85 was wrong. Check where your KDE3 installation is located and
|
joachim99@75
|
86 use that directory with the prefix-option of configure.
|
joachim99@75
|
87
|
joachim99@75
|
88 This command should tell you: kde-config --prefix
|
joachim99@75
|
89
|
joachim99@75
|
90 For SuSE and most distributions the prefix usually is /opt/kde3.
|
joachim99@75
|
91 For Redhat/Fedora and Mandrake the prefix usually is /usr.
|
joachim99@75
|
92 For a local installation, that doesn't need root rights try
|
joachim99@75
|
93 - ./configure --prefix=$KDEHOME ($KDEHOME probably is the same as $HOME/.kde)
|
joachim99@75
|
94 - make
|
joachim99@75
|
95 - make install (Installs everything in $KDEHOME. No root rights required.)
|
joachim99@75
|
96 - Run $KDEHOME/bin/kdiff3. ($KDEHOME/bin is probably not in your path.)
|
joachim99@75
|
97 Warning: If a local installation and a global installation exist, the local
|
joachim99@75
|
98 menu, toolbar, help etc. will be used, even if you start the global
|
joachim99@75
|
99 executable. To avoid confusion, better remove the local version then.
|
joachim99@75
|
100 (rm -R `find $KDEHOME -name "*kdiff3*" -not -name "kdiff3*rc"`)
|
joachim99@75
|
101
|
joachim99@75
|
102 On Fedora-64-bit systems the following configure-line was reported to work:
|
joachim99@75
|
103 ./configure --prefix=`kde-config --prefix` --enable-libsuffix=64 --with-qt-libraries=/usr/lib64/qt-3.3/lib/
|
joachim99@75
|
104 Both --enable-libsuffix=64 and -with-qt-libraries=/usr/lib64/qt-3.3/lib/ are needed;
|
joachim99@75
|
105 without the first one it fails to find the KDE libraries,
|
joachim99@75
|
106 and without the second one it fails to find libqt-mt
|
joachim99@75
|
107 (strangely enough: libqt-mt is in /usr/lib64/qt-3.3/lib,
|
joachim99@75
|
108 and "configure" tries /usr/lib64/qt-3.3/lib64)
|
joachim99@75
|
109 If your qt-libraries are elsewhere please adapt the path accordingly.
|
joachim99@75
|
110
|
joachim99@75
|
111 Some secondary dependencies aren't correctly discovered by configure.
|
joachim99@75
|
112 If e.g the a linker error appears telling you something like
|
joachim99@75
|
113 "Can't find -lacl" this probably means that you have to install
|
joachim99@75
|
114 libacl-devel-*.rpm etc.
|
joachim99@75
|
115
|
joachim99@75
|
116 If you run an older version of KDE and the make-process fails in the
|
joachim99@75
|
117 doc- or po-directory, cd to the src-directory and run "make" there. Also run
|
joachim99@75
|
118 "make install" there. This hopefully will create a working kdiff3-binary,
|
joachim99@75
|
119 although without doc and language support.
|
joachim99@75
|
120
|
joachim99@75
|
121 Upgrading KDiff3 for KDE:
|
joachim99@75
|
122 If you already installed an older version or KDiff3 and you have the
|
joachim99@75
|
123 impression, that the new version doesn't work as described, you should try to
|
joachim99@75
|
124 remove all files belonging to KDiff3 before reinstalling.
|
joachim99@75
|
125 Try this search command to locate KDiff3-related files:
|
joachim99@75
|
126 find $HOME/.kde /usr /opt -iname "*kdiff3*"
|
joachim99@75
|
127 (Will take a few minutes.)
|
joachim99@75
|
128
|
joachim99@75
|
129
|
joachim99@75
|
130 Building an RPM for Fedora Core (by Vadim Likhota)
|
joachim99@75
|
131 Copy kdiff3-0.9.91.tar.gz into /usr/src/redhat/SOURCE
|
joachim99@75
|
132 Copy kdiff3.spec into /usr/src/redhat/SPEC
|
joachim99@75
|
133 Run rpmbuild -bb --target i686 kdiff3.spec
|
joachim99@75
|
134 Find kdiff3-0.9.91-fc.i686.rpm in /usr/src/redhat/RPMS/I386
|
joachim99@75
|
135
|
joachim99@75
|
136
|
joachim99@75
|
137 Installation for the Qt-only-platforms for Un*x:
|
joachim99@75
|
138 (for Qt >=3.3.0 but <4.0)
|
joachim99@75
|
139 - Make sure your shell-variable QTDIR is correct. (echo $QTDIR).
|
joachim99@75
|
140 If it doesn't contain the correct path, type
|
joachim99@75
|
141 export QTDIR=your_path_to_qt (e.g. /usr/lib/qt)
|
joachim99@75
|
142 - cd into the directory kdiff3-0.9.91/src and type
|
joachim99@75
|
143 - make -f Makefile.qt
|
joachim99@75
|
144 - make -f Makefile.qt install (You must have root-rights for this step.)
|
joachim99@75
|
145 (copies the files into /usr/local/bin and /usr/local/share/doc/kdiff3)
|
joachim99@75
|
146 - Note: The file kdiff3.pro was used to generate the Makefile.qt:
|
joachim99@75
|
147 qmake kdiff3.pro -o Makefile.qt
|
joachim99@75
|
148 If you want to build the Qt-only version _and_ the KDE-version, do this
|
joachim99@75
|
149 in separate directories, otherwise there will be errors.
|
joachim99@75
|
150
|
joachim99@75
|
151 Build for Windows:
|
joachim99@75
|
152 Use qmake and kdiff3.pro to generate
|
joachim99@75
|
153 an appropriate Makefile.
|
joachim99@75
|
154 qmake kdiff3.pro -o Makefile
|
joachim99@75
|
155
|
joachim99@75
|
156
|
joachim99@75
|
157 Building Kdiff3 for Mac OSX 10.3.8 (by Mark Teel)
|
joachim99@75
|
158 --------------------------------------------------
|
joachim99@75
|
159 1) Install Qt/Mac with thread support and static libraries.
|
joachim99@75
|
160 2) cd .../kdiff3-0.9.91
|
joachim99@75
|
161 3) Create a makefile for kdiff3 by executing:
|
joachim99@75
|
162 qmake src/kdiff3.pro -o Makefile.qt
|
joachim99@75
|
163 4) Edit Makefile.qt and add the definition "KDIFF3" to the following two lines:
|
joachim99@75
|
164 CFLAGS = -pipe -Wall -W -Os -DKDIFF3 -DQT_NO_DEBUG ...
|
joachim99@75
|
165 CXXFLAGS = -pipe -Wall -W -Os -DKDIFF3 -DQT_NO_DEBUG ...
|
joachim99@75
|
166 5) Edit Makefile.qt and change the include path like so:
|
joachim99@75
|
167 (old) INCPATH = -I/Library/qt3/mkspecs/default -Isrc ...
|
joachim99@75
|
168 (new) INCPATH = -I/Library/qt3/mkspecs/macx-g++ -Isrc ...
|
joachim99@75
|
169 6) Execute:
|
joachim99@75
|
170 make -f Makefile.qt
|
joachim99@75
|
171 7) After the build completes copy kdiff3 from the kdiff3-0.9.91 directory to
|
joachim99@75
|
172 /Applications
|
joachim99@75
|
173
|
joachim99@75
|
174 ----------------------------------------------------------------
|
joachim99@75
|
175
|
joachim99@75
|
176 Building KDiff3 with Qt4:
|
joachim99@75
|
177
|
joachim99@75
|
178 Requirements & Installation:
|
joachim99@75
|
179 The version 0.9.91 requires Qt 4.2.0 (from www.trolltech.com) for compilation.
|
joachim99@75
|
180
|
joachim99@75
|
181 You always need
|
joachim99@75
|
182 - kdiff3-0.9.91.tar.gz
|
joachim99@2
|
183
|
joachim99@73
|
184 - for Un*x: gcc, g++ with version >=3.4.2
|
joachim99@73
|
185 Qt-X11-libraries
|
joachim99@12
|
186
|
joachim99@73
|
187 - for Windows: Qt-win-libs
|
joachim99@73
|
188 If you have the Qt4 commercial edition, then compile with Visual Studio.
|
joachim99@73
|
189 If you use the Qt4 open source edition, then you'll need MinGW.
|
joachim99@73
|
190 I verified that compilation and debugging works with these packages (probably newer ones will also work):
|
joachim99@73
|
191 - gcc-core-3.4.2-20040916-1.tar.gz
|
joachim99@73
|
192 - binutils-2.15.91-20040904-1.tar.gz
|
joachim99@73
|
193 - gcc-g++-3.4.2-20040916-1.tar.gz
|
joachim99@73
|
194 - mingw-runtime-3.9.tar.gz
|
joachim99@73
|
195 - mingw32-make-3.80.0-3.tar.gz
|
joachim99@73
|
196 - w32api-3.6.tar.gz (see also the note below)
|
joachim99@73
|
197 - gdb-5.2.1-1.exe (for debugging)
|
joachim99@75
|
198
|
joachim99@73
|
199 (Note: At the time of writing this README, the MinGW-package that was part
|
joachim99@73
|
200 of qt-win-opensource-4.1.2-mingw.exe lacked the latest w32api needed for
|
joachim99@73
|
201 KDiff3-compilation. You will need to unpack w32api-3.6.tar.gz or newer
|
joachim99@73
|
202 from www.mingw.org into your MinGW-directory.)
|
joachim99@12
|
203
|
joachim99@73
|
204 - for Mac: gcc, g++ with version >=3.4.2
|
joachim99@73
|
205 Qt-Mac-libraries
|
joachim99@2
|
206
|
joachim99@2
|
207
|
joachim99@73
|
208 Note for KDE-users:
|
joachim99@75
|
209 The version 0.9.91-Qt4 doesn't provide support for KDE-3.x
|
joachim99@73
|
210 because KDE-3.x.y requires Qt3.
|
joachim99@73
|
211 If you need KDE-specific features like KIO-support stick to the
|
joachim99@75
|
212 normal version 0.9.91.
|
joachim99@2
|
213
|
joachim99@73
|
214 Build-instructions (Unix or Mac):
|
joachim99@73
|
215 - Make sure your shell-variable QTDIR is correct and that
|
joachim99@73
|
216 your path contains the Qt4-bin-directory.
|
joachim99@75
|
217 - cd into the directory kdiff3-0.9.91/src-QT4 and type
|
joachim99@73
|
218 - qmake kdiff3.pro
|
joachim99@73
|
219 - make (or "gmake" for GNU-Make)
|
joachim99@58
|
220
|
joachim99@73
|
221 Build-instructions (Windows):
|
joachim99@73
|
222 - Run your qtvars.bat in the Qt4-bin directory.
|
joachim99@73
|
223 (This should set your QTDIR, QMAKESPEC and PATH-environment-variables.)
|
joachim99@75
|
224 - cd into the directory kdiff3-0.9.91/src-Qt4 and type
|
joachim99@73
|
225 - qmake kdiff3.pro
|
joachim99@73
|
226 - make (which calls either "mingw32-make" or "nmake")
|
joachim99@58
|
227
|
joachim99@73
|
228 Debugging with MinGW under Windows:
|
joachim99@75
|
229 - The qt-win-opensource-4.2.0-mingw.exe only installs release dlls. You will have to compile the
|
joachim99@75
|
230 debug dlls yourself. Enter the qt-4.2.0-directory and run "configure -debug" and then "make".
|
joachim99@75
|
231 - cd into the directory kdiff3-0.9.91/src-Qt4
|
joachim99@73
|
232 - edit the file "Makefile.Debug" and in the LFLAGS replace "-Wl,-subsystem,windows" with "-Wl,-subsystem,console"
|
joachim99@73
|
233 (this is necessary so that gdb can send a break signal to the running program)
|
joachim99@73
|
234 - make debug (create a debuggable executable)
|
joachim99@73
|
235 - gdb debug\kdiff3.exe
|
joachim99@73
|
236 - At the "(gdb)"-prompt type "run" and enter to start.
|
joachim99@73
|
237 - While the program runs you can't set breakpoints, first interrupt it with Ctrl-C.
|
joachim99@73
|
238 - Use "help" to find out about how to use gdb. (Important commands: run, break, backtrace, print, quit)
|
joachim99@73
|
239 Using break with c++-methods requires to specify the parameter types too. Breakpoints in constructors might not work.
|
joachim99@73
|
240 - I've tested graphical gdb-frontends too:
|
joachim99@73
|
241 1. Insight (also from mingw.org) worked until I wanted to interrupt the program for setting breakpoints.
|
joachim99@73
|
242 2. Dev-Cpp: The debugger said that the app crashed before even launching it.
|
joachim99@73
|
243 Result: For Windows I recommend gdb on the console. Please tell me when things have improved!
|
joachim99@69
|
244
|
joachim99@75
|
245 (End of KDiff3 with Qt4-instructions)
|
joachim99@75
|
246 ------------------------------------------------------------------------
|
joachim99@75
|
247
|
joachim99@75
|
248
|
joachim99@2
|
249 Start from commandline:
|
joachim99@2
|
250 - Comparing 2 files: kdiff3 file1 file2
|
joachim99@2
|
251 - Merging 2 files: kdiff3 file1 file2 -o outputfile
|
joachim99@2
|
252 - Comparing 3 files: kdiff3 file1 file2 file3
|
joachim99@2
|
253 - Merging 3 files: kdiff3 file1 file2 file3 -o outputfile
|
joachim99@2
|
254 Note that file1 will be treated as base of file2 and file3.
|
joachim99@2
|
255
|
joachim99@12
|
256 If all files have the same name but are in different directories, you can
|
joachim99@12
|
257 reduce typework by specifying the filename only for the first file. E.g.:
|
joachim99@12
|
258 - Comparing 3 files: kdiff3 dir1/filename dir2 dir3
|
joachim99@12
|
259 (This also works in the open-dialog.)
|
joachim99@12
|
260
|
joachim99@2
|
261 If you start without arguments, then a dialog will appear where you can
|
joachim99@2
|
262 select your files via a filebrowser.
|
joachim99@2
|
263
|
joachim99@2
|
264 For more documentation, see the help-menu or the subdirectory doc.
|
joachim99@2
|
265
|
joachim99@2
|
266 Have fun!
|