annotate kdiff3/README @ 113:7bca1f1340f6 tip

Build fixes for Xcode 10 / Qt 5.12
author Chris Cannam
date Mon, 17 Dec 2018 11:13:01 +0000
parents 4e6ebbbae925
children
rev   line source
joachim99@2 1 KDiff3-Readme
joachim99@2 2 =============
joachim99@2 3
joachim99@69 4 Author: Joachim Eibl (joachim.eibl at gmx.de)
joachim99@92 5 Copyright: (C) 2002-2009 by Joachim Eibl
joachim99@92 6 KDiff3-Version: 0.9.94
joachim99@2 7
joachim99@80 8 KDiff3 runs best on KDE but can be built without it, depending only on Qt-libs.
joachim99@80 9 These are available for Un*x, Windows, Mac.
joachim99@80 10 Thus there are many setup possibilities to consider.
joachim99@80 11
joachim99@92 12 From version 0.9.94 on the main target platform is KDE4/Qt4.
joachim99@80 13 For KDiff3 for KDE3/Qt3 use KDiff3-0.9.92 or older.
joachim99@80 14
joachim99@80 15 Contents
joachim99@80 16 --------
joachim99@80 17
joachim99@80 18 - Introduction
joachim99@80 19 - License
joachim99@80 20 - Requirements & Installation
joachim99@80 21 - For KDE4
joachim99@80 22 - With Qt4-libs, without KDE
joachim99@80 23 - for Linux/Un*x
joachim99@80 24 - for Windows
joachim99@80 25 - Debugging with MinGW under Windows:
joachim99@80 26 - for Mac: Building KDiff3 for Mac OSX (with Intel processor) as a universal binary
joachim99@92 27 - Creating and installing translation messages
joachim99@80 28 - Additional hints
joachim99@80 29
joachim99@80 30
joachim99@80 31 Introduction
joachim99@80 32 ------------
joachim99@2 33
joachim99@2 34 KDiff3 is a program that
joachim99@53 35 - compares and merges two or three input files or directories,
joachim99@2 36 - shows the differences line by line and character by character (!),
joachim99@2 37 - provides an automatic merge-facility and
joachim99@2 38 - an integrated editor for comfortable solving of merge-conflicts
joachim99@80 39 - has support for KDE-KIO (ftp, sftp, http, fish, smb),
joachim99@80 40 - has an intuitive graphical user interface,
joachim99@80 41 - provides a context menu for KDE-Konqueror and Windows-Explorer,
joachim99@80 42 - supports 64 bit systems. (Some build issues are discussed in here.)
joachim99@53 43
joachim99@53 44 Do you want help translating? Read the README in the po-subdirectory!
joachim99@2 45
joachim99@2 46
joachim99@80 47 License
joachim99@80 48 -------
joachim99@80 49
joachim99@2 50 GNU GENERAL PUBLIC LICENSE, Version 2, June 1991
joachim99@2 51 This program is free software; you can redistribute it and/or modify
joachim99@2 52 it under the terms of the GNU General Public License as published by
joachim99@2 53 the Free Software Foundation; either version 2 of the License, or
joachim99@2 54 (at your option) any later version.
joachim99@2 55
joachim99@2 56 This program is distributed in the hope that it will be useful,
joachim99@2 57 but WITHOUT ANY WARRANTY; without even the implied warranty of
joachim99@2 58 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
joachim99@2 59 GNU General Public License for more details.
joachim99@2 60
joachim99@2 61 You should have received a copy of the GNU General Public License
joachim99@2 62 along with this program; if not, write to the Free Software
joachim99@69 63 Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307 USA
joachim99@2 64
joachim99@2 65 For details see file "COPYING".
joachim99@2 66
joachim99@75 67 Exception from the GPL:
joachim99@75 68 As a special exception, the copyright holder Joachim Eibl gives permission
joachim99@80 69 to link this program with the Qt-library (commercial or open source edition)
joachim99@75 70 from Trolltech (www.trolltech.com), and he permits to distribute the resulting
joachim99@75 71 executable, without including the source code for the Qt-library in the
joachim99@75 72 source distribution.
joachim99@75 73
joachim99@2 74
joachim99@80 75 Requirements & Installation
joachim99@80 76 ---------------------------
joachim99@80 77
joachim99@80 78 - for KDE4:
joachim99@92 79 From version 0.9.94 on KDiff3 supports KDE4.
joachim99@80 80 For installation on most distributions you usually also require these packages (names as on opensuse):
joachim99@80 81 - g++ (g++, version 3.4 or newer)
joachim99@80 82 - libqt4-devel (Qt4-libs, version 4.4.0 or newer)
joachim99@80 83 - libkde4-devel (KDE4 Header files and development libraries)
joachim99@80 84 - libkonq-devel (optional, needed for the kdiff3-plugin, if not installed
joachim99@80 85 then the contextmenu plugin for konqueror won't be built.)
joachim99@80 86 - cmake (>2.6, checks dependencies and creates the Makefiles appopriate for your system)
joachim99@80 87
joachim99@80 88 Typically in a terminal (e.g. konsole) you cd into the kdiff3-directory and run these commands.
joachim99@80 89
joachim99@80 90 mkdir release # create sub directory
joachim99@80 91 cd release # cd into that directory
joachim99@80 92 kde4-config --prefix # Find out your KDE4-directory and note the result
joachim99@80 93 cmake .. -DCMAKE_INSTALL_PREFIX=<KDE4-prefix> # create Makefile, replace <KDE4-prefix> with the prior result
joachim99@80 94 make # run make (compile and link)
joachim99@80 95 sudo make install # install as root user
joachim99@80 96
joachim99@80 97 Now KDiff3 should be ready to use. Type "kdiff3" to start it.
joachim99@80 98 There should also be a entry in your KDE-start menu in "(Applications->)Development".
joachim99@80 99
joachim99@80 100 For creating a debug version:
joachim99@80 101 mkdir debug
joachim99@80 102 cd debug
joachim99@80 103 kde4-config --prefix # Find out your KDE4-directory and note the result
joachim99@80 104 cmake .. -DCMAKE_INSTALL_PREFIX=<KDE4-prefix> -DCMAKE_BUILD_TYPE=debugfull
joachim99@80 105 make
joachim99@80 106 sudo make install
joachim99@80 107
joachim99@80 108 The <KDE4-prefix> depends on your distribution:
joachim99@80 109 The command "kde4-config --prefix" should tell you.
joachim99@80 110 - For opensuse 11 use "/usr".
joachim99@80 111
joachim99@80 112 - Building KDiff3 with Qt4-libs, but without KDE
joachim99@80 113 - for Linux/Un*x
joachim99@80 114 - for Windows
joachim99@80 115 - for Mac
joachim99@80 116
joachim99@92 117 The version 0.9.94 requires Qt 4.4.0 or newer (from www.trolltech.com) for compilation.
joachim99@2 118
joachim99@12 119 You always need
joachim99@92 120 - kdiff3-0.9.94.tar.gz
joachim99@2 121
joachim99@73 122 - for Un*x: gcc, g++ with version >=3.4.2
joachim99@73 123 Qt-X11-libraries
joachim99@12 124
joachim99@73 125 - for Windows: Qt-win-libs
joachim99@80 126 If you have the Qt4 commercial edition, then compile with Visual Studio.NET2003 or newer.
joachim99@73 127 If you use the Qt4 open source edition, then you'll need MinGW.
joachim99@73 128 I verified that compilation and debugging works with these packages (probably newer ones will also work):
joachim99@80 129 - Use MinGW-5.1.4.exe or newer to install the following or newer:
joachim99@80 130 - gcc-core-3.4.5-20060117-1.tar.gz
joachim99@80 131 - binutils-2.17.50-20060824-1.tar.gz
joachim99@80 132 - gcc-g++-3.4.5-20060117-1.tar.gz
joachim99@80 133 - mingw-runtime-3.14.tar.gz
joachim99@80 134 - mingw32-make-3.81-2.tar.gz
joachim99@80 135 - w32api-3.11.tar.gz
joachim99@80 136 - gdb-6.3-2.exe (for debugging)
joachim99@12 137
joachim99@73 138 - for Mac: gcc, g++ with version >=3.4.2
joachim99@73 139 Qt-Mac-libraries
joachim99@80 140 - Optional: Qt Creator IDE: Development environment optimized for Qt (http://trolltech.com/developer/qt-creator)
joachim99@2 141
joachim99@80 142 Build-instructions (Un*x):
joachim99@80 143 - Make sure your shell-variable QTDIR is correct and that
joachim99@80 144 your path contains the Qt4-bin-directory.
joachim99@92 145 - cd into the directory kdiff3-0.9.94/src-QT4 and type
joachim99@80 146 - qmake kdiff3.pro
joachim99@80 147 - make (or "gmake" for GNU-Make)
joachim99@2 148
joachim99@80 149 Build-instructions (Windows):
joachim99@80 150 - set QTDIR=<QT4-dir> e.g.: c:\qt\4.4.1
joachim99@80 151 set "PATH=%QTDIR%\bin;%PATH%"
joachim99@92 152 - cd into the directory kdiff3-0.9.94\src-Qt4 and type
joachim99@80 153 - qmake kdiff3.pro
joachim99@80 154 - Either "nmake" for Visual Studio or "mingw32-make" depending on what you have.
joachim99@2 155
joachim99@80 156 Debugging with MinGW under Windows:
joachim99@80 157 - Qt Creator worked very good as debugger frontend too!
joachim99@80 158 - Debugging without gdb on the console:
joachim99@80 159 - The qt-win-opensource-4.4.1-mingw.exe only installs release dlls. You will have to compile the
joachim99@80 160 debug dlls yourself. Enter the qt-4.4.1-directory and run "configure -debug" and then "mingw32-make".
joachim99@92 161 - cd into the directory kdiff3-0.9.94\src-Qt4
joachim99@80 162 - edit the file "Makefile.Debug" and in the LFLAGS replace "-Wl,-subsystem,windows" with "-Wl,-subsystem,console"
joachim99@80 163 (this is necessary so that gdb can send a break signal to the running program)
joachim99@80 164 - mingw32-make debug (create a debuggable executable)
joachim99@80 165 - gdb debug\kdiff3.exe
joachim99@80 166 - At the "(gdb)"-prompt type "run" and enter to start.
joachim99@80 167 - While the program runs you can't set breakpoints, first interrupt it with Ctrl-C.
joachim99@80 168 - Use "help" to find out about how to use gdb. (Important commands: run, break, backtrace, print, quit)
joachim99@80 169 Using break with c++-methods requires to specify the parameter types too. Breakpoints in constructors might not work.
joachim99@58 170
joachim99@80 171 Building KDiff3 (Qt4) for Mac OSX (with Intel processor) as a universal binary (by Michael Schmidt)
joachim99@80 172 1) Install Qt/Mac 4.x with thread support, static libraries and universal flag.
joachim99@80 173 (For Qt4 run "configure -static"; only necessary if the final binary should not require shared Qt4-libs.)
joachim99@92 174 2) cd .../kdiff3-0.9.94/src-QT4
joachim99@80 175 3a) Create a makefile for kdiff3 by executing:
joachim99@80 176 qmake kdiff3.pro
joachim99@80 177 3b) optionally generate XCode-Project (for debugging purposes only) by executing:
joachim99@80 178 qmake -spec macx-xcode kdiff3.pro
joachim99@80 179 4) Execute:
joachim99@80 180 make
joachim99@92 181 5) After the build completes copy kdiff3 from the kdiff3-0.9.94/src-QT4 directory to
joachim99@80 182 /Applications
joachim99@58 183
joachim99@92 184 Creating and installing the translation messages
joachim99@92 185 The po directory contains translations from the KDE-translation teams.
joachim99@92 186 If you use the Qt-only-version of KDiff3, then the installation described above
joachim99@92 187 won't install translations automatically.
joachim99@92 188 To create and install the translations:
joachim99@92 189 0) Make sure /usr/lib/qt3/bin/msg2qm exists
joachim99@92 190 (comes with qt3-devel-tools. [Yes, really Qt3. There is no Qt4 replacement yet.])
joachim99@92 191 1) cd .../kdiff3-0.9.95/po
joachim99@92 192 2) sh create_qm_files install (asks for a super user password)
joachim99@92 193 Just to create the files in the po directory (as needed for the windows version):
joachim99@92 194 2) sh create_qm_files local
joachim99@92 195
joachim99@69 196
joachim99@75 197 (End of KDiff3 with Qt4-instructions)
joachim99@75 198 ------------------------------------------------------------------------
joachim99@75 199
joachim99@80 200 Additional hints
joachim99@80 201 ----------------
joachim99@75 202
joachim99@80 203 Start from commandline:
joachim99@80 204 - Comparing 2 files: kdiff3 file1 file2
joachim99@80 205 - Merging 2 files: kdiff3 file1 file2 -o outputfile
joachim99@80 206 - Comparing 3 files: kdiff3 file1 file2 file3
joachim99@80 207 - Merging 3 files: kdiff3 file1 file2 file3 -o outputfile
joachim99@80 208 Note that file1 will be treated as base of file2 and file3.
joachim99@2 209
joachim99@80 210 If all files have the same name but are in different directories, you can
joachim99@80 211 reduce typework by specifying the filename only for the first file. E.g.:
joachim99@80 212 - Comparing 3 files: kdiff3 dir1/filename dir2 dir3
joachim99@80 213 (This also works in the open-dialog.)
joachim99@12 214
joachim99@80 215 If you start without arguments, then a dialog will appear where you can
joachim99@80 216 select your files via a filebrowser.
joachim99@2 217
joachim99@80 218 For more documentation, see the help-menu or the subdirectory doc.
joachim99@2 219
joachim99@80 220 Have fun!