[texworks] Patching on Windows (was: Custom shortcuts are not working)

Stefan Löffler st.loeffler at gmail.com
Wed Jun 10 07:21:09 CEST 2009


Hi,

On 2009-06-09 11:06, Alain Delmotte wrote:
> PS. ** I had to do the patch manually :-(  (for this one OK, but for
> Lua it will take more time!)
> When I try using the program patch I get:
> patching file PDFDocument.cpp
> Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354

This seems to be a common problem. Googling reveals a few pages dealing
with the issue.
On http://www.nabble.com/Applying-patches-on-Windows-td16023740.html and
http://www.edugeek.net/forums/windows/20938-patching-things-nix-style.html,
it is suggested to use the dos2unix utility (which seems to be available
e.g. from http://www.jostjahn.de/software/dos2uni.html or
http://www.bastet.com/).

>From what I gather, you must first run
dos2unix your-patch-file.diff
and then as before
patch -p0 < your-patch-file.diff

I'm not sure why the line endings are a problem, and more specifically
why they aren't the Unix ones (after all I wrote the patch on Linux),
but who cares if it works ;).

HTH
Stefan


More information about the texworks mailing list