WineHQ

Patching: Difference between revisions

(Created page with "== Getting the Wine source == To get the Wine source code, you need to have Git installed on your system. From the command-line, run: {{{ git clone git://source.winehq.org/g...")
 
(the Regression Testing page has better and more complete instructions for this)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
== Getting the Wine source ==
#REDIRECT [[Regression Testing#Patching your git tree]]
 
To get the Wine source code, you need to have Git installed on your system. From the command-line, run:
 
{{{
git clone git://source.winehq.org/git/wine.git wine-git
}}}
 
For much more information about using Git with Wine, see GitWine.
 
== Patching Your Git Tree ==
Often times, developers post test patches for users to test their programs with. Though this may seem overwhelming, it's quite simple. Simply download the patch (likely from bugzilla, or possibly from e-mail) and copy it to your wine source folder (often ~/wine-git/). Then run:
 
{{{
patch -p1 < patch_name.diff
}}}
This will patch the source code. It should return something similar to this:
 
{{{
patching file programs/winecfg/Pt.rc
}}}
Once this is done, simply compile again:
 
{{{
./configure && make depend && make
}}}
And rerun your program:
 
{{{
./wine "C:\Program Files\Program Name\program.exe" }}}
See, that wasn't hard! Now if you're going to be testing any other programs, you don't want your tree cluttered with patches you were testing for another program. To reset your git tree run:
 
{{{
git checkout -f
}}}
 
This will undo any uncommitted changes in your local git tree.
 
== Reverting Patches in Git ==
If you've been the victim of a regression in wine, you probably want to revert that patch in your local build. While you can use git-revert, it's pretty messy. Instead, use git show along with some terminal voodoo:
 
{{{
git show c959867510703a100106f292cd26cb8f489236bb | patch -p1 -R
}}}
This will show the patch in question, pipe this information to the patch program, and revert it.
 
{{{
patching file programs/winecfg/Pt.rc
}}}
Once this is done, simply compile again:
 
{{{
./configure && make depend && make
}}}
And test.
 
{{{
./wine "C:\Program Files\Program Name\program.exe"
}}}
----
CategoryDevelopment

Latest revision as of 05:39, 16 November 2016

This page was last edited on 16 November 2016, at 05:39.