LinuxQuestions.org
Social Bookmarking all things Linux and Open Source
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Software > Linux - Games
User Name
Password
Linux - Games This forum is for all discussion relating to gaming in Linux.

Notices

Reply
 
Thread Tools
Old 12-07-2007, 09:02 PM   #31
mbrocketry
LQ Newbie
 
Registered: Aug 2005
Location: Centennial, CO
Distribution: Fedora
Posts: 14
Thanked: 0

[Log in to get rid of this advertisement]
I am having trouble running the patch. I renamed it from attachment.cgi to CODpatch. I am using fedora 8 and I am running the patch with:
[HTML]
# patch -p1 < /home/user/CODpatch[/HTML]

(path and file name)
and I get:

[HTML]can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Naur wine.old/dlls/wined3d/directx.c wine/dlls/wined3d/directx.c
|--- wine.old/dlls/wined3d/directx.c 2007-06-27 16:12:55.000000000 +0200
|+++ wine/dlls/wined3d/directx.c 2007-07-03 23:33:08.000000000 +0200
--------------------------[/HTML]


Then it asks which file to patch and then I get:

[HTML]File to patch: /home/user/CODpatch
patching file /home/user/CODpatch
Hunk #1 FAILED at 674.
Hunk #2 FAILED at 1872.
Hunk #3 FAILED at 2189.
Hunk #4 FAILED at 2251.
4 out of 4 hunks FAILED -- saving rejects to file /home/user/CODpatch.rej[/HTML]

Any Ideas?
mbrocketry is offline     Reply With Quote
Old 12-08-2007, 11:47 AM   #32
snares
Member
 
Registered: Mar 2006
Distribution: Ubuntu Gusty Gibbon
Posts: 107
Thanked: 0
are you running this patch from within the Wine directory.(i.e: if you downloaded the Git version on wine it creates wine-git. you would:
cd wine-git
patch -p1 < /home/user/CODpatch
when i first did the patch I didn't run it from the wine directory and got the same error you recieved
hope this is your solution
snares is offline     Reply With Quote
Old 12-09-2007, 05:57 PM   #33
mbrocketry
LQ Newbie
 
Registered: Aug 2005
Location: Centennial, CO
Distribution: Fedora
Posts: 14
Thanked: 0
Well I have tried the .wine directory in my home folder and it did not work and I also found a wine folder in /usr/share/wine, but it did not work there either. I get the same error in both folders as before.

Any other ideas.
mbrocketry is offline     Reply With Quote
Old 12-10-2007, 08:39 AM   #34
snares
Member
 
Registered: Mar 2006
Distribution: Ubuntu Gusty Gibbon
Posts: 107
Thanked: 0
You need to apply the patch before you compile the wine program. First you need to get the Git-Wine, CVS Wine, or the Wine from Source. Then go to that directory apply the patch and then configure, make & make depend, and make install. The CVS and Git versions of Wine have an install script you use. Not sure about the source version. You you do download the source version you will need to extract it first before applying the patch. Git Wine and CVS Wine will require that you have git or cvs install respectively. If you don't you won't be able to download those versions. Let me know if you have any other issues.
snares is offline     Reply With Quote
Old 12-10-2007, 08:49 AM   #35
mbrocketry
LQ Newbie
 
Registered: Aug 2005
Location: Centennial, CO
Distribution: Fedora
Posts: 14
Thanked: 0
awh...I installed wine from livna repo so it was already compiled. Guess I will have to try the old fashion way.

Thanks.
mbrocketry is offline     Reply With Quote
Old 12-12-2007, 02:58 PM   #36
JBailey742
Member
 
Registered: Mar 2006
Location: Saint Louis Park, MN
Distribution: Mandriva 2007.1 Spring
Posts: 349
Thanked: 0
I'm screwed. I need to know about this patch stuff, in a fairly simple language. that website confused me. still a newbie in areas.
JBailey742 is offline     Reply With Quote
Old 12-18-2007, 08:05 AM   #37
mbrocketry
LQ Newbie
 
Registered: Aug 2005
Location: Centennial, CO
Distribution: Fedora
Posts: 14
Thanked: 0
So I uninstalled the wine repo and installed git (via yum install git) and used it to install wine as per the instruction on the wine HQ pages. Then I was able to run the patch and build wine to the Kernel. Once I did that I got directX 9c loaded as per the article and I was able to start loading COD4. It does not get very far and it stops giving me a 1628 error.

Anyone else had this issue and how did you get passed it?

Last edited by mbrocketry; 12-18-2007 at 10:40 PM..
mbrocketry is offline     Reply With Quote
Old 12-29-2007, 12:07 PM   #38
snares
Member
 
Registered: Mar 2006
Distribution: Ubuntu Gusty Gibbon
Posts: 107
Thanked: 0
Wink

I just got COD4 and I decided to write a clearer tutorial since many eople are having trouble with the linux-gamers one. I have Kubuntu (7.10) so this tutorial will be geared toward that distro but you shouldn't have any problem adapting it to you distro.

1)Install patch, git, and git-core

