Commit cf77f4c3 authored by Joachim Eibl's avatar Joachim Eibl

KDiff3-0.9.91

git-svn-id: https://kdiff3.svn.sourceforge.net/svnroot/kdiff3/trunk@79 c8aa9fed-2811-0410-8543-893ada326672
parent 0d37adeb
Version 0.9.91 - 2006/10/29
===========================
- Encoding auto detection
- Fix for crash after double click below last line
- Saving of maximized window-state (Patch by Robert Vock)
- Separated Merge-options in own tab because "Diff and Merge"-options tab got too big.
- When pasting multiple lines into openfile dialog only first line is kept
- Drawing in directory view fixed.
- When specifying a separate output dir then for equal files a copy operation will also be offered.
- Windows specific:
- Windows installer problems fixed for users without admin-rights
- Fix for slow startup problem on Windows (Patch by Manfred Koehler)
- New: diff-ext-for-kdiff3 - Shell extension (originally by Sergey Zorin)
- Qt4-version:
- Saving of merge-result didn't work.
- Start external processes directly without cmd.exe-window
- Rewrote everything requiring Qt3-support
Version 0.9.90 - 2006/05/14
===========================
- Fixed KIO-problems of type "File exists" with tempfiles (introduced in 0.9.89)
......
......@@ -3,7 +3,7 @@ KDiff3-Readme
Author: Joachim Eibl (joachim.eibl at gmx.de)
Copyright: (C) 2002-2006 by Joachim Eibl
KDiff3-Version: 0.9.90-Qt4
KDiff3-Version: 0.9.91
KDiff3 is a program that
......@@ -36,13 +36,150 @@ Licence:
For details see file "COPYING".
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 non-commercial 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.
Requirements & Installation:
Version 0.9.91 provides special support for KDE3, but it can also be
built without KDE3 if the Qt-libraries are available.
(I also test and use the program under Windows.)
It is now also possible to build with Qt4 (See further below).
You always need
- kdiff3-0.9.91.tar.gz
For building the KDE3-version
- KDE>=3.3 and QT>=3.3-libraries. (but not with KDE4)
- gcc, g++ with version >=3.2
For building the Qt-only-version
- QT-libraries (version >=3.3.0, but <4.0 or >=4.2.0).
(www.trolltech.com)
- for Un*x: gcc, g++ with version >=3.2
- for Windows: VC6 / VC7.1
On some distributions it will be necessary to install developer
packages (RPMs) that contain include files for compilation:
- xorg-x11-devel (or x11-devel)
- qt-devel
- kdelibs-devel
Installation for KDE3:
- Make sure your shell-variable QTDIR is correct. (echo $QTDIR).
If it doesn't contain the correct path, type
export QTDIR=your_path_to_qt (e.g. /usr/lib/qt3)
- cd into the directory kdiff3-0.9.91 and type
- ./configure --prefix=/opt/kde3 (your KDE3 directory here)
- (make clean) (Required if you already compiled once.)
- make (Run compilation)
- make install (You must have root-rights for this step.)
For details also see the generic instructions in file "INSTALL".
If some icons are not visible or don't seem right, probably the prefix
was wrong. Check where your KDE3 installation is located and
use that directory with the prefix-option of configure.
This command should tell you: kde-config --prefix
For SuSE and most distributions the prefix usually is /opt/kde3.
For Redhat/Fedora and Mandrake the prefix usually is /usr.
For a local installation, that doesn't need root rights try
- ./configure --prefix=$KDEHOME ($KDEHOME probably is the same as $HOME/.kde)
- make
- make install (Installs everything in $KDEHOME. No root rights required.)
- Run $KDEHOME/bin/kdiff3. ($KDEHOME/bin is probably not in your path.)
Warning: If a local installation and a global installation exist, the local
menu, toolbar, help etc. will be used, even if you start the global
executable. To avoid confusion, better remove the local version then.
(rm -R `find $KDEHOME -name "*kdiff3*" -not -name "kdiff3*rc"`)
On Fedora-64-bit systems the following configure-line was reported to work:
./configure --prefix=`kde-config --prefix` --enable-libsuffix=64 --with-qt-libraries=/usr/lib64/qt-3.3/lib/
Both --enable-libsuffix=64 and -with-qt-libraries=/usr/lib64/qt-3.3/lib/ are needed;
without the first one it fails to find the KDE libraries,
and without the second one it fails to find libqt-mt
(strangely enough: libqt-mt is in /usr/lib64/qt-3.3/lib,
and "configure" tries /usr/lib64/qt-3.3/lib64)
If your qt-libraries are elsewhere please adapt the path accordingly.
Some secondary dependencies aren't correctly discovered by configure.
If e.g the a linker error appears telling you something like
"Can't find -lacl" this probably means that you have to install
libacl-devel-*.rpm etc.
If you run an older version of KDE and the make-process fails in the
doc- or po-directory, cd to the src-directory and run "make" there. Also run
"make install" there. This hopefully will create a working kdiff3-binary,
although without doc and language support.
Upgrading KDiff3 for KDE:
If you already installed an older version or KDiff3 and you have the
impression, that the new version doesn't work as described, you should try to
remove all files belonging to KDiff3 before reinstalling.
Try this search command to locate KDiff3-related files:
find $HOME/.kde /usr /opt -iname "*kdiff3*"
(Will take a few minutes.)
Building an RPM for Fedora Core (by Vadim Likhota)
Copy kdiff3-0.9.91.tar.gz into /usr/src/redhat/SOURCE
Copy kdiff3.spec into /usr/src/redhat/SPEC
Run rpmbuild -bb --target i686 kdiff3.spec
Find kdiff3-0.9.91-fc.i686.rpm in /usr/src/redhat/RPMS/I386
Installation for the Qt-only-platforms for Un*x:
(for Qt >=3.3.0 but <4.0)
- Make sure your shell-variable QTDIR is correct. (echo $QTDIR).
If it doesn't contain the correct path, type
export QTDIR=your_path_to_qt (e.g. /usr/lib/qt)
- cd into the directory kdiff3-0.9.91/src and type
- make -f Makefile.qt
- make -f Makefile.qt install (You must have root-rights for this step.)
(copies the files into /usr/local/bin and /usr/local/share/doc/kdiff3)
- Note: The file kdiff3.pro was used to generate the Makefile.qt:
qmake kdiff3.pro -o Makefile.qt
If you want to build the Qt-only version _and_ the KDE-version, do this
in separate directories, otherwise there will be errors.
Build for Windows:
Use qmake and kdiff3.pro to generate
an appropriate Makefile.
qmake kdiff3.pro -o Makefile
Building Kdiff3 for Mac OSX 10.3.8 (by Mark Teel)
--------------------------------------------------
1) Install Qt/Mac with thread support and static libraries.
2) cd .../kdiff3-0.9.91
3) Create a makefile for kdiff3 by executing:
qmake src/kdiff3.pro -o Makefile.qt
4) Edit Makefile.qt and add the definition "KDIFF3" to the following two lines:
CFLAGS = -pipe -Wall -W -Os -DKDIFF3 -DQT_NO_DEBUG ...
CXXFLAGS = -pipe -Wall -W -Os -DKDIFF3 -DQT_NO_DEBUG ...
5) Edit Makefile.qt and change the include path like so:
(old) INCPATH = -I/Library/qt3/mkspecs/default -Isrc ...
(new) INCPATH = -I/Library/qt3/mkspecs/macx-g++ -Isrc ...
6) Execute:
make -f Makefile.qt
7) After the build completes copy kdiff3 from the kdiff3-0.9.91 directory to
/Applications
----------------------------------------------------------------
Building KDiff3 with Qt4:
Requirements & Installation:
The version 0.9.90-Qt4 requires Qt 4.x.y (from www.trolltech.com) for compilation.
(Qt-version >= 4.1.2 is recommended.)
The version 0.9.91 requires Qt 4.2.0 (from www.trolltech.com) for compilation.
You always need
- kdiff3-0.9.90-Qt4.tar.gz
- kdiff3-0.9.91.tar.gz
- for Un*x: gcc, g++ with version >=3.4.2
Qt-X11-libraries
......@@ -58,7 +195,7 @@ Requirements & Installation:
- mingw32-make-3.80.0-3.tar.gz
- w32api-3.6.tar.gz (see also the note below)
- gdb-5.2.1-1.exe (for debugging)
(Note: At the time of writing this README, the MinGW-package that was part
of qt-win-opensource-4.1.2-mingw.exe lacked the latest w32api needed for
KDiff3-compilation. You will need to unpack w32api-3.6.tar.gz or newer
......@@ -69,27 +206,29 @@ Requirements & Installation:
Note for KDE-users:
The version 0.9.90-Qt4 doesn't provide support for KDE-3.x
The version 0.9.91-Qt4 doesn't provide support for KDE-3.x
because KDE-3.x.y requires Qt3.
If you need KDE-specific features like KIO-support stick to the
normal version 0.9.90.
normal version 0.9.91.
Build-instructions (Unix or Mac):
- Make sure your shell-variable QTDIR is correct and that
your path contains the Qt4-bin-directory.
- cd into the directory kdiff3-0.9.90-Qt4/src and type
- cd into the directory kdiff3-0.9.91/src-QT4 and type
- qmake kdiff3.pro
- make (or "gmake" for GNU-Make)
Build-instructions (Windows):
- Run your qtvars.bat in the Qt4-bin directory.
(This should set your QTDIR, QMAKESPEC and PATH-environment-variables.)
- cd into the directory kdiff3-0.9.90-Qt4/src and type
- cd into the directory kdiff3-0.9.91/src-Qt4 and type
- qmake kdiff3.pro
- make (which calls either "mingw32-make" or "nmake")
Debugging with MinGW under Windows:
- cd into the directory kdiff3-0.9.90-Qt4/src
- The qt-win-opensource-4.2.0-mingw.exe only installs release dlls. You will have to compile the
debug dlls yourself. Enter the qt-4.2.0-directory and run "configure -debug" and then "make".
- cd into the directory kdiff3-0.9.91/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)
- make debug (create a debuggable executable)
......@@ -103,6 +242,10 @@ Debugging with MinGW under Windows:
2. Dev-Cpp: The debugger said that the app crashed before even launching it.
Result: For Windows I recommend gdb on the console. Please tell me when things have improved!
(End of KDiff3 with Qt4-instructions)
------------------------------------------------------------------------
Start from commandline:
- Comparing 2 files: kdiff3 file1 file2
- Merging 2 files: kdiff3 file1 file2 -o outputfile
......
This file contains some feature-wishes for future KDiff3-versions.
TODO
====
- Fix drawing in columns A/B/C-directory window
- Qt4-translation files
- Double clicking into empty area causes crash
- Option window is too big (within KDE). (Scrollable?)
- Windows issues:
- Diff-Ext-For-KDiff3 included in the installer
- language selection from within KDiff3
- Export to html-format file
- Export to diff-format output (and import?)
- Export to diff3-format output (and import?)
- Use diff-output as input
- Variable width fonts.
- Use regular expression to ignore certain patterns
- Start without visible compare widgets. (? what did I mean by that)
- Hardlinks -performance support
- Manual alignment during merge should tell user his data will be lost
- Installer for windows for users.
- "List Only Deltas" causes directory merge to delete files
(https://sourceforge.net/tracker/index.php?func=detail&aid=1004853&group_id=58666&atid=488548)
- Diff-view for binary files
- Diff-view for pictures
> > What I find weird is that KDiff3 first creates the 3-way merge view (so
> > the window splits in 4 parts), then closes that and reopens in 2-way
> > diff view. I've never seen the binary package do that. Can this be fixed?
- Only show different lines.
- ftp: Abbruch beim Einlesen von Verzeichnis stoppt nicht vollständig
......
This diff is collapsed.
Diff-Ext: Copyright (c) 2003-2006, Sergey Zorin
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above
copyright notice, this list of conditions and the following
disclaimer.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials
provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Project: diff_ext
# Generates diff_ext_for_kdiff3.dll with gcc.
# Can be used for Cygwin and MingW (MingW ignores -mno-cygwin)
#
PROJ := diff_ext_for_kdiff3
CXX ?= g++.exe
ifdef DEBUG
CXXFLAGS ?= -g
else
CXXFLAGS ?= -Os
LDFLAGS += -s
endif
CXXFLAGS += -ansi -pedantic -Wall -W -D_UNICODE -DUNICODE
LIBS := -luuid -lole32
DEFFILE = $(PROJ).def
STATICLIB = $(PROJ).a
EXPLIB = $(PROJ).exp
SRC-CXX = $(wildcard *.cpp)
SRC-RC = $(wildcard *.rc)
OBJ := $(SRC-CXX:.cpp=.o)
RES := $(SRC-RC:.rc=.res)
OBJ += $(RES)
DLL := $(PROJ).dll
.PHONY: all clean
.SUFFIXES: .rc .res
all: .depend $(DLL)
debug:
$(MAKE) DEBUG=YES UNICODE=YES
release:
$(MAKE)
.depend: Makefile $(SRC-RC) $(SRC-CXX)
$(CXX) -M $(CXXFLAGS) $(SRC-RC) $(SRC-CXX) > .depend
include .depend
clean: clean-custom
${RM} $(OBJ) $(DLL) ${EXPLIB} $(STATICLIB)
$(DLL): $(OBJ)
dllwrap.exe \
--mno-cygwin \
--def $(DEFFILE) \
--output-exp ${EXPLIB} \
--driver-name c++ -L/usr/local/lib -L/usr/lib/mingw \
--implib $(STATICLIB) \
$(OBJ) $(LDFLAGS) $(LIBS) \
-o $@
.cpp.o:
$(CXX) $(CXXFLAGS) -c $< -o $@
.rc.res:
windres.exe $< -J rc -o $@ -O coff -DMING
Diff-Ext for KDiff3 - Readme
============================
Authors:
Sergey Zorin (Author of diff-ext, see http://diff-ext.sourceforge.net)
Joachim Eibl (KDiff3-specific extensions and integration, see http://kdiff3.sourceforge.net)
Copyright (c):
Original Diff-Ext: Copyright (c) 2003-2006, Sergey Zorin, All rights reserved.
Extensions for KDiff3: Copyright (c) 2006, Joachim Eibl
License: See file LICENSE in this subdirectory
Building:
Via MinGW-compiler package (http://www.mingw.org/): Compile via gnu-make (Makefile)
Via MSVC2005: Use vcproj-file.
Installation:
For basic testing you can run "regsvr32 diff_ext_for_kdiff3.dll".
To use all features the installation that comes with the KDiff3-setup*.exe is recommended.
See also the nsi-file available on the KDiff3-subversion-repository:
http://svn.sourceforge.net/viewvc/*checkout*/kdiff3/trunk/kdiff3/windows_installer/kdiff3.nsi
Translation:
If you would like help translating diff-ext-for-kdiff3 please copy the diff_ext.pot to
diff_ext_xx.po (where xx is the language-shortcut).
Then edit that file and fill in the msgstr-string for each respective msgid-string.
Then place the for in the KDiff3-translations subdirectory.
Use the language selection within KDiff3 to switch the language or set the language shortcut
in the registry HKEY_CURRENT_USER\Software\KDiff3\diff-ext: Language
If everything works, please send me the created file.
Have fun,
Joachim
/*
* Copyright (c) 2003, Sergey Zorin. All rights reserved.
*
* This software is distributable under the BSD license. See the terms
* of the BSD license in the LICENSE file provided with this software.
*
*/
#include "class_factory.h"
#include "diff_ext.h"
#include "server.h"
CLASS_FACTORY::CLASS_FACTORY() {
_ref_count = 0L;
SERVER::instance()->lock();
}
CLASS_FACTORY::~CLASS_FACTORY() {
SERVER::instance()->release();
}
STDMETHODIMP
CLASS_FACTORY::QueryInterface(REFIID riid, void** ppv) {
HRESULT ret = E_NOINTERFACE;
*ppv = 0;
if(IsEqualIID(riid, IID_IUnknown) || IsEqualIID(riid, IID_IClassFactory)) {
*ppv = static_cast<CLASS_FACTORY*>(this);
AddRef();
ret = NOERROR;
}
return ret;
}
STDMETHODIMP_(ULONG)
CLASS_FACTORY::AddRef() {
return InterlockedIncrement((LPLONG)&_ref_count);
}
STDMETHODIMP_(ULONG)
CLASS_FACTORY::Release() {
ULONG ret = 0L;
if(InterlockedDecrement((LPLONG)&_ref_count) != 0)
ret = _ref_count;
else
delete this;
return ret;
}
STDMETHODIMP
CLASS_FACTORY::CreateInstance(IUnknown* outer, REFIID refiid, void** obj) {
HRESULT ret = CLASS_E_NOAGGREGATION;
*obj = 0;
// Shell extensions typically don't support aggregation (inheritance)
if(outer == 0) {
DIFF_EXT* ext = new DIFF_EXT();
if(ext == 0)
ret = E_OUTOFMEMORY;
else
ret = ext->QueryInterface(refiid, obj);
}
return ret;
}
STDMETHODIMP
CLASS_FACTORY::LockServer(BOOL) {
return NOERROR;
}
/*
* Copyright (c) 2003, Sergey Zorin. All rights reserved.
*
* This software is distributable under the BSD license. See the terms
* of the BSD license in the LICENSE file provided with this software.
*
*/
#ifndef __class_factory_h__
#define __class_factory_h__
#include <shlobj.h>
#include <shlguid.h>
class CLASS_FACTORY : public IClassFactory {
public:
CLASS_FACTORY();
virtual ~CLASS_FACTORY();
//IUnknown members
STDMETHODIMP QueryInterface(REFIID, void**);
STDMETHODIMP_(ULONG) AddRef();
STDMETHODIMP_(ULONG) Release();
//ICLASS_FACTORY members
STDMETHODIMP CreateInstance(IUnknown*, REFIID, void**);
STDMETHODIMP LockServer(BOOL);
private:
ULONG _ref_count;
};
#endif //__class_factory_h__
This diff is collapsed.
/*
* Copyright (c) 2003-2004, Sergey Zorin. All rights reserved.
*
* This software is distributable under the BSD license. See the terms
* of the BSD license in the LICENSE file provided with this software.
*
*/
#ifndef __diff_ext_h__
#define __diff_ext_h__
#include <windows.h>
#include <windowsx.h>
#include <shlobj.h>
#include "server.h"
// this is the actual OLE Shell context menu handler
class DIFF_EXT : public IContextMenu, IShellExtInit {
public:
DIFF_EXT();
virtual ~DIFF_EXT();
//IUnknown members
STDMETHODIMP QueryInterface(REFIID interface_id, void** result);
STDMETHODIMP_(ULONG) AddRef();
STDMETHODIMP_(ULONG) Release();
//IShell members
STDMETHODIMP QueryContextMenu(HMENU menu, UINT index, UINT cmd_first, UINT cmd_last, UINT flags);
STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO info);
STDMETHODIMP GetCommandString(UINT cmd, UINT flags, UINT* reserved, LPSTR name, UINT name_length);
//IShellExtInit methods
STDMETHODIMP Initialize(LPCITEMIDLIST folder, IDataObject* subj, HKEY key);
private:
void diff( const tstring& arguments );
void diff_with(unsigned int num, bool bMerge);
tstring cut_to_length(const tstring&, size_t length = 64);
void initialize_language();
private:
UINT m_nrOfSelectedFiles;
tstring _file_name1;
tstring _file_name2;
tstring _file_name3;
HINSTANCE _resource;
HWND _hwnd;
ULONG _ref_count;
std::list< tstring >& m_recentFiles;
UINT m_id_FirstCmd;
UINT m_id_Diff;
UINT m_id_DiffWith;
UINT m_id_DiffLater;
UINT m_id_MergeWith;
UINT m_id_Merge3;
UINT m_id_Diff3;
UINT m_id_DiffWith_Base;
UINT m_id_About;
};
#endif // __diff_ext_h__
# Diff-ext-for-KDiff3
# Copyright (C) 2006 Joachim Eibl
# This file is distributed under the same license as the diff-ext-for-KDiff3 package.
# PO-Template created by Joachim Eibl <Joachim dot Eibl at gmx dot de>, 2006.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-10-03 06:05+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: diff_ext.cpp:368 diff_ext.cpp:402
msgid "Compare with"
msgstr ""
#: diff_ext.cpp:369
msgid "Merge with"
msgstr ""
#: diff_ext.cpp:384
msgid "3-way merge with base"
msgstr ""
#: diff_ext.cpp:387
msgid "Save '%1' for later comparison or merge"
msgstr ""
#: diff_ext.cpp:408
msgid "Compare"
msgstr ""
#: diff_ext.cpp:412
msgid "3 way comparison"
msgstr ""
#: diff_ext.cpp:418
msgid "About Diff-Ext ..."
msgstr ""
#: diff_ext.cpp:482
msgid "Diff-Ext Copyright (c) 2003-2006, Sergey Zorin. All rights reserved.\n"
msgstr ""
#: diff_ext.cpp:483
msgid "This software is distributable under the BSD license.\n"
msgstr ""
#: diff_ext.cpp:484
msgid "Some extensions for KDiff3 by Joachim Eibl.\n"
msgstr ""
#: diff_ext.cpp:485
msgid "Homepage for Diff-Ext: http://diff-ext.sourceforge.net\n"
msgstr ""
#: diff_ext.cpp:486
msgid "Homepage for KDiff3: http://kdiff3.sourceforge.net"
msgstr ""
#: diff_ext.cpp:487
msgid "About Diff-Ext for KDiff3"
msgstr ""
#: diff_ext.cpp:512
msgid "Compare selected files"
msgstr ""
#: diff_ext.cpp:518 diff_ext.cpp:538
msgid "Compare '%1' with '%2'"
msgstr ""
#: diff_ext.cpp:524
msgid "Save '%1' for later operation"
msgstr ""
#: diff_ext.cpp:576
msgid "Could not start KDiff3. Please rerun KDiff3 installation."
msgstr ""