[Wine] Civ4 in Wine 1.1.25 on Ubuntu 9.04

Very cool - thank you for compiling this all in one place and making this a good resource.

I had Civ4 running for about 6 months flawlessly on Ubuntu Hardy a while back, but when I went to install BTS 3.19 recently on my new Intrepid box with Wine 1.1.24 I had no end of problems and finally just loaded it up in win... it was a rare case where combing through the WineAppDB didn't get it running, so I am very excited about trying this out .... (right after I finish my current map!)

Thanks for the time you took on this!
 
Thank you for setting this up. It works on my (slightly ancient) Jaunty box, with a couple of minor glitches, none of which has anything to do with your instructions:

* Every so often the machine will freeze up. Sometimes Civ will exit with a wine error, sometimes it goes into la-la land and the box needs to be rebooted. Sometimes I can play for hours. Go figure. I can occasionally get things restarted by ssh'ing into the box and killing any wine processes I find, but that doesn't always work. I did track one reason for crashing down: Apparently the combination of wine, Civ and screensaver is not a good idea. I also turned off compviz, but I don't know whether it had anything to do with the lockups or not.

* Keyboard input gets passed through to the OS. For instance hitting ctrl-R to see your resources doesn't work, nor does hitting the Enter key to end a turn. Fortunately just about everything can be done through the Civ interface, except for changing your name at the beginning of the game. (I occasionally like to change my name to "Boris Badenov" when playing Russia, or "Colonel Bloodnok" when playing England. :D ) I suspect this is a DirectX artifact.

* I never see any health bars for my units. Again, I'm thinking this might be a DirectX artifact as well.

I'll be watching this thread with anticipation to see how to work around DirectX, and most likely reinstall when the instructions are up to see if it fixes the last two problems (and hopefully the first!).

Thanks again for this!!
 
Very cool - thank you for compiling this all in one place and making this a good resource.

I had Civ4 running for about 6 months flawlessly on Ubuntu Hardy a while back, but when I went to install BTS 3.19 recently on my new Intrepid box with Wine 1.1.24 I had no end of problems and finally just loaded it up in win... it was a rare case where combing through the WineAppDB didn't get it running, so I am very excited about trying this out .... (right after I finish my current map!)

Thanks for the time you took on this!
No problem- I actually can't get the RoM 2.17 to work on my box but others like Boris have been able to. Go figure! I am revamping the instructions with lessons learned from the Ubuntu/Wine forums. Now with less steps! WOW! /advert

Thank you for setting this up. It works on my (slightly ancient) Jaunty box, with a couple of minor glitches, none of which has anything to do with your instructions:
Glad it works for you- what are your hardware specs? I will post mine later tonight. I have a dual proc 64-bit system with 4 GB of RAM but I still can't get RoM 2.7 to run but 2.63 WoC Lite ran fine on the small, tiny, and duel maps.
* Every so often the machine will freeze up. Sometimes Civ will exit with a wine error, sometimes it goes into la-la land and the box needs to be rebooted. Sometimes I can play for hours. Go figure. I can occasionally get things restarted by ssh'ing into the box and killing any wine processes I find, but that doesn't always work. I did track one reason for crashing down: Apparently the combination of wine, Civ and screensaver is not a good idea. I also turned off compviz, but I don't know whether it had anything to do with the lockups or not.
I turned the settings down to the lowest for compviz...I didn't actually stop any processes though. Did you go as far as stopping the compiz processes?
* Keyboard input gets passed through to the OS. For instance hitting ctrl-R to see your resources doesn't work,
I actually have a section in the guide dealing with getting the Alt key to work. Look under the misc. section.
nor does hitting the Enter key to end a turn.
I haven't had a problem with the Enter key for ending turns- do you have Wine run in an windowed environment? I do. The only time the Enter doesn't work on my system is when I go outside the screen, use firefox, click back into the game through the 'taskbar' (sorry, don't know the ubuntu term)- to get Enter working again, I have to click into the game itself...not just the taskbar.
Fortunately just about everything can be done through the Civ interface, except for changing your name at the beginning of the game. (I occasionally like to change my name to "Boris Badenov" when playing Russia, or "Colonel Bloodnok" when playing England. :D ) I suspect this is a DirectX artifact.
You can change your name in the middle of the game. Hit ESC to bring up the menu. I believe the button you want to click is called Game Options. If it isn't that one then it is a button down towards the bottom.

* I never see any health bars for my units. Again, I'm thinking this might be a DirectX artifact as well.
I'll be watching this thread with anticipation to see how to work around DirectX, and most likely reinstall when the instructions are up to see if it fixes the last two problems (and hopefully the first!).

Thanks again for this!!

Gotta run to class. Will finish later.
 
Glad it works for you- what are your hardware specs? I will post mine later tonight. I have a dual proc 64-bit system with 4 GB of RAM but I still can't get RoM 2.7 to run but 2.63 WoC Lite ran fine on the small, tiny, and duel maps.
I turned the settings down to the lowest for compviz...I didn't actually stop any processes though. Did you go as far as stopping the compiz processes?

MSI KT4 motherboard, AMD 1600+ processor overclocked to think it's a 1900 (I told you this was an oldish machine!), 768 MB memory, generic NVidia card using NVidia's driver rather than Ubuntu's. When I run Civ I run it as the only active process on the machine, mostly because I can't minimize it to get to anything else. :D

An extra 1GB memory module is supposed to be arriving today and I'll see if that makes any difference to the performance.

You asked about compviz. I had it running with all the bells and whistles at one time but lately I've just turned it off, in part to try to solve a persistent problem of Firefox "going away" every so often. (Turning off compviz didn't solve the problem, so I might turn it back on once I get the extra memory in to see what happens.)

