z0wb13
undead
- Joined
- Feb 9, 2009
- Messages
- 657
update (jan 2015): wrapper is updated to wine version 1.7.x
porting civ4: a how to in 3 easy steps.
these are instructions to install Civilization IV: Beyond the Sword for Windows on OSX (version 10.6 and up).
for step-by-step instructions on installing mods, go here.
requirements:
Civilization IV: Gold DVD for Windows (buy it from amazon)
civ4bts319 updater
civ4wrapper_yosemite
*old civ4wrapper_mavericks using wine 1.4
and even older civ4wrapper for osx 10.6-10.8
if you are installing from another version of civ4, see addendum v.
Step 1: your CoolNewWrapper!
first download the civ4wrapper from here (~300mb). next, mount the disk image file, and copy the file civ4bts319.app to you desktop, then right-click the file and choose Show Package Contents. you will see a screen that looks similar to this:
right-click on the Wineskin.app and click open. if prompted, click run an app from an unsigned developer. at the wineskin menu, click Install Software.
Step 2: installing from DVD.
click Choose Setup Executable, browse to your DVD, and choose setup.exe to begin installation. first, pick your language. wait a minute. click next, agree to a license, and then choose Custom Install. check install for all users, but uncheck register this game. keep the default file paths, click install, and find something to do for the next hour/3… like remembering to download the updater. try to stay patient, it takes about 20 mins to read everything from the DVD.
eventually, you will be prompted to click finished and, if you are installing from Civ4 Complete, asked if you would like to install the Colonization expansion pack. click cancel to save disk space if you were never going to play it anyways. wait a minute, and you will be prompted to choose the correct .exe file used in order to launch the game. it should be second choice from the top. if for any reason you need to change this path, like you wanted to play warlords for some reason, click the Configuration button and look for the field Windows EXE. the correct path reads like this:
since updating the wrapper for mavericks, i have noticed that sometimes wineskin.app and civ4bts319.app will fail to quit after the installer has finished. this means that you won't receive the prompt to choose an .exe file. it's annoying, and the inelegant solution is to force quit both programs (cmd-opt-esc). then navigate to the Wineskin Advanced window and click on the Configuration button. click on the Browse button across from Windows EXE and point to the correct file. see image below.
Step 3: updating, and Run! (... from an unsigned developer.)
back at the Wineskin Advanced window, click the Install Software button again, then point to the updater (it should be in your downloads folder). go ahead and let it run, but uncheck register this game when given the option. once that is finished, you will get an "Oops! ... Maybe the installer failed...?" message. click OK.
drag your wrapper into the Applications folder, rename it whatever you want, right-click your civ4bts319 wrapper and click open. agree to run an app from an unsigned developer. treat your wrapper like any other osx program. you're done!
although your installation should be playable at this point, go ahead and exit back to the desktop. there is a method to my madness; running civ will let it create the correct directories for saved games and mods, as well as generating the CivilizationIV.ini file.
addendum 1: CivilizationIV.ini
*note that if you have renamed civ4bts319.app, these terminal commands won't work unaltered.
the file named CivilizationIV.ini is the preferences file for civ4. here you can edit settings that will make civ4 run even more smoothly. i have included a sample .ini file in the wrapper disk image. to use it, drag it and the civ4bts319.app to your desktop, and type this into a terminal:
if you want to make your own changes, drag civ4bts319 to your desktop and type this into a terminal:
this will launch TextEdit and open the civ4 preference file. make sure to command-S (save) any changes. my recommendations:
addendum 2:running mods.
running mods was the whole point of this exercise, and the good news is that most work flawlessly, however you must very precisely follow the particular installation instructions for each one you are going to add. some mods run from the Documents/.../MODS folder, and some only from Program Files/.../Mods for reasons that i don’t even remotely understand. apparently it has something to do with how the mod was written. for a list of tested mods running under wineskin, plus step by step instructions, link to here.
addendum 3: multiplayer.
multiplayer works. the LAN lobby works for all computers running vanilla 3.19 bts, however i have experienced some issues related to running mods and playing multiplayer. if you want to connect playing mods, you will have to use the Direct IP method, and it usually takes a reload of the map after it is generated to correct any OOS errors.
addendum v: different versions.
there are several different versions of civ4 that i am aware of. once patched to version 3.19, they should all run.
the two DVD based versions are Gold (civ4 + BtS + warlords expansions) and Complete (Gold + Colonization expansion).
you could also purchase each expansion on its own. apparently there was even a 2 CD release of the base game.
gamefaqs has a guide to release dates and regions here.
archive.org maintains a list of patches here.
the steam version has a bug that you can work around by setting GameOverlayRenderer.dll to disabled in winecfg. other than that, it is reported to work well, and comes fully patched. to install it, first you you install the windows version of the steam client into the civ4wrapper, and then let said client download and install the game for you.
the "Green Pepper" version was a european re-release in jan 2010 of civ4 complete. it works, but you must use a region specific version of the 3.19 updater. it is found here and mirrored. this makes me suspect that the other regions releases might not apply the US patch, which might render the game unplayable, because versions prior to Beyond the Sword 3.19 require a disc check that wine might miss. i have found the japanese version of the patch, but have no way of verifying if it works;p
stay away from the amazon digital download option. their downloader isn't supported in wine1.4 (bug report). later versions may correct the issue but i don't have any reports on this yet.
addendum 10810: error.
since upgrading to mavericks, i have encountered a 10810 error when launching wineskin wrappers. it is related to gatekeeper. i emphatically DO NOT recommend disabling this security feature, although this would fix the problem. instead first right-click your wrapper and choose Show Package Contents. in the next window, right-click the Wineskin.app and choose open. you will be prompted to run application from unsigned developer. click agree, then press cmd-Q cmd-W (to quit wineskin and close your finder window). lastly, right-click you wrapper again, but this time choose open, and pick run... again when prompted. from now on, a standard double-click will launch your wrapper without problems.
NOTES:
old instructions for lion 10.7 are here. they are a little less elegant, but will do the job;p
porting civ4: a how to in 3 easy steps.

