This is an old revision of the document!
The subject of the Earth Eternal on Linux came up in chat last night, so as promised here is what you need to get up and running the client using Wine.
At the peak of its popularity, there were a 200-300 downloads of the PlayOnLinux script that eventually evolved. So while nowhere near the Windows total, there were still a few of us out there :)
The patches required are same as always needed, but this time I have combined them into a single patch. Underneath, it's still the same my “inet-address” patch that fixes the logon, and the “d3d9-hack” patch provided by PsyQ which (mostly) fixes crashes when resizing the window from its default 800×600. The latter patch was described by the author as, “The single most evil thing done to wine, ever!”. For this reason, it's best not to use Wine patched for Earth Eternal with any other applications or games.
I used Ubuntu 12.04 for this, you may have to adjust some commands for other distributions, particularly installing packages.
If there is sufficient demand, I can resurrect the old script that used to do most of this for you.
A note about Ubuntu 64 bit installations. If you are using 64bit Ubuntu 12.04, maybe 11.10 as well (which has a thing called “multi-arch”), getting Wine to compile as 32 bit is a total nightmare. The easiest option is to install a 32 bit Ubuntu 12.04 virtual machine, compile wine on that, and copy the result back your 64 bit host in the same location. Alternatively, on request I can provide a pre-compiled patched wine for most distributions (not always quickly though).
sudo apt-get build-dep wine1.5
gedit ~/Desktop/ee.patch
And now the content of this file ..
diff -ru wine-1.5.10.orig/dlls/d3d9/tests/buffer.c wine-1.5.10/dlls/d3d9/tests/buffer.c --- wine-1.5.10.orig/dlls/d3d9/tests/buffer.c 2012-07-31 20:08:12.000000000 +0100 +++ wine-1.5.10/dlls/d3d9/tests/buffer.c 2012-08-08 18:29:29.410660651 +0100 @@ -120,10 +120,9 @@ { switch(pool) { - case D3DPOOL_DEFAULT: return "D3DPOOL_DEFAULT"; case D3DPOOL_SYSTEMMEM: return "D3DPOOL_SYSTEMMEM"; case D3DPOOL_SCRATCH: return "D3DPOOL_SCRATCH"; - case D3DPOOL_MANAGED: return "D3DPOOL_MANAGED"; + case ( D3DPOOL_MANAGED || D3DPOOL_DEFAULT) : return "D3DPOOL_MANAGED"; default: return "unknown pool"; } diff -ru wine-1.5.10.orig/dlls/ws2_32/socket.c wine-1.5.10/dlls/ws2_32/socket.c --- wine-1.5.10.orig/dlls/ws2_32/socket.c 2012-07-31 20:08:12.000000000 +0100 +++ wine-1.5.10/dlls/ws2_32/socket.c 2012-08-08 18:29:29.410660651 +0100 @@ -2976,11 +2976,22 @@ */ WS_u_long WINAPI WS_inet_addr(const char *cp) { - if (!cp) return INADDR_NONE; - return inet_addr(cp); + unsigned long ulAddr = INADDR_NONE; + if (cp) { + ulAddr = inet_addr(cp); + } + /* Try and resolve by name (although the docs say the argument should +be an IP address) */ + if(cp && ulAddr == INADDR_NONE) { + struct hostent *remoteHost; + remoteHost = gethostbyname(cp); + if (remoteHost != NULL) { + return *(u_long *) remoteHost->h_addr_list[0]; + } + } + return ulAddr; } - /*********************************************************************** * ntohl (WS2_32.14) */ diff -ru wine-1.5.10.orig/include/d3d9types.h wine-1.5.10/include/d3d9types.h --- wine-1.5.10.orig/include/d3d9types.h 2012-07-31 20:08:12.000000000 +0100 +++ wine-1.5.10/include/d3d9types.h 2012-08-08 18:29:29.414660470 +0100 @@ -890,7 +890,7 @@ } D3DPATCHEDGESTYLE; typedef enum _D3DPOOL { - D3DPOOL_DEFAULT = 0, + D3DPOOL_DEFAULT = 1, D3DPOOL_MANAGED = 1, D3DPOOL_SYSTEMMEM = 2, D3DPOOL_SCRATCH = 3,
cd ~/Desktop tar xjf ~/Downloads/wine-1.5.10.tar.bz2 cd wine-1.5.10 patch -p1 < ~/Desktop/ee.patch
./configure --prefix=/opt/games/wine-ee make
This will take a while. If you have a multicore machine, you can speed it up considerably by using “make -j 8” for example to use 8 threads.
sudo make install
tar czf ~/wine-ee-32bit.tgz /opt/games/wine-ee
Now copy this file from the VM to the target and extract it in the root of your file system so all the files end up in the same place (/opt/games/wine-ee).
sudo apt-get install winetricks
# NOTE - You will have to run these 2 commands again if you open a new terminal export PATH="/opt/games/wine-ee/bin:$PATH" export WINEPREFIX="$HOME/.ee" winetricks winxp corefonts vcrun2005 fontfix d3dx9
Winetricks will take a short while to download install. You can cancel the “Mono” and “Gecko” dialog boxes
that might pop up, you don't need them.
1. Download the client found elsewhere on this forum and unzip it into the new prefix.
cd $HOME/.ee/drive_c/Program\ Files unzip ~/Downloads/EEClient86.zip
2. Now create a script file in the client directory and edit it.
cd EEClient86 touch planetforever.sh chmod a+rx planetforever.sh gedit planetforever.sh
3. Place the following in the script file
#!/bin/bash if [ -L "${0}" ] ; then dir=$(dirname "$(readlink -f "${0}")") else dir=$(dirname "${0}") fi cd "${dir}" export PATH="/opt/games/wine-ee/bin:$PATH" export WINEPREFIX="$HOME/.ee" wine Spark.exe http://planetforevergame.com/Release/Current/EarthEternal.car
4. Create a nice link to this script
sudo ln -sf ~/.ee/drive_c/Program\ Files/EEClient86/planetforever.sh /usr/local/bin/ee
5. Start the game!
ee
[size=150]What Works[/size]
Once in game, just about everything works perfectly. Any bugs you find are likely bugs that Windows user get as well.
[size=150]Known problems[/size]
1. Window resizing. Without the patch, it will crash immediately. With the patch, it only crashes sometimes. Try to resize the window before logging in. Also, some window managers are worse than others. 2. You will eventually be affected by a memory leak. Don't worry, it's not personal, I believe Windows users get it too. 3. Changing some video options may crash. Not seen this for a while, but it used to happen a lot.
Enjoy
RR