I haven't had a problem with the Enter key for ending turns- do you have Wine run in an windowed environment? I do. The only time the Enter doesn't work on my system is when I go outside the screen, use firefox, click back into the game through the 'taskbar' (sorry, don't know the ubuntu term)- to get Enter working again, I have to click into the game itself...not just the taskbar.

The proper term is the "panel." I'm running Civ4 full screen at 1280x1024. I tried it in a windowed environment once but the sound got all choppy. Besides, after playing Civ on a laptop for almost 4 years it's nice to have the big screen.

The enter key is a subproblem of all the keystrokes getting passed through to the OS. For instance if I launch Wine/Civ from a terminal window, try to rename myself to "Boris" as I'm setting up my civ, and then exit out to the desktop the word "Boris" shows up in the terminal window. If I run from a launcher (== shortcut in Windows) the keystrokes get passed through to the window manager, so that for instance ctrl-R brings up a search dialogue on the desktop rather than turning on my resource display.

You can change your name in the middle of the game. Hit ESC to bring up the menu. I believe the button you want to click is called Game Options. If it isn't that one then it is a button down towards the bottom.

You can if Wine handles your keyboard properly. :p

Gotta run to class. Will finish later.

Thanks again for your work on this!
 
I'll just add that Civ4 Complete works with no problems on 8.04. I haven't tried multiplayer yet, but I don't remember installation being as complicated as this thread shows.
 
MSI KT4 motherboard, AMD 1600+ processor overclocked to think it's a 1900 (I told you this was an oldish machine!), 768 MB memory, generic NVidia card using NVidia's driver rather than Ubuntu's. When I run Civ I run it as the only active process on the machine, mostly because I can't minimize it to get to anything else. :D
Have you looked into Ubuntu 'pruning' guides? (not sure of the correct term) I have run across one that had me stop some services that I didn't need like Bluetooth. Not sure how much different it would make for you but every little bit helps.
An extra 1GB memory module is supposed to be arriving today and I'll see if that makes any difference to the performance.
:goodjob: More RAM is almost always good.
You asked about compviz. I had it running with all the bells and whistles at one time but lately I've just turned it off, in part to try to solve a persistent problem of Firefox "going away" every so often. (Turning off compviz didn't solve the problem, so I might turn it back on once I get the extra memory in to see what happens.)
I had an issue with the bottom panel just disappearing. To change to minimized applications I had to use Alt+Tab. I ended up deleting my gnome profile with rm -rf .gnome* and .gconf*, I believe I got this info from this thread: http://ubuntuforums.org/showthread.php?t=303869
The enter key is a subproblem of all the keystrokes getting passed through to the OS. For instance if I launch Wine/Civ from a terminal window, try to rename myself to "Boris" as I'm setting up my civ, and then exit out to the desktop the word "Boris" shows up in the terminal window. If I run from a launcher (== shortcut in Windows) the keystrokes get passed through to the window manager, so that for instance ctrl-R brings up a search dialogue on the desktop rather than turning on my resource display.
Have you tried the UbuntuForums Wine subforum on this issue?
Make sure you read this thread before posting.
You can if Wine handles your keyboard properly. :p
Try this work around (my own devising and WOMB (Works On My Box)):
Code:
vi ~/My\ Games/Beyond\ the\ Sword/CivilizationIV.ini
Search for alias. Change value to BorisIsAweome or whatever you want. ;) I believe this only applies to newly created games.
Thanks again for your work on this!
No problemo. I love the work that has been done on the many mods I play and this is the way I have found I can give back to the Civ community.
 