these are instructions to install Civilization IV: Beyond the Sword for Windows on OSX (version 10.6 and up).
for step-by-step instructions on installing mods, go here.
requirements:
Civilization IV: Gold DVD for Windows (buy it from amazon)
civ4bts319 updater
civ4wrapper_yosemite
*old civ4wrapper_mavericks using wine 1.4
and even older civ4wrapper for osx 10.6-10.8
if you are installing from another version of civ4, see addendum v.
Step 1: your CoolNewWrapper!
first download the civ4wrapper from here (~300mb). next, mount the disk image file, and copy the file civ4bts319.app to you desktop, then right-click the file and choose Show Package Contents. you will see a screen that looks similar to this:

right-click on the Wineskin.app and click open. if prompted, click run an app from an unsigned developer. at the wineskin menu, click Install Software.

Step 2: installing from DVD.

click Choose Setup Executable, browse to your DVD, and choose setup.exe to begin installation. first, pick your language. wait a minute. click next, agree to a license, and then choose Custom Install. check install for all users, but uncheck register this game. keep the default file paths, click install, and find something to do for the next hour/3… like remembering to download the updater. try to stay patient, it takes about 20 mins to read everything from the DVD.

eventually, you will be prompted to click finished and, if you are installing from Civ4 Complete, asked if you would like to install the Colonization expansion pack. click cancel to save disk space if you were never going to play it anyways. wait a minute, and you will be prompted to choose the correct .exe file used in order to launch the game. it should be second choice from the top. if for any reason you need to change this path, like you wanted to play warlords for some reason, click the Configuration button and look for the field Windows EXE. the correct path reads like this:
/Program Files/2K Games/Firaxis Games/Sid Meier's Civilization 4 Complete/Beyond the Sword/Civ4BeyondSword.exe

since updating the wrapper for mavericks, i have noticed that sometimes wineskin.app and civ4bts319.app will fail to quit after the installer has finished. this means that you won't receive the prompt to choose an .exe file. it's annoying, and the inelegant solution is to force quit both programs (cmd-opt-esc). then navigate to the Wineskin Advanced window and click on the Configuration button. click on the Browse button across from Windows EXE and point to the correct file. see image below.

