Recent

Author Topic: Patching non-svn?  (Read 2356 times)

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Patching non-svn?
« on: May 28, 2014, 07:44:17 am »
Hi all,


is there a way of applying patch for Lazarus source code which is installed by installer?


AFAIK, applying patch require the source code downloaded via svn/git.


Help !
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Patching non-svn?
« Reply #1 on: May 28, 2014, 08:32:59 am »
winmerge http://winmerge.org/ is a decent tool you can use it supports diffs. There are a tone mering tools out there eg http://en.wikipedia.org/wiki/Comparison_of_file_comparison_tools or http://alternativeto.net/software/winmerge/ pick the one you like the most.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Re: Patching non-svn?
« Reply #2 on: May 28, 2014, 08:41:20 am »
Okay, I found a solution.


We can create a "patch" without any patch.exe required, nor requires svn installed.
I hope it would help someone who meet the same problem.




The idea is replace all files needed.
For example: I need to create a patch for 2 files in different directories:
1) \C:\lazarus\ide\formeditor.pas
2) \C:\lazarus\examples\designnonlcl\mywidgetset.pas


So, the incoming patch the files it self. (not a single file for whole replacement)
The result, in a compressed file, the content will be:

* lazarus\ide\formeditor.pas
* lazarus\examples\designnonlcl\mywidgetset.pas


Yes, it is the easiest way to simulate patch.
If a user need to review before applying patch, she may need to extract and then compare using WinMerge or any other compare program.
At least, it doesn't require the source code to be an svn-base installation.
it can be applied in any Lazarus installation such from Installer*.exe.


edit:
thanks you taazz, your post is in the same time as I submit my post.
But, our answer is not overlapped, instead improving answers each other.
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

 

TinyPortal © 2005-2018