Patching Wine 1.0-rc1 with 3dmark.diff

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
csocean
Level 2
Level 2
Posts: 10
Joined: Fri May 16, 2008 4:36 am

Patching Wine 1.0-rc1 with 3dmark.diff

Post by csocean »

Hey guys,

I'm a new Ubuntu convert (installed through Wubi, and am blown away!)

I'd love to get wine working so I play games etc, but I've got a lot of learning to do when it comes to installing and getting things working.

So, I want to use the 1.0-rc1 version of wine, but CoD4 requires the 3dmark.diff patch.

This is what I think I need to be doing:
with the 3dmark.diff file (from http://bugs.winehq.org/attachment.cgi?id=8548) in the extracted wine-1.0-rc1 directory (from http://prdownloads.sourceforge.net/wine ... c1.tar.bz2)

Code: Select all

patch -p1 < 3dmark.diff
However, I'm getting an error:

Code: Select all

patching file dlls/wined3d/directx.c
Hunk #1 succeeded at 846 (offset 172 lines).
Hunk #2 FAILED at 2044.
Hunk #3 FAILED at 2361.
Hunk #4 FAILED at 2423.
3 out of 4 hunks FAILED -- saving rejects to file dlls/wined3d/directx.c.rej
following which I can't run ./configure

Am I doing the right thing?! Could someone point me in the right direction? Thanks :)
Last edited by csocean on Fri May 16, 2008 5:05 am, edited 1 time in total.
Marcel W. Wysocki

Patching Wine 1.0-rc1 with 3dmark.diff

Post by Marcel W. Wysocki »

On Fri, 16 May 2008 04:45:52 -0500
"csocean" <[email protected]> wrote:
However, I'm getting an error:

Code: Select all

patching file dlls/wined3d/directx.c
Hunk #1 succeeded at 846 (offset 172 lines).
Hunk #2 FAILED at 2044.
Hunk #3 FAILED at 2361.
Hunk #4 FAILED at 2423.
3 out of 4 hunks FAILED -- saving rejects to file dlls/wined3d/directx.c.rej
[code]

following which I can't run ./configure

Am I doing the right thing?!  Could someone point me in the right direction?  Thanks :)
you are doing it right, but it seems this patch is for another wine version, the file dlls/wined3d/directx.c has changed since then
and so the patch does not work correctly.

if you have a bit of c knowledge you could probably take a look at what the patch file is placing where.

perhaps the changes in the patch are already in the latest wine version

you should check if cod4 runs w/o the patch

--
Marcel W. Wysocki <[email protected]>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-us ... chment.pgp
Zoltan Boszormenyi

Patching Wine 1.0-rc1 with 3dmark.diff

Post by Zoltan Boszormenyi »

Hi,

csocean írta:
Hey guys,

I'm a new Ubuntu convert (installed through Wubi, and am blown away!)

I'd love to get wine working so I play games etc, but I've got a lot of learning to do when it comes to installing and getting things working.

So, I want to use the 1.0-rc1 version of wine, but CoD4 requires the 3dmark.diff patch.

This is what I think I need to be doing:
with the 3dmark.diff file (from http://bugs.winehq.org/attachment.cgi?id=8548) in the extracted wine-1.0-rc1 directory (from http://prdownloads.sourceforge.net/wine ... c1.tar.bz2)

Code:

patch -p1 < 3dmark.diff
The Wine code since that patch was rearranged a bit.
I tried to refresh the patch for 1.0-rc1, semantically it should be the
same.
Let us know how it works.
However, I'm getting an error:

Code: Select all

patching file dlls/wined3d/directx.c
Hunk #1 succeeded at 846 (offset 172 lines).
Hunk #2 FAILED at 2044.
Hunk #3 FAILED at 2361.
Hunk #4 FAILED at 2423.
3 out of 4 hunks FAILED -- saving rejects to file dlls/wined3d/directx.c.rej
[code]

following which I can't run ./configure

[/quote]
Can you run ./configure without any patch?

[quote]Am I doing the right thing?!  Could someone point me in the right direction?  Thanks :)





-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-3dmark-1.0-rc1.diff
Type: text/x-diff
Size: 2644 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-us ... hment.diff
csocean
Level 2
Level 2
Posts: 10
Joined: Fri May 16, 2008 4:36 am

Post by csocean »

