SimulacreS > PmWiki > DiffAndPatchForWindows
Revisions in PmWiki uses the unix commands diff and patch, therefore revisions turn up blank running PmWiki under Windows.

Here are the solutions to this missing utility issue.

1) The WinDiff package.

Difficulty Level: 1 out of 5

See PmWiki.WinDiff.

2) Installing required utilities from gnuwin32 project.

Difficulty Level: 2 out of 5

  1. Visit http://sourceforge.net/projects/gnuwin32/
  2. Click on the two packages you will need (diffutils, and patch)
  3. Be sure to download the Win-32 .EXE and not the .ZIP (Zip doesn’t contain setup files).
  4. Install the packages
  5. Add these two lines to your config.php file:
    
    $SysDiffCmd = 'C:\\"Program Files"\\GnuWin32\\bin\\diff';
    $SysPatchCmd = 'C:\\"Program Files"\\GnuWin32\\bin\\patch --silent'; 

I found that sometimes the path name “Progrram Files” doesn’t work well, but when I copy the GnuWin32? tools to a more simple directory (include no space), e.g.: D:\\GnuWin32\\bin. Then all of these works well. —Elias Soong

Try using the path C:\\PROGRA~1\\GNUWIN32\\BIN instead. —para-dice?

3) Installing minimal cygwin environment to get utilities from.

Difficulty Level: 3 out of 5

I had some problems getting the gnuwin32 utilities to work. Installed a minimal cygwin ( http://www.cygwin.com ) with diff-utils and patch packages included, works great for me now.
 
$SysDiffCmd = 'C:\cygwin\bin\diff.exe';
$SysPatchCmd = 'C:\cygwin\bin\patch.exe --silent'; 
Ta da again! — JoNtE?

4) Running Apache + PHP + PmWiki entirely from cygwin environment.

Difficulty Level: 4 out of 5

If you run the Apache/PHP combo that comes with cygwin ( http://www.cygwin.com ), Then you don’t need to specify the $SysDiffCmd or $SysPatchCmd variables as PmWiki will function thinking it’s under a unix environment.

Don’t forget to manually select the diff-utils and patch packages when performing the cygwin install.

Note: This is not the same as using the win32 Apache install from http://httpd.apache.org/, or the win32 installer from http://www.php.net/.

Re Ta Da! —JoakimErdfelt?

my host doesnt allow system command :( Is there a diff.php command that give the same output and might be used instead ? :0) AsharVoultoiz?

Try Cookbook.PHPDiffEngine?

NilsK?

RechercheWiki:

Prêt à imprimer Changements récents RechercheWiki Index
Edition de la page Référencer Historique de la page Aide

Page mise à jour le 21/03/2004 15:34
Dernière édition par Antony Templier.