Patching

From WineHQ Wiki
Revision as of 20:31, 24 January 2016 by Austin987 (Talk | contribs) (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...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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/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:

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