ah I see! That helps a lot! :oops:

I'm not familiar enough with C, or the manner in which the patch works to delve into that just yet.

Wine & WoW work fine without the patch, however CoD4 returns an error about my graphics card not being able to handle enough textures - I'm running an 8800gtx with the 169.12 drivers, and I've updated directx in wine (or at least the installer ran without a glitch, does that count as success, or is there more to it?)
Can you run ./configure without any patch?
Unfortunately, I'm now at work, but I'll check as soon as I get in.
csocean
Level 2
Level 2
Posts: 10
Joined: Fri May 16, 2008 4:36 am

Post by csocean »

The Wine code since that patch was rearranged a bit.
I tried to refresh the patch for 1.0-rc1, semantically it should be the
same.
Where can I get this refreshed patch from?
Marcel W. Wysocki

Patching Wine 1.0-rc1 with 3dmark.diff

Post by Marcel W. Wysocki »

On Fri, 16 May 2008 05:04:06 -0500
"csocean" <[email protected]> wrote:
ah I see! That helps a lot! [Embarassed]

I'm not familiar enough with C, or the manner in which the patch works to delve into that just yet.

Wine & WoW work fine without the patch, however CoD4 returns an error about my graphics card not being able to handle enough textures - I'm running an 8800gtx with the 169.12 drivers, and I've updated directx in wine (or at least the installer ran without a glitch, does that count as success, or is there more to it?)
you should not install directx in wine, wine comes with its own directx
installing directx in wine is not supported.


--
Marcel W. Wysocki <[email protected]>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-us ... chment.pgp
Zoltan Boszormenyi

Patching Wine 1.0-rc1 with 3dmark.diff

Post by Zoltan Boszormenyi »

csocean írta:
The Wine code since that patch was rearranged a bit.
I tried to refresh the patch for 1.0-rc1, semantically it should be the
same.
Where can I get this refreshed patch from?
From my previous mail, it was an attachment. :-)
Hm. The list deleted my attachment? Strange.
Contact me in private, I'll send it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-3dmark-1.0-rc1.diff
Type: text/x-diff
Size: 2644 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-us ... hment.diff
csocean
Level 2
Level 2
Posts: 10
Joined: Fri May 16, 2008 4:36 am

Post by csocean »

OK, I'll start again with a fresh wine installation then. I may use a previous version of wine for which the patch works, see if that helps with CoD4. I'll post back with the results later.
Zoltan Boszormenyi

Patching Wine 1.0-rc1 with 3dmark.diff

Post by Zoltan Boszormenyi »

csocean írta:
OK, I'll start again with a fresh wine installation then. I may use a previous version of wine for which the patch works, see if that helps with CoD4. I'll post back with the results later
My attachment was not deleted, it was converted into a link both times I
sent.
If you read the mailing list via the forum, please look at the end of my
messages.
They look like this:

==============================================

-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-3dmark-1.0-rc1.diff
Type: text/x-diff
Size: 2644 bytes
Desc: not available
Url :
http://www.winehq.org/pipermail/wine-us ... hment.diff

==============================================


Click on the link and save the file somewhere.
csocean
Level 2
Level 2
Posts: 10
Joined: Fri May 16, 2008 4:36 am

Post by csocean »

thanks Zoltan, your patch applied flawlessly.

However, I can't run ./configure successfully now... I get:

Code: Select all

sudo ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking whether make sets $(MAKE)... yes
checking for gcc... gcc -m32
checking for C compiler default output file name... 
configure: error: C compiler cannot create executables
See `config.log' for more details.
I ran checkinstall after that, and noticed that the achitecture is set to AMD64, though I have a intel e6750, which is 64 bit, but I *think* I'm running 32bit Ubuntu (wubi didn't mention anything.)

Code: Select all

checkinstall

checkinstall 1.6.1, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran
           This software is released under the GNU GPL.


The package documentation directory ./doc-pak does not exist. 
Should I create a default set of package docs?  [y]: n

*****************************************
**** Debian package creation selected ***
*****************************************

This package will be built according to these values: 

0 -  Maintainer: [ csocean@csocean-desktop ]
1 -  Summary: [ Package created with checkinstall 1.6.1 ]
2 -  Name:    [ wine-1.0 ]
3 -  Version: [ rc1 ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ amd64 ]
8 -  Source location: [ wine-1.0-rc1 ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]

Enter a number to change any of them or press ENTER to continue: 

Installing with make install...

========================= Installation results ===========================
make: *** No rule to make target `install'. Stop.