Step 3: updating, and Run! (... from an unsigned developer.)
back at the Wineskin Advanced window, click the Install Software button again, then point to the updater (it should be in your downloads folder). go ahead and let it run, but uncheck register this game when given the option. once that is finished, you will get an "Oops! ... Maybe the installer failed...?" message. click OK.
drag your wrapper into the Applications folder, rename it whatever you want, right-click your civ4bts319 wrapper and click open. agree to run an app from an unsigned developer. treat your wrapper like any other osx program. you're done!
although your installation should be playable at this point, go ahead and exit back to the desktop. there is a method to my madness; running civ will let it create the correct directories for saved games and mods, as well as generating the CivilizationIV.ini file.
addendum 1: CivilizationIV.ini
*note that if you have renamed civ4bts319.app, these terminal commands won't work unaltered.
the file named CivilizationIV.ini is the preferences file for civ4. here you can edit settings that will make civ4 run even more smoothly. i have included a sample .ini file in the wrapper disk image. to use it, drag it and the civ4bts319.app to your desktop, and type this into a terminal:
mv ~/Desktop/CivilizationIV.ini ~/Desktop/civ4bts319.app/drive_c/users/Wineskin/My\ Documents/My\ Games/Beyond\ the\ Sword/CivilizationIV.ini
if you want to make your own changes, drag civ4bts319 to your desktop and type this into a terminal:
open -a TextEdit ~/Desktop/civ4bts319.app/drive_c/users/Wineskin/My\ Documents/My\ Games/Beyond\ the\ Sword/CivilizationIV.ini
this will launch TextEdit and open the civ4 preference file. make sure to command-S (save) any changes. my recommendations:
; Enable voice over IP capture and playback
EnableVoice = 0
; Specify whether to play in fullscreen mode 0/1/ask
FullScreen = 0
; Set to 1 for no intro movie
NoIntroMovie = 1
; Disable caching of file system (may slow initialization)
DisableFileCaching = 1
; Disable caching of xml and file system (may slow initialization)
DisableCaching = 1
; Modular XML Loading
ModularLoading = 1
; Move along
CheatCode = chipotle
; Custom Screen Height, minimum: 768 - Normal resolutions can be set in-game and will be used when set to 0
ScreenHeight = *
; Custom Screen Width, minimum: 1024 - Normal resolutions can be set in-game and will be used when set to 0
ScreenWidth = *
*adjust to fit your screen. the osx menubar is 20 pixels tall.
addendum 2:running mods.
running mods was the whole point of this exercise, and the good news is that most work flawlessly, however you must very precisely follow the particular installation instructions for each one you are going to add. some mods run from the Documents/.../MODS folder, and some only from Program Files/.../Mods for reasons that i don’t even remotely understand. apparently it has something to do with how the mod was written. for a list of tested mods running under wineskin, plus step by step instructions, link to here.

