Patching Wine Without Git

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
CFet
Level 1
Level 1
Posts: 5
Joined: Tue Aug 17, 2010 5:46 pm

Patching Wine Without Git

Post by CFet »

I'd like to patch my local copy of Wine with the patch found here:

http://bugs.winehq.org/show_bug.cgi?id=23477

I received some instruction how to do this by using:

Code: Select all

~/.wine$ sudo patch -p1 < patch.patch
However it came up with this result. Can anyone help me? I am very new to ubuntu and am trying hard to resist plunging back into windows :(.

Code: Select all

chris@chris-desktop:~/.wine$ sudo patch -p1 < patch.patch
patching file dlls/kernel32/file.c
Hunk #1 FAILED at 1001.
1 out of 1 hunk FAILED -- saving rejects to file dlls/kernel32/file.c.rej
patching file dlls/kernel32/kernel32.spec
Hunk #1 FAILED at 1028.
1 out of 1 hunk FAILED -- saving rejects to file dlls/kernel32/kernel32.spec.rej
chris@chris-desktop:~/.wine$ 
User avatar
dimesio
Moderator
Moderator
Posts: 13373
Joined: Tue Mar 25, 2008 10:30 pm

Re: Patching Wine Without Git

Post by dimesio »

CFet wrote:I'd like to patch my local copy of Wine with the patch found here:

http://bugs.winehq.org/show_bug.cgi?id=23477

Code: Select all

~/.wine$ sudo patch -p1 < patch.patch
Who told you to use sudo? That's not what you were told in the bug report you linked to. Patch the source and build Wine as a normal user. You only use sudo for make install. http://wiki.winehq.org/FAQ#head-7ed3c31 ... 53dc41817b
CFet
Level 1
Level 1
Posts: 5
Joined: Tue Aug 17, 2010 5:46 pm

Post by CFet »

Same result. I tried sudo due to a previous failure.
thomas.mullaly
Level 2
Level 2
Posts: 13
Joined: Fri Jun 25, 2010 8:42 pm

Re: Patching Wine Without Git

Post by thomas.mullaly »

CFet wrote:I'd like to patch my local copy of Wine with the patch found here:

http://bugs.winehq.org/show_bug.cgi?id=23477

I received some instruction how to do this by using:

Code: Select all

~/.wine$ sudo patch -p1 < patch.patch
However it came up with this result. Can anyone help me? I am very new to ubuntu and am trying hard to resist plunging back into windows :(.

Code: Select all

chris@chris-desktop:~/.wine$ sudo patch -p1 < patch.patch
patching file dlls/kernel32/file.c
Hunk #1 FAILED at 1001.
1 out of 1 hunk FAILED -- saving rejects to file dlls/kernel32/file.c.rej
patching file dlls/kernel32/kernel32.spec
Hunk #1 FAILED at 1028.
1 out of 1 hunk FAILED -- saving rejects to file dlls/kernel32/kernel32.spec.rej
chris@chris-desktop:~/.wine$ 
Hi CFet,

Are you trying to patch the version of Wine you got out of the Ubuntu repositories? or are you trying to patch the source code of Wine?

From the looks of it, it seems like you are trying to patch the ~/.wine directory, which contains all the DLLs that Wine uses to run Windows apps. If so this, patches can only be applied to the source code of Wine, meaning you'll have to build Wine from source.

You can download the tarball for the current release of Wine (1.3.0) and extract the code from it and then apply the patch that way. The tarball can be found here [1]. After you download and extract the tarball you can follow the instructions here [2] for applying the patch. After you apply the patch, you'll have to build Wine from source and install it in order for the patch to take affect.

Also, there's no reason to run as root until you install Wine

Hope this helps.

[1] http://ibiblio.org/pub/linux/system/emu ... .0.tar.bz2
[2] http://wiki.winehq.org/Patching
thomas.mullaly
Level 2
Level 2
Posts: 13
Joined: Fri Jun 25, 2010 8:42 pm

Re: Patching Wine Without Git

Post by thomas.mullaly »

thomas.mullaly wrote: You can download the tarball for the current release of Wine (1.3.0) and extract the code from it and then apply the patch that way. The tarball can be found here [1]. After you download and extract the tarball you can follow the instructions here [2] for applying the patch. After you apply the patch, you'll have to build Wine from source and install it in order for the patch to take affect.

Also, there's no reason to run as root until you install Wine

Hope this helps.

[1] http://ibiblio.org/pub/linux/system/emu ... .0.tar.bz2
[2] http://wiki.winehq.org/Patching
Scratch that second link I sent you, I just realized that page was for applying that patch if you are using git. Simply use the command you we're trying earlier (minus running it as root) in the source code directory of Wine.
CFet
Level 1
Level 1
Posts: 5
Joined: Tue Aug 17, 2010 5:46 pm

Post by CFet »

Thanks a bunch Thomas! Patch applied successfully :)
thomas.mullaly
Level 2
Level 2
Posts: 13
Joined: Fri Jun 25, 2010 8:42 pm

Post by thomas.mullaly »

CFet wrote:Thanks a bunch Thomas! Patch applied successfully :)
I'm glad I could help and thank you for posting back to let us know the suggestions worked for you!
Locked