****  Installation failed. Aborting package creation.

Cleaning up...OK

Bye.

Really appreciate the help guys![/quote]
austin987
Wine Developer
Wine Developer
Posts: 2383
Joined: Fri Feb 22, 2008 8:19 pm

Patching Wine 1.0-rc1 with 3dmark.diff

Post by austin987 »

On Fri, May 16, 2008 at 11:40 AM, csocean <[email protected]> wrote:
thanks Zoltan, your patch applied flawlessly.

However, I can't run ./configure successfully now... I get:


Code:

sudo ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking whether make sets $(MAKE)... yes
checking for gcc... gcc -m32
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.




I ran checkinstall after that, and noticed that the achitecture is set to AMD64, though I have a intel e6750, which is 64 bit, but I *think* I'm running 32bit Ubuntu (wubi didn't mention anything.)
$ wget kegel.com/wine/hardy.sh
$ sh hardy.sh
User avatar
DanKegel
Moderator
Moderator
Posts: 1164
Joined: Wed May 14, 2008 11:44 am

Patching Wine 1.0-rc1 with 3dmark.diff

Post by DanKegel »

On Fri, May 16, 2008 at 9:40 AM, csocean <[email protected]> wrote:
sudo ./configure
First off, NEVER BUILD SOFTWARE AS ROOT!

Sheesh. Now you have to chown the source tree contents back to a normal user.
checking build system type... x86_64-unknown-linux-gnu
You're running 64 bit Ubuntu. That makes things harder to build.
If WUBI is doing this to people by default, it should be shot.
- Dan
csocean
Level 2
Level 2
Posts: 10
Joined: Fri May 16, 2008 4:36 am

Re: Patching Wine 1.0-rc1 with 3dmark.diff

Post by csocean »

austin987 wrote:On Fri, May 16, 2008 at 11:40 AM
$ wget kegel.com/wine/hardy.sh
$ sh hardy.sh
well, that installed a lot of stuff, and I've not a clue what it was! Am I too trusting? :wink: but regardless, it didn't help :(
User avatar
DanKegel
Moderator
Moderator
Posts: 1164
Joined: Wed May 14, 2008 11:44 am

Patching Wine 1.0-rc1 with 3dmark.diff

Post by DanKegel »

On Fri, May 16, 2008 at 10:07 AM, csocean <[email protected]> wrote:
On Fri, May 16, 2008 at 11:40 AM
$ wget kegel.com/wine/hardy.sh
$ sh hardy.sh
well, that installed a lot of stuff, and I've not a clue what it was! Am I too trusting? [Wink] but regardless, it didn't help :(
As I said, you're running 64 bit linux. Building Wine is painful there, see
http://wiki.winehq.org/WineOn64bit

Better perhaps to switch to 32 bit linux. But you can try the
instructions above if you like.
csocean
Level 2
Level 2
Posts: 10
Joined: Fri May 16, 2008 4:36 am

Re: Patching Wine 1.0-rc1 with 3dmark.diff

Post by csocean »

Ah, you got a second post in while I was writing!! ;-)
DanKegel wrote:On Fri, May 16, 2008 at 9:40 AM
You're running 64 bit Ubuntu. That makes things harder to build.
If WUBI is doing this to people by default, it should be shot.
- Dan
Well, consider wubi shot then, I'm off back to Vista (which I actually really liked until I installed wubi and saw how good ubuntu is!) to get the 32bit ubuntu package and partition/install... hopefully I'll post back later full of cheer :)

Thanks for all the help again! :-)
csocean
Level 2
Level 2
Posts: 10
Joined: Fri May 16, 2008 4:36 am

Post by csocean »

Well, I'm now on 32bit, but not got time to mess about with wine at the moment. The release version is installed through the synaptic package manager - that'll have to do for now. I'll keep windoze installed for gaming.
csocean
Level 2
Level 2
Posts: 10
Joined: Fri May 16, 2008 4:36 am

Post by csocean »

OK, one step further...!

I've tried this with 0.9.56 and have exactly the same trouble as with 1.0, so it's me that's making the mistakes!
"./configure" and "make depend && make" work no problem, however, on running

Code: Select all

