Version: 4.7.0 (using KDE 4.7.0) OS: MS Windows I installed Kompare, but it doesn't compare any files. In 'Compare files' dialog, there is an option to enter path for diff utility, which is empty, and I couldn't find any on my system or in KDE installer, so I am assuming KDE just didn't install any and that is why Kompare can't compare any files. Reproducible: Always Steps to Reproduce: 1. Run Kompare 2. Select two files to compare. Actual Results: Nothing happens Expected Results: Kompare should show differences between both files.
can you download & unpack diffutils from http://gnuwin32.sourceforge.net/packages/diffutils.htm and try if it works using this package? If it works using that package, we can add that as a 3rdparty dependency.
I've checked with diff.exe and cmp.exe - it does not work. Error message is "Could not parse diff output."
hm, I tried to reproduce your results, but it seems to work for me (after I installed the gnuwin32 diff.exe). It did not work with cmp.exe nor with diff3.exe (it gave your error message). Some other things that might be different: I have build the 4.7 branch of kompare, similar to what will be released as 4.7.4 in a couple of days. If you have a setup available, maybe you can make sure that this is the issue, otherwise you can wait for our binaries (we will make a 4.7.4 release). I will adapt the dependencies accordingly so diffutils will be installed with kompare.
I've tested with KDE 4.5.4 KDE SC 4.7.0 is unusable on my setup due to Bug 285854
It is working with diff.exe from gnuWin32's diffutils package. Just a point, it wasn't working when I just downloaded diff binaries, but it worked after I installed the setup and used those binaries.
Git commit c21ed20722ee73d31f2f8ec826bba9e8bf153ad2 by Patrick Spendrin. Committed on 30/11/2011 at 14:39. Pushed by sengels into branch 'kde-4.7.3'. add dependency to diffutils for kompare package BUG:287748 M +1 -0 portage/kde/kdesdk/kdesdk-package.xml http://commits.kde.org/emerge/c21ed20722ee73d31f2f8ec826bba9e8bf153ad2
> It did not work with cmp.exe nor with diff3.exe (it gave your error message). That is expected, diff.exe is what is needed. Pretty much any version of diff.exe should work as long as it's either GNU diff or something compatible with it. Using the GNU diffutils will definitely work because that's what we use on Fedora GNU/Linux and thus what I test with. > add dependency to diffutils for kompare package Thanks, that should make Kompare easier to install for users of that inferior operating system. ;-) -- Kevin Kofler, maintainer of Kompare
Oh, by the way, does the code automatically find the diff.exe once it is installed or do you have to set it manually? On GNU/Linux, if you leave the field empty in the settings (which is the default), it will find diff automatically, does that also work for you? If not, we should fix it.
(In reply to comment #8) > Oh, by the way, does the code automatically find the diff.exe once it is > installed or do you have to set it manually? On GNU/Linux, if you leave the > field empty in the settings (which is the default), it will find diff > automatically, does that also work for you? If not, we should fix it. No it doesn't work unless you put the full path in. On Linux, diff is in system path, which is not the case in Windows, so I am not sure how you can do it, but then again I don't know much about windows development.
The problem is that KompareProcess::writeDefaultCommandLine and KompareProcess::writeCommandLine default to just "diff", which indeed will only work if the executable is in your PATH. This should probably use KStandardDirs::findExe.
KStandardDirs sounds good, although if the working directory of KProcess is the one in which the kompare executable exists, then just calling diff should also work (given that you have installed diffutils into that location too). I am just not sure how diff is called from kompare.
It's called through this subclass of KProcess: http://websvn.kde.org/trunk/KDE/kdesdk/kompare/libdiff2/kompareprocess.h?revision=1009986&view=markup http://websvn.kde.org/trunk/KDE/kdesdk/kompare/libdiff2/kompareprocess.cpp?revision=1261064&view=markup
Maybe just a reverie, but would a "fc" (native comparison utility) backend be feasible?
If you write the code, maybe… ;-) But there's quite a lot of code which relies on diff options, parsing diff-formatted patches etc., and I'm not sure "fc" is anywhere near powerful enough to support Kompare's functionality. I think depending on gnuwin32 diffutils is the best solution, we just need to make sure the diff.exe is found automatically.