sudo apt-get install patch git git-core

2)Download the latest version of it wine (takes a bit)

git clone git://source.winehq.org/git/wine.git wine-git

3)While that's going you can download mscoree.dll and streamci.dll,(Needed to get from Windows install) dll-files.com, the latest version on DirectX 9c, the patch from http://www.linux-gamers.net/modules/wiwimod/index.php?page=HOWTO+COD4(you'll need to right-click "Save As.." put in whatever you feel like. I used cod_patch.diff and needs to be in the wine-git file.) as well as going to http://wiki.winehq.org/Recommended_Packages and finding the recommended packages you should get. From gutsy there's a script it makes things really easy.

4)Once git is done cd wine-git. (This folder should have been created by the download process). You should have the patch from linux-gamers HowTo in the same folder so patch wine with

patch -p1 < name_of_patch

for me I'd use

patch -p1 < cod_patch.diff

that will run should have 4 "Hunks". Now install recommended packages. For ubuntu users just run the script. If you don't install various packages you'll run into errors with wine. Not sure on the min packaged you need(think flex, bison, and X11-dev) but just install the ones at http://wiki.winehq.org/Recommended_Packages just to play it safe. Hey what's the worst that can happen wine runs better? Once those are installed you'll need to compile and install wine pending errors the steps are as follows:

./configure

make depend && make

sudo make install <<need to be root

5)Install DirectX 9C. I followed this tutorial but basically just run winecfg, configure it, and put the mscoree.dll and streamci.dll into the ~/.wine/drive_c/system32 folder. Then set d3d8=builtin and copy/paste this:

"d3d9"="builtin"
"d3dim"="native"
"d3drm"="native"
"d3dx8"="native"
"d3dxof"="native"
"dciman32"="native"
"ddrawex"="native"
"devenum"="native"
"dinput"="builtin"
"dinput8"="builtin"
"dmband"="native"
"dmcompos"="native"
"dmime"="native"
"dmloader"="native"
"dmscript"="native"
"dmstyle"="native"
"dmsynth"="native"
"dmusic"="native"
"dmusic32"="native"
"dnsapi"="native"
"dplay"="native"
"dplayx"="native"
"dpnaddr"="native"
"dpnet"="native"
"dpnhpast"="native"
"dpnlobby"="native"
"dsound"="builtin"
"dswave"="native"
"dxdiagn"="native"
"mscoree"="native"
"msdmo"="native"
"qcap"="native"
"quartz"="native"
"streamci"="native"

under it. And run DirectX exe and extract files to folder of you choice. Mine was /home/snares/DirectX. Then cd to that folder and run DXSETUP.EXE.

cd ~/DirectX

wine DXSETUP.exe

it will run installing DirectX 9c. The only file I had trouble with was ddrawe.dll. Again go to dll-file and get the files you need. You can run dxdiag.exe to find which ones you need.

cd ~/.wine/drive_c/windows/system32/

wine dxdiag.exe

the "directx files" tab will tell you if you got all the dlls.

Now to install the game!

6)If you run it from the CD you will get an error. Or at least I did something like Error 1628 well to get around this all I did was create Activision folder in ~/.wine/Program Files and then Call of Duty 4 - Modern Warfare inside that. Then just copy/paste the files in the Data file on the COD4 CD in that file.(on the CD the file is in the Setup Folder. Once that is done run COD4.

7)Once in the game go into the options and shutoff the Field Depth and Soften Smoke Edges. That will get rid of any display problems.