addendum 3: multiplayer.
multiplayer works. the LAN lobby works for all computers running vanilla 3.19 bts, however i have experienced some issues related to running mods and playing multiplayer. if you want to connect playing mods, you will have to use the Direct IP method, and it usually takes a reload of the map after it is generated to correct any OOS errors.
addendum v: different versions.
there are several different versions of civ4 that i am aware of. once patched to version 3.19, they should all run.
the two DVD based versions are Gold (civ4 + BtS + warlords expansions) and Complete (Gold + Colonization expansion).
you could also purchase each expansion on its own. apparently there was even a 2 CD release of the base game.
gamefaqs has a guide to release dates and regions here.
archive.org maintains a list of patches here.
the steam version has a bug that you can work around by setting GameOverlayRenderer.dll to disabled in winecfg. other than that, it is reported to work well, and comes fully patched. to install it, first you you install the windows version of the steam client into the civ4wrapper, and then let said client download and install the game for you.
the "Green Pepper" version was a european re-release in jan 2010 of civ4 complete. it works, but you must use a region specific version of the 3.19 updater. it is found here and mirrored. this makes me suspect that the other regions releases might not apply the US patch, which might render the game unplayable, because versions prior to Beyond the Sword 3.19 require a disc check that wine might miss. i have found the japanese version of the patch, but have no way of verifying if it works;p
stay away from the amazon digital download option. their downloader isn't supported in wine1.4 (bug report). later versions may correct the issue but i don't have any reports on this yet.
addendum 10810: error.
since upgrading to mavericks, i have encountered a 10810 error when launching wineskin wrappers. it is related to gatekeeper. i emphatically DO NOT recommend disabling this security feature, although this would fix the problem. instead first right-click your wrapper and choose Show Package Contents. in the next window, right-click the Wineskin.app and choose open. you will be prompted to run application from unsigned developer. click agree, then press cmd-Q cmd-W (to quit wineskin and close your finder window). lastly, right-click you wrapper again, but this time choose open, and pick run... again when prompted. from now on, a standard double-click will launch your wrapper without problems.
NOTES:
Spoiler :
good news, you can skip all the tedium of learning how to use wine! i'm leaving up all the steps used in order to create a wrapper, just in case i forget how to do it, but you can skip all of the steps in this spoiler if you have downloaded it from the links above.
step 1: Download (and install) helper apps.
Xcode View in Mac App Store (lion and snow leopard users, see note1)
Wineskin Winery (click me to download)
Civ4 Beyond the Sword v3.19 Patch Download File
Microsoft XML Parser 3 Download Now CNET Secure Download
once everything is downloaded, open a Terminal window and copy paste in these commands, then press enter:
step 2: Wineskin Winery, creating your CoolNewWrapper.
launch the wineskin_winery.app and click the "+" sign to install a new engine, then download WS9Wine1.4.1NoXInput2. next, update your wrapper version to 2.5.9 and then click Create New Blank Wrapper. choose a name, for this guide use civ4bts319 (you can change this later) and click OK. during this process, you will be prompted to install Gecko, but click cancel to skip it.
when everything is finished, click Reveal in Finder to see your wrapper. make sure you quit the wineskin_winery.app, then double-click your new wrapper, and choose Advanced.
Step 3: Winetricks, installing missing libraries.
after clicking on Advanced, choose Tools from the top of the menu, then click on Winetricks. next, click Update Winetricks in the lower-left of the window. then, in the middle of the screen you will see a checkbox next to Custom. click this, and then where you see (arguments) copy and paste in this line.
there are a few ways to do this step, and as stupid as this method sounds, it's easy.
click Run (twice), and then you just have to agree to the licenses, although one of them is in german (click ja for yes).
after winetricks has run, run it again. not everything will take on the first try. and then run it a third time;p
i'm serious! keep running the command until all you see in the output terminal is "already installed, skipping". it took me 5 tries.
Step 4: Config Utillity, setting overrides and options.
you should be back at the Wineskin Advanced settings window. look for the Config Utility (winecfg) button under the Wine Tools sublisting. in the Wine Configuration window that loads after a minute, click on the Libraries tab. now, you will have to set three overrides. type the .dll file-name (see below) into the text box under "New overrides for library:" click add and it will appear in the "Existing overrides:" list below. select each one, then, click on the "Edit..." button to change the "Load order" to the correct setting.
.dll file-names:
"gameux" (disabled)
"msvcr71" (native)
"msxml3r" (native). <=this is not a typo. click Apply, then OK.
the final step is to make a few changes to the Options in the Wineskin Advanced window. make certain to uncheck "Map User Mac OS X folders in wrapper" as this will keep all of the game saves and mods contained inside the civ4tbs319.app that you are building instead of spread all over your documents folder. i also check "Option key works as Alt" and "Try to shutdown nicely".
addendum z: ugly font fix.
don't worry about this step, because i already did it for you;p just leaving it up for reference.
drag the civ4bts319.app to the desktop and paste this last code into a terminal:
press return. this will fix an ugly font problem. credits to guspasho.
note1: you do not need Xcode for Lion or Snow Leopard users. if you run snow leopard or lion, the mountain lion instructions should work just as well, except that you don't have to install Xcode first as it is included in your OS build. it's really that easy; everything else should remain the same.
note2: if you are streaming any content, this can cause the download to fail, so turn off pandora for a few minutes;p
note3: strictly speaking, you don’t need all of the d3dx9 files. only d3dx9_26.dll, d3dx9_31.dll, d3dx9_32.dll, d3dx9_33.dll are required, but it’s easier doing it this way.
note4: if you select Single Player => Beyond the Sword Content with a mod loaded, you might crash to desktop. so don’t do it!
ephemera: fullscreen cursor fix
update: using the NoXInput2 version of wine should alleviate most problems with the cursor, making this fix obsolete.
i don’t like to play civ4 in fullscreen mode; it runs much better in a window. one of the problems with fullscreen is that the cursor wants to be a spinning globe or hand instead of a pointer, which i find rather annoying. i have a quick and dirty terminal fix for it:
step 1: Download (and install) helper apps.
Xcode View in Mac App Store (lion and snow leopard users, see note1)
Wineskin Winery (click me to download)
Civ4 Beyond the Sword v3.19 Patch Download File
Microsoft XML Parser 3 Download Now CNET Secure Download
once everything is downloaded, open a Terminal window and copy paste in these commands, then press enter:
mkdir ~/Library/Caches/winetricks ; mkdir ~/Library/Caches/winetricks/msxml3 ; mv ~/Downloads/msxml3.msi ~/Library/Caches/winetricks/msxml3/