I'll just add that Civ4 Complete works with no problems on 8.04. I haven't tried multiplayer yet, but I don't remember installation being as complicated as this thread shows.
You are correct. I used my original postings and it worked- I gathered these steps from various WineHQ appdb postings. I have since begun pruning the extra steps. All of the 'to be removed' sections are pretty much going to be removed- I would rather test for a couple of days before making rash decisions (it is the Software Test Engineer in me). I can't rollback on the forum like I could a Wiki page. I'd love to get a copy of all the different versions and test them all out- someday. But, thanks for confirming that Civ4 complete works.
 
Very cool - thank you for compiling this all in one place and making this a good resource.

I had Civ4 running for about 6 months flawlessly on Ubuntu Hardy a while back, but when I went to install BTS 3.19 recently on my new Intrepid box with Wine 1.1.24 I had no end of problems and finally just loaded it up in win... it was a rare case where combing through the WineAppDB didn't get it running, so I am very excited about trying this out .... (right after I finish my current map!)

Thanks for the time you took on this!
Have you tried a fresh install? Meaning, have you removed .wine and started from scratch installing civ4 vanilla through to BtS and patch 3.19? Another thing you might want to try is upgrading to Wine 1.1.25- I doubt that will make any difference and I would try only one change at a time or you won't know what either fixed the problem or you could introduce another issue into your original problem.

Also, just curious here, why are you running 8.04 and 8.10 systems? Do you follow the motto of 'if it ain't broke, don't fix it'? :)
 
Hey damunzy, and all -

I spent a good hour going through with a from-scratch wine install and giving lots of details and stuff. And then it was lost when I hit post. The frustration is subsiding. Normally I save it to notepad befor I hit post, but its one of those days...

Here is what I remember:

I am running Intrepid,

1. Need to include instructions for using "wine eject". When using wine eject you cant run setup.exe while in the mounted cdrom directory.

2. My .wine directory wasn't created until after I ran winecfg, so I got an error when I tried to mkdir Temp

3. (Less Important) After I have installed Vanilla Civ4 with Patch and I try to run it I get the following error:

XML Error
Error locating tag node in SetGlobalClassInfo function
Current XML file is: GameInfo/Civ4PlayerOptionInfos.xml

[edit] At which point Civ fails to load. [/edit]

4. (More Important) Trying to install BTS I get this error:

DXSetup.exe - Error
A fatal error occurred. However, mscorees.dll could not be loaded to display the appropriate error message. Please reinstall the .NET framework.

So I am still struggling to get Civ running in Ubuntu. Any help would be appreciated!

Thanks!
 
Just saw this (I'm so observant)...

Have you tried a fresh install? Meaning, have you removed .wine and started from scratch installing civ4 vanilla through to BtS and patch 3.19?

Yes :) Just did it. I have actually done this a few times now with the whole apt-get purge, and rm -rf .wine and all. So yes, clean slate.

Another thing you might want to try is upgrading to Wine 1.1.25- I doubt that will make any difference and I would try only one change at a time or you won't know what either fixed the problem or you could introduce another issue into your original problem.

I just double checked now because I did the default install from the repository as per the instructions and I am actually at 1.1.26.

Also, just curious here, why are you running 8.04 and 8.10 systems? Do you follow the motto of 'if it ain't broke, don't fix it'? :)

