Play your Windows Games with Wine and DirectX

November 27, 2007

Microsoft DirectX is a collection of libraries for game programming. With Runtime installed on your Windows Desktop you can run the most important commercial games. On linux you can’t have DirectX installed natively as part of system and there isn’t a Linux Binary versione of it. So, you can’t run windows games on Linux. To have DirectX games on your Linux you can try Wine. Wine (wine is not emulator) is a wrapper of windows libraries, so you can use windows software on your Linux Desktop. Many of windows software don’t run on Linux with Wine, but you can try particular configuration of Wine to see if you can run your favorite windows game or software. To install a Windows Game on Linux you have to install and configure DirectX on wine. This tutorial explain how to install DirectX.

To follow this tutorial I’m assuming that you have installed Wine on your System. In Ubuntu Gutsy: sudo apt-get install wine.

First of all you have to configure your Wine Virtual Desktop with $ winecfg. With this tool you can configure many importants aspects of your Wine Tool. I have configured my Virtual Desktop with a resolution of: 1280×1024 (You can set it to cover your needs). In the Audio tab you can configure Audio Drivers and test it playing test sound. I have configured it with ALSA drivers, but you could user also OSS drivers depending of your Audio Drivers installed on your Linux System. To make a good installation of DirectX on Wine you have to install native mscoree.dll and streamci.ddl in /system32 from a windows Install and set them as native Windows Libraries.
You have to wrap with winecfg many DirectX dlls, so you can add “d3d8″ with winecfg and then with “sudo gedit /home/your_user/.wine/user.reg” add this list of dlls:

[Software\\Wine\\DllOverrides]
“d3d8″=”builtin”
“d3d9″=”builtin”
“d3dim”=”native”
“d3drm”=”native”
“d3dx8″=”native”
“d3dxof”=”native”
“dciman32″=”native”
“ddrawex”=”native”
“devenum”=”native”
“dinput”=”builtin”
“dinput8″=”native”
“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”

Now, you have DirectX wrappers configured correctly but you have to install DirectX 9.0c to complete succesfully your job. Download DirectX form here: http://filehippo.com/download_directx/

you have to extract DirectX in a directory of your choice (z:\home\your_user\directx) and then run setup:

$ wine directx_nov2007_redist.exe
$ cd /home/your_user/directx/
$ wine DXSETUP.EXE

God Job! You have installed DirectX with Wine on your Linux Desktop. To test it you can run dxdiag.exe:

$ cd /home/your_user/.wine/drive_c/windows/system32
$ wine dxdiag.exe

Related Post