Spoiler :
in case you are unfamiliar with the terminal, i'll explain what is happening. the mkdir command makes a new directory (or folder in mac parlance). so the first two parts are creating folders named "winetricks" and "msxml3" in your Cache folder in the Library. the last part is to move (mv) the downloaded file "msxml3.msi" into the new folder. the "~" at the beginning of each line tells the computer to look inside your current user's home directory. the 3 commmands are separated by semi-colons ; like this one.
step 2: Wineskin Winery, creating your CoolNewWrapper.



launch the wineskin_winery.app and click the "+" sign to install a new engine, then download WS9Wine1.4.1NoXInput2. next, update your wrapper version to 2.5.9 and then click Create New Blank Wrapper. choose a name, for this guide use civ4bts319 (you can change this later) and click OK. during this process, you will be prompted to install Gecko, but click cancel to skip it.
when everything is finished, click Reveal in Finder to see your wrapper. make sure you quit the wineskin_winery.app, then double-click your new wrapper, and choose Advanced.

Step 3: Winetricks, installing missing libraries.

after clicking on Advanced, choose Tools from the top of the menu, then click on Winetricks. next, click Update Winetricks in the lower-left of the window. then, in the middle of the screen you will see a checkbox next to Custom. click this, and then where you see (arguments) copy and paste in this line.
vcrun6 msxml3 msxml4 directx9 dotnet11 dotnet11sp1 vcrun2003 quartz devenum vcrun6sp6 corefonts tahoma
there are a few ways to do this step, and as stupid as this method sounds, it's easy.
click Run (twice), and then you just have to agree to the licenses, although one of them is in german (click ja for yes).
after winetricks has run, run it again. not everything will take on the first try. and then run it a third time;p
i'm serious! keep running the command until all you see in the output terminal is "already installed, skipping". it took me 5 tries.

Step 4: Config Utillity, setting overrides and options.
you should be back at the Wineskin Advanced settings window. look for the Config Utility (winecfg) button under the Wine Tools sublisting. in the Wine Configuration window that loads after a minute, click on the Libraries tab. now, you will have to set three overrides. type the .dll file-name (see below) into the text box under "New overrides for library:" click add and it will appear in the "Existing overrides:" list below. select each one, then, click on the "Edit..." button to change the "Load order" to the correct setting.
.dll file-names:
"gameux" (disabled)
"msvcr71" (native)
"msxml3r" (native). <=this is not a typo. click Apply, then OK.