I have a mirrored partition on my 8.10 box and I did an upgrade of it to 9.04 a while back. At the time I had some serious conflict between my Nvidia drivers and compiz. (One or the other had a bug, both claiming the other). So I restored back to 8.10 and haven't bothered to check if that's been fixed yet. Aside from the new google earth not running on Intrepid there really isn't much pulling me to upgrade yet (and yes, that will change as time goes on).
 
Hey damunzy, and all -

I spent a good hour going through with a from-scratch wine install and giving lots of details and stuff. And then it was lost when I hit post. The frustration is subsiding. Normally I save it to notepad befor I hit post, but its one of those days...

Here is what I remember:

I am running Intrepid,

1. Need to include instructions for using "wine eject". When using wine eject you cant run setup.exe while in the mounted cdrom directory.
Ah, didn't know about that one. I have all the files copied off of CD-ROM to the harddrive so I don't actually use the CDs anymore- installing over and over again goes much faster from the HDD. :)
2. My .wine directory wasn't created until after I ran winecfg, so I got an error when I tried to mkdir Temp
Good point- the mkdir Temp is going away since DirectX isn't being installed in the latest update of the instructions.
Update: Removed- thanks!
3. (Less Important) After I have installed Vanilla Civ4 with Patch and I try to run it I get the following error:

XML Error
Error locating tag node in SetGlobalClassInfo function
Current XML file is: GameInfo/Civ4PlayerOptionInfos.xml

[edit] At which point Civ fails to load. [/edit]
Do you have the xml DLLs copied into ~/.wine/drive_c/windows/system32?
Also, do you have the one xml DLL overridden through winecfg > Libraries?
Code:
*Download and copy the following files into ~/.wine/drive_c/windows/system32:
mscoree.dll – [url]http://www.dlldump.com/download-dll-.../download.html[/url]
streamci.dll – [url]http://www.dlldump.com/download-dll-.../download.html[/url]
ddrawex.dll – [url]http://www.dlldump.com/download-dll-.../download.html[/url]
msxml3.dll – [url]http://www.dlldump.com/download-dll-.../download.html[/url]
msxml3r.dll – [url]http://www.dlldump.com/download-dll-.../download.html[/url]
[/code]
4. (More Important) Trying to install BTS I get this error:

DXSetup.exe - Error
A fatal error occurred. However, mscorees.dll could not be loaded to display the appropriate error message. Please reinstall the .NET framework.
[/quote]
Do you have the downloaded mscorees.dll in system32?
Code:
* On the Libraries tab, under New override for library, type d3dx9_26 and then click the Add button.
Under Existing overrides, d3dx9_26 (native, builtin) should appear.

* On the Libraries tab, under New override for library, type msxml3 and then click the Add button.
Under Existing overrides, msxml3 (native, builtin) should appear.
So I am still struggling to get Civ running in Ubuntu. Any help would be appreciated!

Thanks!
 
Do you have the xml DLLs copied into ~/.wine/drive_c/windows/system32?
Also, do you have the one xml DLL overridden through winecfg > Libraries?

Thanks for your responses.

I downloaded the dlls. I had previously been copying them from a Windows XP installation I had, but I'm not sure if this would matter so I downloaded and copid them to system32. This didn't seem to make any difference.

I did have the dll setting for mscoree.dll set to (native) not (native,builtin). I fixed that and immediately got further, but still not loading.

The Civ4 splash screen would come up and it would get to the "Init Engine" and then crash with a "Serious error" message from wine. in the terminal window it indicated a permissions problem with my Nvidiactl (? or something close to that).

I installed the latest Nvidia drivers. 185.18.14. This corrected the issue - I got passed the "Init Engine" stage of the Civ4 Vanilla 1.74 load. However, at the point where the screen usually flips to full screen resolution and the game starts it just flipped back and forth between multiple resolutions and eventually displayed this error:

ERROR
Initalize Renderer failed. Check DirectX Installation, Latest Graphic Drivers, and Graphics Settings.
Parameters:
-width = 1024
-height = 768
-flags=0xc
-hwnd=0x110030
-adaptrid=0
-deviceid=1
Error:Creation failed: Device does not support single-pass multi-texture.

I tried a few different versions of the Nvidia driver (172. ... 180. .. ) but all the other ones crashed at the Init Engine. This is odd though because I have definitely played Civ4 with the 172 series of drivers before on Hardy. This makes me think that the issue is not the driver and the fact that I got past it with the latest Nvidia driver (only) released last month is just happenstance.

