JamesNC has asked for the wisdom of the Perl Monks concerning the following question:

I am using AS 5.8 on Win32/NT.
I was e-mailed a patch for Tk by Nick Ing-Simmons for Win32. However, I don't have any experience with actually ever installing a patch and didn't find any tutorial for applying these. Google turned up a ton of stuff (too much... ). I tried to make gnu patch using MS free .Net cl and nmake with no joy, and I grabbed PatchReader, but it doesn't look to be a method of actually installing the patch. I think it would be tremendously helpful if someone would explain how to apply a patch in a Win32 environment. (Is there a perl program that does this already? Doing a search on "Patch" and "Install" is like searching for "the" and "an" )
Thanks,
JamesNC

Replies are listed 'Best First'.
Re: How to Install Patches on Win32
by PodMaster (Abbot) on Dec 08, 2003 at 15:40 UTC
    You need the "patch" program. You can get it if you install cygwin or probably from http://gnuwin32.sf.net *.

    If you're talking about Tk-804.025_beta8.patch (the latest, available from nick's directory on cpan), this is what it says (hopefully it's self-explanatory)

    # strip everything before this # cd to your version of Tk-804.025_beta7 # and feed this file to /bin/sh # # rm -f demos/demos/images/flower2.png touch demos/demos/widget_lib/trace1.pl chmod 0444 demos/demos/widget_lib/trace1.pl touch PNG/libpng/scripts/makefile.mingw chmod 0444 PNG/libpng/scripts/makefile.mingw touch demos/demos/widget_lib/trace2.pl chmod 0444 demos/demos/widget_lib/trace2.pl touch demos/demos/widget_lib/choosedir.pl chmod 0555 demos/demos/widget_lib/choosedir.pl touch demos/demos/widget_lib/photo2.pl chmod 0444 demos/demos/widget_lib/photo2.pl patch -p1 -N <<'__END_OF_PATCH__' ...
    patch --help describes the options

    I quite often need to run ` chmod -R 0777 * ' in my Tk directory (cause I got cygwin) cause permissions get messed up (probably a bug in cygwin's tar).

    update: the gnuwin32 route is a lot less massive than cygwin

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

      Thanks for the quick reply. But, this is a patch Nick sent me in the mail, and NOT for the latest beta.
      I would like to stay away from solutions where one has to install a sizeable suite of software like Cygwin that is why I titled it Win32, perhaps I should have titled it better. Update: Thanks for the tap on the shoulder to read your post closer... the second link is EXACTLY what I needed! THANKS PodMaster!