HOWTO Install and Play (for older versions of wine before 1.1.31)
(1) First off, pop in your CDs. Open a Terminal and launch the setup:
wine "D:\Autorun.exe"
(Replace D: with whatever you have your CD drive mapped to in winecfg)
You may run into CD ejecting problems. when the setup comes to a "Insert Next CD" prompt, switch back to terminal and open a new tab. Do a "wine eject" pop in the next CD, and continue.
(2) After installation (some errors may appear, normally it's fine, sometimes you will have to kill the installation but it should've finished fine). You should get "d3dx9_24.dll" and "d3dx9_25.dll" into the System32 folder from a Windows installation.
(3) If Battlefield doesn't start up, and gives you errors about Uknown DynamicOption, try this tip from Roosch
Edit the Video.con file in your $HOME/Battlefield 2/Profiles/Default folder. Change the resolution part to 1024x768@60Hz
(4) Battlefield should then start up fine.
Some extra tips taken from the demo entry:
Open the registry editor (run 'regedit') and create the key
'HKEY_CURRENT_USER\Software\Wine\AppDefaults\bf2.exe\Direct3D'. Then,
add a value of type string with name 'OffscreenRenderingMode' and value
'fbo'
When the game is run in fullscreen, the taskbar is not hidden, and
the downmost part of the game window is missing. Run it in window mode
with 'wine bf2.exe +fullscreen 0'
If you want to play in another resolution than 800x600 using windowed mode, you must
specify this on the command line, otherwise the game will not be
displayed in the entire window. Use 'wine bf2.exe +fullscreen 0 +szx
1024 +szy 768', substitute according to your wishes
Alternatively you can use Wine's Virtual Desktop mode which can be activated in winecfg.
Note that while the cursor is invisible on the main menu, the mouse can still be used.
Settings can be turned up high. I had to change in my "winecfg" the Audio settings to Hardware Acceleration: Standard and "Driver Emulation" on. So you may want to mess with those settings if your Battlefield freezes and the terminal spits out something about DirectSound.
I successfully played online, but a Punkbuster server will kick you with Window API errors. So only non-Punkbuster servers for now...
This game is a little broken and requires that you have 1024x768 @ 60hz available in XOrg else it wont start (also true under Windows). You can check its availability by running "xrandr" in a terminal which will tell you all your available screen-modes and resolutions. If it's not available then you either need to add it or run the game in windowed mode or a Virtual Desktop.
HOWTO
Good Instructions out of date
by Michael
Gilbert on Sunday November 8th 2009, 22:11
BTW, installing battlefield 2 on a current version of wine (1.1.31 here)
is actually a lot easier than currently described in the instructions
(no need for d3d files from a windows install). Here is what I did:
1. Install the game from the disks
2. Install the 1.41 patch
3. Install the 1.5 patch
4. Add "fbo" to the
"HKEY_CURRENT_USER/Software/Wine/AppDefaults/bf2.exe/Direct3D/OffscreenRendering"
key
4. Start the game with "wine bf2.exe +fullscreen 0 +szx 1024 +szy
768"
Fulscreen didn't quite work for some reason, but windowed mode runs
great.
Also, from what I've seen so far punkbuster works. I've been
playing on punkbuster servers without getting kicked!
Hope this is useful.
RE: Good Instructions out of date
by Warren
Dumortier on Sunday November 15th 2009, 7:40
You don't even have to define fbo as ORM as it is the default since some
time!
The following comments are owned by whoever posted them. WineHQ is not responsible for what they say.
BF2 with 5.1 Surround Sound
by McMaster on Thursday April 25th 2013, 15:53
I have an Audigy 2 ZS that I'd like to use for surround sound. All channels are routed properly as confirmed by "speaker-test -c 6 -t wav". However, when I play BF2, all channels are ON but it's only "triple stereo" playing (i.e., the front pair, the rear pair, and the center are all playing the same stereo signal).
I think this game uses dsound. I'm using the builtin dll for dsound.
Anyone know how to get the proper discrete channels in BF2 surround sound?
Run pbsetup.exe from your BF2 wineprefix, click "Add a Game" and select "Battlefield 2" from the list of games, then click "Check for Updates" and BF2's version of punkbuster will be updated.
by Jean A. Hough on Thursday June 30th 2011, 16:17
Hi to all,
[url]www.d3dx9.net/download-missing-d3dx9_25-dll/[/url] You can get the d3dx9_25.dll file from the above link.
this is the source which is best for solving this sort of dll related issues.
Click the Link on this page and it will fix your problem.
Weird behavior on 1.3.21
by Linux_gamer on Thursday June 16th 2011, 9:30
So, I was having the same trouble as others with the resolution not configuring right and getting error messages on load. I used the terminal command with 1024X768 resolution, which seemed to work. But, what I additionally found is that if you say "emulate virtual desktop" and put the native res. of your monitor under "Default Settings", it works fine in fullscreen (at least for me). Change to the same settings for app. specific BF2.exe, and it fails again with the error message "has encountered a serious error and needs to close". For me, the config files to change to 1024X768@60Hz did nothing either. Seems like "Default Settings" graphics options and terminal commands are the only things that influence it.
Annoying (well-known?) mouse warping bug
by Matt North on Thursday November 25th 2010, 4:40
Hi all,
I've successfully installed BF2 v1.5 under Wine 1.2.1 and can run it with that and Wine 1.3.7 with almost no problems.
The one problem I've got is that the mouse cursor seems constrained to the initial window size, e.g. I can only move the mouse to turn so far before it hits the window edge and I can no longer turn in that direction. From what I gather this is a well known bug and would require a lot of work to patch it - but has anyone been able to run BF2 with no mouse issues, or has anyone got a workaround handy?
Battlefield 2 - Wine 1.3.7 - Fedora 14 x64
by Ryan on Monday November 22nd 2010, 17:58
I managed to get Battlefield 2 running on Fedora 14 x64 last night on Wine 1.3.7 in 800x600 with all settings on high (set manually). I was unable to get punkbuster to install/run properly but I could play punkbuster free servers. I was unable to change screen res without the game crashing. To get this running I just installed from disc, and updated with patch 1.41 and 1.5. I had wine config set to run in windows 7 compatibility. Prior to doing this, I had already set the VideoMemorySize key under HKCU\wine\Direct3D, and gecko had automatically downloaded and installed. I had attempted to use winetricks to install a few other dlls etc, however winetricks doesn't work in x64. Also I had previously installed the tahoma font from a backup copy I had of some $NTSPUninstall$ folders.
BF2 1.5 (Steam) WINE 1.3.5 Ubuntu 10.04
by Bob Wya on Sunday October 17th 2010, 17:49
Hi
I've finally got BF2 to play through the intro movies today (previously it would just crash immediately). I am able to log into my EA account fine. I can get into the menus (the mouse cursor is visible, etc.!!) The menus are all working fine (including the BFHQ with my player stats and the multiplayer server lists).
The problem is that when I try and connect to a server the game/WINE hangs (single or multiplayer). So I have to CTRL+ALT+F1 and kill the BF2.exe process to restore access to the OS.
Any thoughts?
Bob
I am getting no output at all when running:
$ wine ./BF2.exe
in a console. I've tried running:
$ WINEDEBUG=+relay,+seh,+tid wine BF2.exe &> log.txt
But there is nothing very useful in the log file which ends with:
...
004c:Call user32.DestroyWindow(00000000) ret=7e2403a8
004c:Ret user32.DestroyWindow() retval=00000000 ret=7e2403a8
004c:Call ntdll.RtlFreeHeap(00110000,00000000,0016b900) ret=7e23b486
004c:Ret ntdll.RtlFreeHeap() retval=00000001 ret=7e23b486
004c:Call ntdll.RtlFreeHeap(00110000,00000000,0016b978) ret=7e23b486
004c:Ret ntdll.RtlFreeHeap() retval=00000001 ret=7e23b486
004c:Call ntdll.RtlFreeHeap(00110000,00000000,0016b678) ret=7e23b486
004c:Ret ntdll.RtlFreeHeap() retval=00000001 ret=7e23b486
004c:Call ntdll.RtlFreeHeap(00110000,00000000,0016ba18) ret=7e23b486
004c:Ret ntdll.RtlFreeHeap() retval=00000001 ret=7e23b486
004c:Call ntdll.RtlFreeHeap(00110000,00000000,0016b660) ret=7e23b486
004c:Ret ntdll.RtlFreeHeap() retval=00000001 ret=7e23b486
004c:Call ntdll.RtlFreeHeap(00110000,00000000,0016b7a8) ret=7e24041d
004c:Ret ntdll.RtlFreeHeap() retval=00000001 ret=7e24041d
004c:Call user32.DestroyWindow(00000000) ret=7e2404ec
004c:Ret user32.DestroyWindow() retval=00000000 ret=7e2404ec
004c:Call ntdll.RtlFreeHeap(00110000,00000000,0016b548) ret=7e24050c
004c:Ret ntdll.RtlFreeHeap() retval=00000001 ret=7e24050c
004c:Call winex11.drv.ImeDestroy(00000001) ret=7e2412ec
004c:Ret winex11.drv.ImeDestroy() retval=00000001 ret=7e2412ec
004c:Call KERNEL32.FreeLibrary(7e400000) ret=7e2412fa
004c:Ret KERNEL32.FreeLibrary() retval=00000001 ret=7e2412fa
004c:Call ntdll.RtlFreeHeap(00110000,00000000,0016b560) ret=7e24131a
004c:Ret ntdll.RtlFreeHeap() retval=00000001 ret=7e24131a
004c:Call KERNEL32.TlsFree(00000000) ret=7e241335
004c:Ret KERNEL32.TlsFree() retval=00000001 ret=7e241335
004c:Ret PE DLL (proc=0x7e243350,module=0x7e230000 L"imm32.dll",reason=PROCESS_DETACH,res=0x1) retval=1
004c:Call PE DLL (proc=0x7effd170,module=0x7eff0000 L"version.dll",reason=PROCESS_DETACH,res=0x1)
004c:Ret PE DLL (proc=0x7effd170,module=0x7eff0000 L"version.dll",reason=PROCESS_DETACH,res=0x1) retval=1
004c:Call PE DLL (proc=0x7ecd1080,module=0x7ec70000 L"gdi32.dll",reason=PROCESS_DETACH,res=0x1)
004c:Ret PE DLL (proc=0x7ecd1080,module=0x7ec70000 L"gdi32.dll",reason=PROCESS_DETACH,res=0x1) retval=1
004c:Call PE DLL (proc=0x7ec56d40,module=0x7ec20000 L"advapi32.dll",reason=PROCESS_DETACH,res=0x1)
004c:Ret PE DLL (proc=0x7ec56d40,module=0x7ec20000 L"advapi32.dll",reason=PROCESS_DETACH,res=0x1) retval=1
004c:Call PE DLL (proc=0x7ee4e8c0,module=0x7ee30000 L"ws2_32.dll",reason=PROCESS_DETACH,res=0x1)
004c:Ret PE DLL (proc=0x7ee4e8c0,module=0x7ee30000 L"ws2_32.dll",reason=PROCESS_DETACH,res=0x1) retval=1
004c:Call PE DLL (proc=0x7b8774f0,module=0x7b810000 L"KERNEL32.dll",reason=PROCESS_DETACH,res=0x1)
004c:Ret PE DLL (proc=0x7b8774f0,module=0x7b810000 L"KERNEL32.dll",reason=PROCESS_DETACH,res=0x1) retval=1
004c:Call PE DLL (proc=0x7bc886d0,module=0x7bc10000 L"ntdll.dll",reason=PROCESS_DETACH,res=0x1)
004c:Ret PE DLL (proc=0x7bc886d0,module=0x7bc10000 L"ntdll.dll",reason=PROCESS_DETACH,res=0x1) retval=1
No mouse or keyboard
by Ruben on Monday October 4th 2010, 1:38
Hi. I could install the game with the DVD and upgrade it without any particular issue. It starts correctly within a virtual desktop window, but I can't interact with this window. It is unpossible to click ou type anything in the virtual desktop. Does anyone know a solution to this problem?
Can't star BF2
by Christoffer on Tuesday June 29th 2010, 4:59
Well I did everything in this toturial. But for some reason it just do not works for me. Everytime I try to start BF2 there is a window that says that "BF2.exe have encountered a problem and is forced to shut down." Any ideas?
RE: Multiplayer by Ryan on
Saturday February 20th 2010, 9:06
RE: Multiplayer by Alexander on
Saturday March 13th 2010, 17:44
errrmm..
by tomi on Monday January 11th 2010, 8:51
Well yeah, well i've got just one problem. Cant find "HKEY_CURRENT_USER\Software\Wine\AppDefaults\bf2.exe\Direct3D"
Missing from the part where AppDefaults should be.
only thing that i have even reminding of Direct3D is at
"HKEY_CURRENT_USER\Software\Wine\Direct3D\"
Should i be worried ? :p