I'm going to tinker around with it some more. Any further insight/help is appreciated.
 
*After install has finished, in the terminal, run the following command:
wine eject

I would move this up a few points and change it to read:

*If during the installation you get prompted to insert another CD, open a NEW terminal window and run the following command to eject the CD currently in the drive first (don't do it manually):
wine eject


- it doesn't matter if the CD is left in after the installation afaik.
- if the wine eject command is typed in the same terminal window as the setup.exe command it can cause problems.
 
Hmm, I followed your instructions, up to the point where you have to install the game. At that point I figured it would be faster to copy and paste it from my windows partition (and since patch 3.19, it'll run copy/pasted, I've tried with a USB stick). So I did that, used the Wine launcher to launch the .exe, and a window pops up showing:

Caught unhandled exception creating XML parser object
Current XML file is: (it is just blank here)

Then I get a CtD
Not sure what exactly is wrong as I'm new to linux, but I thought it would work.

Edit: Oh, and to be clear, I used the GUI for everything, not the terminal.

Edit 2; Electric Boogaloo: I changed the version in the config to XP, and later Vista, and it started to load, until it got to the "init engine" where the window started to expand (I think to 800x600, the defaut window size I set it to), and then it get the "serious error" popup and closes. I think I will try a fresh install tomorrow.
 
The only ro9blem is that it seems Pitboss is unstable on it. I hope that is bit of a hint. ;)

Pitboss in itself is very unstable... But adding in more uncertain factors doesn't help much...
 
Hmm, I followed your instructions, up to the point where you have to install the game. At that point I figured it would be faster to copy and paste it from my windows partition (and since patch 3.19, it'll run copy/pasted, I've tried with a USB stick). So I did that, used the Wine launcher to launch the .exe, and a window pops up showing:

Caught unhandled exception creating XML parser object
Current XML file is: (it is just blank here)

Then I get a CtD
Not sure what exactly is wrong as I'm new to linux, but I thought it would work.

Edit: Oh, and to be clear, I used the GUI for everything, not the terminal.

Edit 2; Electric Boogaloo: I changed the version in the config to XP, and later Vista, and it started to load, until it got to the "init engine" where the window started to expand (I think to 800x600, the defaut window size I set it to), and then it get the "serious error" popup and closes. I think I will try a fresh install tomorrow.
Yeah, just copying it over can cause some issues. I made a backup of my .wine directory so that I could try out an installation script I created- well, the script didn't work exactly as planned as I had to Control+C out of the installation of the first patch which broke me out of the install script. After copying the .wine backup to the original directory I had to perform some voodoo to get the game to work (not sure what I did exactly, but if finally worked)!
 
Pitboss in itself is very unstable... But adding in more uncertain factors doesn't help much...

I found that to be true especially as the turns went on. I had a player questioning if I was reloading because something went wrong for me in the game. :(
 
Hmm, I followed your instructions, up to the point where you have to install the game. At that point I figured it would be faster to copy and paste it from my windows partition (and since patch 3.19, it'll run copy/pasted, I've tried with a USB stick). So I did that, used the Wine launcher to launch the .exe, and a window pops up showing:

Caught unhandled exception creating XML parser object
Current XML file is: (it is just blank here)
That should be solved by setting the DllOverride for msxml3...
Then I get a CtD
Not sure what exactly is wrong as I'm new to linux, but I thought it would work.

Edit: Oh, and to be clear, I used the GUI for everything, not the terminal.
I would suggest using the terminal. I created a small single line script for running the game and logging the output. Script start_civ4BtS-v3_19:
Code:
wine ~`whoami`/.wine/drive_c/Program\ Files/Firaxis\ Games/Sid\ Meier\'s\ Civilization\ 4/Beyond\ the\ Sword/Civ4BeyondSword.exe 2>&1 | tee ~`whoami`/civ4Logs/btS-v3_19-`date +%Y%m%d_%H%M%S.log`
Run the script by typing the following in the terminal: sh start_civ4BtS-v3_19
You can take out the `whoami` and replace with a static username.
Edit 2; Electric Boogaloo: I changed the version in the config to XP, and later Vista, and it started to load, until it got to the "init engine" where the window started to expand (I think to 800x600, the defaut window size I set it to), and then it get the "serious error" popup and closes. I think I will try a fresh install tomorrow.
I believe that the lowest resolution that Civ4 will run on is 1024x768...that might be the issue. I just tested it out and even if you have your resolution set to 800x600 in winecfg Civ4 will change it to 1024x768 on initialization of the engine.
 
Hi Damunzy

Thanks for your walk-through!

It's not working for me though.

The first thing I ran against was the installation of BTS which failed on the directX check.
I then followed your 'obsolete' directX instructions.
Here I also ran into some problems with running dxdiag.exe. The first time it asked me if it could check something (don't remember exactly and I haven't seen the message again). I said yes to the question and it told me my 'dxdiagn.dll' was out-of-date.
I searched for the dll in the location you specified and indeed found a newer one which I downloaded and copied, but the message keeps coming.

I figured that it was just a test, so let's try to continue. It appeared to work. BTS would now install.
The patch also installed fine, but the game won't run.

I did the Win2000 - WinXP change as in your walk-through (just to head you off there ;-) ).
I tried a re-install of DirectX 9c, but I still keep getting the dxdiag.exe error.