sudo checkinstall
I get the following:

Code: Select all

Installing with make install...

========================= Installation results ===========================
make[1]: Entering directory `/home/csocean/wine/wine-1.0-rc1/tools'
make[1]: `makedep' is up to date.
make[1]: Leaving directory `/home/csocean/wine/wine-1.0-rc1/tools'
make[1]: Entering directory `/home/csocean/wine/wine-1.0-rc1/libs'
make[2]: Entering directory `/home/csocean/wine/wine-1.0-rc1/libs/port'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/csocean/wine/wine-1.0-rc1/libs/port'
make[2]: Entering directory `/home/csocean/wine/wine-1.0-rc1/libs/wine'
gcc -c -I. -I. -I../../include -I../../include  -D__WINESRC__ -DWINE_UNICODE_API="" -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith  -g -O2  -o config.o ./config.c -DBINDIR='"/usr/bin"' -DDLLDIR='"/usr/lib/wine"' -DLIB_TO_BINDIR=\"`../../tools/relpath /usr/lib /usr/bin`\" -DLIB_TO_DLLDIR=\"`../../tools/relpath /usr/lib /usr/lib/wine`\" -DBIN_TO_DLLDIR=\"`../../tools/relpath /usr/bin /usr/lib/wine`\" -DLIB_TO_DATADIR=\"`../../tools/relpath /usr/lib /usr/share/wine`\" -DBIN_TO_DATADIR=\"`../../tools/relpath /usr/bin /usr/share/wine`\"
(GIT_DIR=../../.git git describe HEAD 2>/dev/null || echo "wine-1.0-rc1") | sed -n -e '$s/\(.*\)/const char wine_build[] = "\1";/p' >version-stamp || (rm -f version-stamp && exit 1)
gcc -shared -Wl,-soname,libwine.so.1 -Wl,--version-script=./wine.map casemap.o collation.o compose.o config.o cptable.o debug.o fold.o ldt.o loader.o mbtowc.o mmap.o port.o sortkey.o string.o utf8.o wctomb.o wctype.o c_037.o c_424.o c_437.o c_500.o c_737.o c_775.o c_850.o c_852.o c_855.o c_856.o c_857.o c_860.o c_861.o c_862.o c_863.o c_864.o c_865.o c_866.o c_869.o c_874.o c_875.o c_878.o c_932.o c_936.o c_949.o c_950.o c_1006.o c_1026.o c_1250.o c_1251.o c_1252.o c_1253.o c_1254.o c_1255.o c_1256.o c_1257.o c_1258.o c_1361.o c_10000.o c_10006.o c_10007.o c_10029.o c_10079.o c_10081.o c_20127.o c_20866.o c_20932.o c_21866.o c_28591.o c_28592.o c_28593.o c_28594.o c_28595.o c_28596.o c_28597.o c_28598.o c_28599.o c_28600.o c_28603.o c_28604.o c_28605.o c_28606.o    version.o ../../libs/port/libwine_port.a -ldl    -o libwine.so.1.0
rm -f libwine.so.1 && ln -s libwine.so.1.0 libwine.so.1
rm -f libwine.so && ln -s libwine.so.1 libwine.so
make[2]: Leaving directory `/home/csocean/wine/wine-1.0-rc1/libs/wine'
make[2]: Entering directory `/home/csocean/wine/wine-1.0-rc1/libs/wpp'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/csocean/wine/wine-1.0-rc1/libs/wpp'
make[1]: Leaving directory `/home/csocean/wine/wine-1.0-rc1/libs'
make[1]: Entering directory `/home/csocean/wine/wine-1.0-rc1/tools'
make[2]: Entering directory `/home/csocean/wine/wine-1.0-rc1/tools/widl'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/csocean/wine/wine-1.0-rc1/tools/widl'
make[2]: Entering directory `/home/csocean/wine/wine-1.0-rc1/tools/winebuild'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/csocean/wine/wine-1.0-rc1/tools/winebuild'
make[2]: Entering directory `/home/csocean/wine/wine-1.0-rc1/tools/winedump'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/csocean/wine/wine-1.0-rc1/tools/winedump'
make[2]: Entering directory `/home/csocean/wine/wine-1.0-rc1/tools/winegcc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/csocean/wine/wine-1.0-rc1/tools/winegcc'
make[2]: Entering directory `/home/csocean/wine/wine-1.0-rc1/tools/wmc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/csocean/wine/wine-1.0-rc1/tools/wmc'
make[2]: Entering directory `/home/csocean/wine/wine-1.0-rc1/tools/wrc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/csocean/wine/wine-1.0-rc1/tools/wrc'
make[1]: Leaving directory `/home/csocean/wine/wine-1.0-rc1/tools'
make[1]: Entering directory `/home/csocean/wine/wine-1.0-rc1/include'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/csocean/wine/wine-1.0-rc1/include'
make[1]: Entering directory `/home/csocean/wine/wine-1.0-rc1/include'
../tools/mkinstalldirs -m 755 /usr/include/wine/msvcrt/sys
mkdir /usr/include/wine/msvcrt/sys
chmod 755 /usr/include/wine/msvcrt/sys
chmod: changing permissions of `/usr/include/wine/msvcrt/sys': No such file or directory
make[1]: *** [/usr/include/wine/msvcrt/sys] Error 1
make[1]: Leaving directory `/home/csocean/wine/wine-1.0-rc1/include'
make: *** [include/__install__] Error 2

****  Installation failed. Aborting package creation.

Cleaning up...OK

Bye.
any idea what I'm doing wrong here?! It seems to be something to do with permissions, but I can't grant them...
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

csocean wrote:OK, one step further...!

I've tried this with 0.9.56 and have exactly the same trouble as with 1.0, so it's me that's making the mistakes!
"./configure" and "make depend && make" work no problem, however, on running

Code: Select all

sudo checkinstall
Should be

Code: Select all

sudo make install
csocean
Level 2
Level 2
Posts: 10
Joined: Fri May 16, 2008 4:36 am

Post by csocean »

It worked!! It all works! Thanks for your help everyone, it was much appreciated. Call of Duty 4 now runs a charm :) It's amazing how helpful the community has been to a newcomer in confusion.

I've compiled what I did below, so if anyone follows and wants to patch, compile, and install wine 1.0rc1 on Hardy then follow my "For noobs by noob" guide below, entering one line at a time:

I used a lot of information on the web, and from this post. Thanks in particular to Zoltan for the new patch, kegel.com for his dependency list, and pointing out that I was in 64bit linux (incidentally, this is for 32bit), Vitamin for his tip on making the install file, and google for figuring out how to install it!

The basic structure of how to do it was shamelessly pinched from:
http://www.fsckin.com/2008/02/21/how-to ... -in-linux/

and the no-cd crack from http://www.gamecopyworld.com

Without the above I'd never have gotten anywhere, so thanks again!

Ok, so first off, remove any previous wine installation - if you're like me, that means through the synaptic package manager.

next, make a folder from which you're going to be working, so in the terminal:

Code: Select all

md wine
cd wine
Now, download and extract the wine RC1 package:

Code: Select all

 
wget http://ibiblio.org/pub/linux/system/emulators/wine/wine-1.0-rc1.tar.bz2
tar -xvjf wine-1.0-rc1.tar.bz2
Now you need to install Kegal's list of dev libraries (Thanks!)

Code: Select all

$ wget kegel.com/wine/hardy.sh
$ sh hardy.sh

Next, download the patch (supplied originally from 3dmark, and edited to fit 1.0rc1 by Zoltan Boszormenyi - thanks!) and save it to the folder wine was extracted to - /wine/wine-1.0-rc1

To apply the patch (assuming you called the saved file "attachment.diff":

Code: Select all

patch -p1 < attachment.diff
Next, cofigure, and make the install file - this can take a while (~15-20)mins:

Code: Select all

./configure --prefix=/usr --sysconfdir=/etc --enable-opengl --with-x
make depend && make
sudo make install
next, install wine (easy eh?!)

Code: Select all

dpkg -i wine-1.0-rc1.deb
remember, before you can use wine, you need to run the config once:

Code: Select all

winecfg
also, you need to add the directx files to it, by going to the "Libraries" tab and adding "d3dx9_37" I added it as "builtin", but also added 35 and 36 as "native, builtin", and also d3d10 as "buitin, native" but I've no idea if these contributed to my success, or if they're superfluous.

Now, download the nocd crack and apply as usual, then run!

Code: Select all

wine "c:\program files\activision\call of duty 4 - modernwarfare\iw3sp.exe"
Enjoy!
Locked