Diff for Windows
There are a few different options:
- Stand-alone diff executables for win32. Put your exe where $ENV{PATH} points to, set $UseDiff=1, and you're done:
- diff executables that depend on specific package dlls, mostly part of major Unix-like environment emulators under Windows. You may have problems defining the path of the exe due to the dlls and environment dependencies (see stories below):
- Other options
Troubleshooting Windows installations
The following discussion on failure of diffs and searches using older Perl versions might be helpful in troubleshooting other installations. Both of these problems went away on two systems after upgrading Perl to Activestate build 618.
- On Windows NT using Microsoft IIS UseMod runs, but diffs don't show up at all (even though I think I've the correct path to the cygnus utilities diff) and searches always yield 0 results (even though the words searched are in the documents).
[Old debugging information deleted.] The searching problem is almost certainly a difference in the way Perl for Windows matches the * in filenames. The ActivePerl documentation includes a note about using the * in filenames--it may not work like it does in UNIX.
I haven't tested the diff function under Windows. (My test systems are Win95 and Win98 running Apache.) A few things that might help:
- First of all, are the files old_diff and new_diff being created? (They are not erased after the diff.)
- It's possible that the PATH isn't really set by the Perl code like: $ENV{PATH} = "/usr/bin/";. Perhaps you could try changing the line in the GetDiff? function (almost at the end of the file) that says:
$diff_out = `diff old_diff new_diff`;
...to something like:
$diff_out = `C:/cygnus/bin/diff old_diff new_diff`;
...or wherever you keep your diff. (Note that forward slashes should work. If you use backslashes (\), you may have to double them like `C:\\cygnus\\...`.) If that works I might change the code in the next release.
2003/11/05 Windows NT 4 SP6a, Apache 2.0.48, ActiveState
? Perl 5.8.0 build 805, DiffUtils
? from
http://sourceforge.net/projects/gnuwin32 .
UseMod 1.0's diff worked right after using the full path in the backticks, as described above.
2000/01/12: Installed on Windows 2000 Pro, Apache 1.3.12, ActiveState
? Perl 5.6 build 613, cygwin b20. I already had Apache running with Perl. Installed
UseModWiki and followed the directions in the INSTALL file and here. It seems to be working.
To enable diffs I did not have to modify the $diff_out line as described above. I made a mistake originally in that I modified the value in wiki.pl but they are overridden by the config file. Making the change in the config file worked fine.
I set my datadir to c:\\usemod instead of c:/usemod and it sort of worked, but searches didn't work (they returned things like .... usemodwiki/page/H/HomePage) and I had to set $UseIndex? to 0 to get local links to work.
I haven't run much yet, but I will report issues. One thing I have noticed is that with Netscape it sometimes takes a long time (20+ seconds to save a page) even with diff disabled.
2001/03/07: Installed on Win NT 4.0sp6 with Apache 1.3.17. Virtually effortless and diff works fine. I got one of the "windows diff ports" that are floating about. It's a bit weird that I see virtually no default content (like "wiki formatting rules" type stuff).
2001/11/24 I wrote a little CGI script to test cygwin diff and found out that it tries to find the path to the files in the "pseudo unix filesystem" under your cygwin install directory. You can make it work by, for example, moving de wiki database to "c:/cygwin/tmp/mywikidb" and adding some statements to GetDiff
?() to change the paths to "/tmp/mywikidb/old_diff" and "/tmp/mywikidb/new_diff". I have also tried some other things like creating a symbolic link using cygwin ln which points to the original wiki directory or trying to access the wiki directory via "/cygdrive/c/...". Those things work in a command shell, but unfortunately not in the wiki script. I decided that it was all too tricky and downloaded
ftp://ftp.cs.purdue.edu/pub/RCS/rcs57pc1.zip and I am now using that diff without any problems. --
EricvanEsch
2001/11/27 I finally got diff (cygwin) to work under windows (2000). Two main mistakes I was making previously, I hope it helps troubleshooting: 1. $ENV{PATH} should be changed in the config file, not in wiki.pl (change it in both to make sure). 2. $
DataDir should not have directories with spaces. For example, I had c:/program files/apache group/apache/... etc. Everything worked fine
EXCEPT diff. You can move the data to a different dir or enter in $
DataDir the 8.3 equivalent path (not sure how to call it) c:/progra~1/apache~1/apache/... Then diff will magically work.
Diff Using CygWin? with Windows and IIS
Ensure UseDiff is set to 1 (at the top of wiki.pl)
$UseDiff = 1;
In the GetDiff? function change the following (or use the path to where you have cygwin installed)....
# $diff_out = `c:\cygwin\bin\diff $oldName $newName`;
$diff_out = `C:/cygwin/bin/diff $oldName $newName`;
This is tested working with Windows 2000, IIS5 and CygWin
? NT-5.0
Diff without CygWin?, the easy way
I stumbled on this by surprise, but all you need to do is extract the diff.exe from the unxutils zip (listed above), copy it in the same dir as where the wiki perl script is, set UseDiff to 1, and do not change the path. Leave it at "/usr/bin/" .. somehow diff.exe is found and the diff colours are nicely displayed. THAT's ALL!