I ran the game from the console and the only thing that made any sense to me was the following line:
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x01d5235d).

I'm running Kubuntu 9.04 64bit. Could this have anything to do with it or is this abstracted by wine?

I would welcome any suggestions.

Thanks in advance!
 
Hi Damunzy

Thanks for your walk-through!

It's not working for me though.
:( Unfortunately, I am finding that what works for one person doesn't always work for others. I am not sure why this is but I am trying to figure it out. :(

I then followed your 'obsolete' directX instructions.
Here I also ran into some problems with running dxdiag.exe. The first time it asked me if it could check something (don't remember exactly and I haven't seen the message again). I said yes to the question and it told me my 'dxdiagn.dll' was out-of-date.
I believe this is where it was asking about the WHQL drivers - this never made a difference one way or another for me (answering Yes or No).
I searched for the dll in the location you specified and indeed found a newer one which I downloaded and copied, but the message keeps coming.
Weird...is the dll located in the following location? ~`whoami`/.wine/drive_c/windows/system32
If you can remember what DLL that was that could be helpful. It wasn't d3dx9_26, was it? That is the only one that I have found that needs to be DllOverride'd besides msxml3 for vanilla BtS to run.
I figured that it was just a test, so let's try to continue. It appeared to work. BTS would now install.
The patch also installed fine, but the game won't run.

I did the Win2000 - WinXP change as in your walk-through (just to head you off there ;-) ).
I tried a re-install of DirectX 9c, but I still keep getting the dxdiag.exe error.
;) Does that mean that you tried to install DirectX in Windows 2000? I believe that wxp comes with dxdiag.exe but w2k doesn't and that is why that you need to install dx in w2k- to 'trick' the installer into copying dxdiag.exe into system32.
I foresee fresh Wine in your future (rm -rf ~`whoami`/.wine). ;)
I ran the game from the console and the only thing that made any sense to me was the following line:
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x01d5235d).
Sorry, but that error means nothing to me. :) I would suggest setting up an account at Ubuntu Forums and posting there- BUT! start over again (rm -rf .wine) and do NOT install DirectX. They will NOT support the installation of dx.
Once again, I foresee fresh Wine in your future (rm -rf ~`whoami`/.wine). ;)
I'm running Kubuntu 9.04 64bit. Could this have anything to do with it or is this abstracted by wine?
I am running Ubuntu 9.04 64-bit. I don't think the 64-bit has anything to do with it but I am not sure of if KDE vs Gnome is causing an issue...I would think that it wouldn't but since it is a graphical system you never know.
I would welcome any suggestions.

Thanks in advance!
Good luck on our shared journey of getting Civ4 to work perfectly on Linux!
I am bugging my dad for his spare computer parts (he is always upgrading his computer to the latest geewiz gadgets- he is looking into getting SSD drives now) so that I can setup a computer just for testing stuff out- if anyone else has 'extras' laying around I will gladly except them. I have plenty of HDDs but need everything else (Mobo, CPU, RAM, Video). It doesn't need to be top of the line stuff, a P4 or equiv should work. :)
 
Top Bottom