the final step is to make a few changes to the Options in the Wineskin Advanced window. make certain to uncheck "Map User Mac OS X folders in wrapper" as this will keep all of the game saves and mods contained inside the civ4tbs319.app that you are building instead of spread all over your documents folder. i also check "Option key works as Alt" and "Try to shutdown nicely".

addendum z: ugly font fix.
don't worry about this step, because i already did it for you;p just leaving it up for reference.
drag the civ4bts319.app to the desktop and paste this last code into a terminal:
cp ~/Desktop/civ4bts319.app/Contents/Resources/drive_c/Program\ Files/2K\ Games/Firaxis\ Games/Sid\ Meier\'s\ Civilization\ 4\ Complete/Assets/res/Fonts/sylfaen.ttf ~/Desktop/civ4bts319.app/Contents/Resources/drive_c/windows/Fonts/
press return. this will fix an ugly font problem. credits to guspasho.
note1: you do not need Xcode for Lion or Snow Leopard users. if you run snow leopard or lion, the mountain lion instructions should work just as well, except that you don't have to install Xcode first as it is included in your OS build. it's really that easy; everything else should remain the same.
note2: if you are streaming any content, this can cause the download to fail, so turn off pandora for a few minutes;p
note3: strictly speaking, you don’t need all of the d3dx9 files. only d3dx9_26.dll, d3dx9_31.dll, d3dx9_32.dll, d3dx9_33.dll are required, but it’s easier doing it this way.
note4: if you select Single Player => Beyond the Sword Content with a mod loaded, you might crash to desktop. so don’t do it!
ephemera: fullscreen cursor fix
update: using the NoXInput2 version of wine should alleviate most problems with the cursor, making this fix obsolete.
i don’t like to play civ4 in fullscreen mode; it runs much better in a window. one of the problems with fullscreen is that the cursor wants to be a spinning globe or hand instead of a pointer, which i find rather annoying. i have a quick and dirty terminal fix for it:
Spoiler :
drag the civ4bts319.app to the desktop and open a terminal. cd (change directory) to where the cursor .ani files are stored, by default it should look like this
once you get to the correct directory, copy and paste in the following code and press enter.cd ~/Desktop/civ4bts319.app/Contents/Resources/drive_c/Program\ Files/2K\ Games/Firaxis\ Games/Sid\ Meier\'s\ Civilization\ 4\ Complete/Assets/res/Cursors/
mkdir backup ; cp *.ani backup/ ; rm -v *.ani ; cp backup/Pointer.ani Pointer.ani ; cp Pointer.ani Airbomb.ani ; cp Pointer.ani Airlift.ani ; cp Pointer.ani Airstrike.ani ; cp Pointer.ani Build.ani ; cp Pointer.ani BuildLarge.ani ; cp Pointer.ani Claim.ani ; cp Pointer.ani Deplete.ani ; cp Pointer.ani Edit.ani ; cp Pointer.ani EMP.ani ; cp Pointer.ani Found.ani ; cp Pointer.ani GoTo.ani ; cp Pointer.ani Grip.ani ; cp Pointer.ani Link.ani ; cp Pointer.ani Mine.ani ; cp Pointer.ani Move.ani ; cp Pointer.ani Mutiny.ani ; cp Pointer.ani Nuke.ani ; cp Pointer.ani Ping.ani ; cp Pointer.ani Rebase.ani ; cp Pointer.ani Recon.ani ; cp Pointer.ani Repair.ani ; cp Pointer.ani RouteTo.ani ; cp Pointer.ani 'Size All.ani' ; cp Pointer.ani 'Size Diagonal 1.ani' ; cp Pointer.ani 'Size Diagonal 2.ani' ; cp Pointer.ani 'Size H.ani' ; cp Pointer.ani 'Size V.ani' ; cp Pointer.ani 'Split H.ani' ; cp Pointer.ani 'Split V.ani' ; cp Pointer.ani Stasis.ani ; cp Pointer.ani Waiting.ani
old instructions for lion 10.7 are here. they are a little less elegant, but will do the job;p