¡Esta es una revisión vieja del documento!

Applying patch for windows users

PATCH: http://en.wikipedia.org/wiki/Patch_(Unix)

I have had a mix of sweet and sour experiences with this. Various methods exists and any can fail. Here are some:

  • Install tortoise to apply patch
  • Use winmerge to apply patch

With 5.1 things have gotten easier: http://forums.vtiger.com/viewtopic.php?p=101323

how do i apply a diff patch on windows
Applying a Patch File with Tortoise

Forum recommendation

The best recommendation I have heard is from Andrew (http://forums.vtiger.com/viewtopic.php?p=69258). I copy it here:

:: AndrewG
I decided to post a reply here coz I discovered one simple thing that can be useful for someone wanted to patch vtigerCRM for TTTimecards.
I had many troubles to do this coz I do not have access to shell on my virtual server account. I'm also running Windows XP.
The idea is simple, all you need to do is to download Ubuntu Live CD.
You won't even have to install it on HDD.
The steps are as follow.

  1. Unzip vtigerCRM to vtiger folder.
  2. Unzip TTTimecards to the same vtiger folder
  3. Boot up from Ubuntu live CD
  4. copy vtiger folder to ubuntu Desktop - its' not necessary, but will make all procedure easier
  5. go to console and execute:
    sudo apt-get install patch

    this command will install missing patch program

  6. cd Desktop
  7. cd vtiger
  8. patch -p 0 < modules/HelpDesk/TTTimeCards.diff
  9. now you can copy vtiger folder from ubuntu Desktop back to your HDD
  10. go back to Windows, copy to ftp server and install vtigerCRM
  11. execute config_timecards.php script with

Hope someone will find it useful

Thank you very much Andrew.

Forum recommendation

Another good method on the forum from Chris (cwallace) (http://forum.vtiger.com/viewtopic.php?p=153635):

I found a fairly easy and straight forward method to install the patch on Windows(tested on XP).

Download Gnu Patch.exe for WIndows from the following URL: http://gnuwin32.sourceforge.net/packages/patch.htm
NOTE: You should be able to use the binary file zip. Drop the .exe in a folder that is included in the %PATH% environment variable.(echo %PATH%)

Now, before we can use this patch command we must convert the .diff file to DOS line terminators as the Win32 Patch command is expecting.

Download the dos2unix DOS 32 bit version zip file from the following URL: http://waterlan.home.xs4all.nl/dos2unix.html

You'll need the unix2dos.exe file. Extract it to the same location as patch.exe.

Now for the fun part. Run the following commands
unix2dos {path to modules\timecontrol\}timecontrol.diff
patch -p 0 < {path to modules\timecontrol\}timecontrol.diff

Hope this helps. Seemed to work fine on my setup. I'm running the vtiger binaries on a home brewed WAMP server.