Took me about two hours but I go ti installed. It runs fairly well. Some parts slow down but hey it's got great graphics and is running on a non-native system. What do you expect.

I rushed through this so if you need anything explained let me know. I'll update the tutorial.

cheers
snares is offline     Reply With Quote
Old 12-29-2007, 12:48 PM   #39
mbrocketry
LQ Newbie
 
Registered: Aug 2005
Location: Centennial, CO
Distribution: Fedora
Posts: 14
Thanked: 0
Thanks Snares, great write up. I will try this later this weekend.
mbrocketry is offline     Reply With Quote
Old 12-29-2007, 01:52 PM   #40
jimmy512
Member
 
Registered: Oct 2006
Location: London
Distribution: Arch
Posts: 183
Thanked: 0
Thanks for the tutorial snares. I used it with my gentoo installaton, but it took a little tinkering. For the benefit of those running gentoo, this is how to download and compile in a portage friendly way (hope this helps):

We dont need git, as we will be using the version from the portage tree. However, you can emerge git if it makes you happy (as root):
Code:
emerge -pv git - to see what is going to be compiled
emerge -av git - to compile it
Now we want to compile wine...
It would be very wise to enable oss and other nice things in wine, in case you need them later, so run (as root):
Code:
echo "app-emulation/wine dbus jpeg opengl oss scanner xml" >> /etc/portage/package.use
If you want the latest (unstable) version of wine (for some reason) (as root):
Code:
echo "app-emulation/wine ~x86" >> /etc/portage/package.keywords
Now, check what is going to be emerged. This is important - you will need to know the version of wine you are going to be building, and the ebuild file that corresponds to this.
Code:
emerge -pv wine
Before we merge wine, we need to patch it, which involves a little portage trickery.
First, download your patch. The link below is to the LinuxGamers Tutorial, the link below that is to the patch:
Tutorial: http://www.linux-gamers.net/modules/...DEX+Wine+Games
Patch: http://bugs.winehq.org/attachment.cgi?id=8548
Download the patch (right click -> save as), name it as something useful or recognisable eg wine_directx_patch.patch
Now, copy the patch into your portage tree (as root):
Code:
cp /path/to/patch/wine_directx_patch.patch /usr/portage/app-emulation/wine/files/
Now we need to edit the ebuild. To make this easier, change directory into the folder where the ebuilds are:
Code:
cd /usr/portage/app-emulation/wine/
Now edit it using your favorite editor - I used nano. (as root):
Code:
nano -w wine-0.9.51.ebuild
IMPORTANT: Make sure you edit the ebuild of the package you are compiling! If you are not sure, run emerge -pv wine and check first!
Look through the ebuild, and locate the section "src_unpack" (if you are using nano, you can press ctrl+w to search).
At the end of this section add the line:
Code:
epatch "${FILESDIR}"/wine_directx_patch.patch
Then exit nano (ctrl+x), making sure you save changes, and run (as root)
Code:
ebuild wine-0.9.51.ebuild digest
IMPORTANT: Make sure you are ebuilding the ebuild for the correct package!
Now you can emerge wine (as root):
Code:
emerge -av wine
This one might take a while, so grab yourself some coffee, and download the directx 9.0c file posted in snares tutorial above.
Now you should follow the rest of snares tutorial, step five and beyond (this is where the ideas behind most of this stuff came from - thanks).
You can also install the wine reccomended packages (and take a look on the gentoo page).

Also worth reading:
http://www.linux-gamers.net/modules/...DEX+Wine+Games
Read the linux-gamers tutorial. It has valuable information in it.

http://bugs.winehq.org/attachment.cgi?id=8548
Take a quick look at the patch, even if you cant program. You may find it interesting to see what it is doing.

http://www.fallennights.net/tech/wine/eve-online.shtml
Has a quick section on how to play with the portage tree and ebuilds, which was relevant to this.

Of course, read snares tutorial too - it explains what is going on.

This compiles fine on my computer. Now just got to install directx and cod4
jimmy512 is offline     Reply With Quote
Old 12-29-2007, 04:01 PM   #41
snares
Member
 
Registered: Mar 2006
Distribution: Ubuntu Gusty Gibbon
Posts: 107
Thanked: 0
Just an update. I was doing some more tinkering with the COD4 installation to see if I could limit the steps a bit. It seems to me that the Error 1628 is related to DirectX 9c. Once I got that installed the COD4 install perfect. I'd recommend going through the installer to ensure it install properly.

mbrocketry you should follow the blog I found on installing DX9. If you still run into the error post it. You can always install the other way I mentioned above.

**Forgot to mention to install COD4 from CD you need to winecfg and change the Windows Version to WinXP. Most of you probally would figure that out but thought I mention it.

***Just tested MultiPlayer. Works just as well. You'll need to go on servers without PunkerBuster though. That's minor though. COD 4 1.4 Patch installed without a hitch.

Last edited by snares; 12-29-2007 at 08:39 PM..
snares is offline     Reply With Quote
Old 12-29-2007, 10:27 PM   #42
mbrocketry
LQ Newbie
 
Registered: Aug 2005
Location: Centennial, CO
Distribution: Fedora
Posts: 14
Thanked: 0
Ok here is my Fedora 8 install of wine-git. First I uninstalled wine and all wine tools via yumex. Next I installed git

[HTML]sudo yum install git[/HTML]

Then I installed wine-git
[HTML]git clone git://source.winehq.org/git/wine.git wine-git[/HTML]

Then I got the patch from the linux-gamers COD4 how to and saved it in the wine-git directory as cod4patch. Then I applied the patch:

[HTML]patch -p1 < cod4patch[/HTML] I saw 4 hunks with no errors.

Next I ran ./configure from the wine-get directory. I got two errors. OpenGL and FontForge where missing so I had to install those to complete the ./configure without any errors.

[HTML]./configure[/HTML] as root. Once that finished I ran:
[HTML]make depend && make[/HTML] again as root then I ran:
[HTML]make install[/HTML]

So once the make install was complete I ran
[HTML]winecfg[/HTML]Then finished following the instructions that Snares put up.

Last edited by mbrocketry; 12-30-2007 at 07:56 AM..
mbrocketry is offline     Reply With Quote
Old 12-29-2007, 11:09 PM   #43
snares
Member
 
Registered: Mar 2006
Distribution: Ubuntu Gusty Gibbon
Posts: 107
Thanked: 0
your supposed to install as root.

check this http://www.winehq.org/pipermail/wine...ly/027437.html

Last edited by snares; 12-29-2007 at 11:11 PM..
snares is offline     Reply With Quote
Old 12-30-2007, 08:25 AM   #44
mbrocketry
LQ Newbie
 
Registered: Aug 2005
Location: Centennial, CO
Distribution: Fedora
Posts: 14
Thanked: 0
So I ran as ./configure, make depend && make and make install all as root and I did not get any errors. I added the dll's and pasted in the others and installed directX 9c. Then I ran dxdiag and everything looks good with no errors. The only issue I have now is when I run the Direct3D test I only see a white spinning box. I do not see the directX logo on the box.
mbrocketry is offline     Reply With Quote
Old 12-30-2007, 10:39 AM   #45
snares
Member
 
Registered: Mar 2006
Distribution: Ubuntu Gusty Gibbon
Posts: 107
Thanked: 0
at least you're making headway! Also the post I found listed two files that look to be used for graphics. Try installing those.

Last edited by snares; 12-30-2007 at 10:41 AM..
snares is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Call of Duty 2 on Linux codfreek Linux - Games 7 10-03-2007 12:12 AM
LXer: 'call of Duty 2' - v1.3 Dedicated Linux Server Available NOW LXer Syndicated Linux News 0 07-01-2006 08:21 PM
Call of Duty 1.4 Dedicated Linux Server Script fotoguy Programming 2 01-05-2005 04:29 AM
new Call of Duty Patch for linux!!!!!!! jamil5454 Linux - Software 0 12-30-2003 06:27 PM


All times are GMT -5. The time now is 11:32 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration