Civilization IV: Complete Edition

Informations

Creator Message
alcorsepol Anonymous

Information

This installer has been approved by the team.

Informations

Platforms:
Downloads: 90413
Wine: 3.0.3

Feedbacks

Description

Civilization IV is a turn-based game in which the player builds an empire from very limited initial resources.

Appdb.winehq.org

Screenshots

MiniatureMiniatureMiniature

Source code

#!/bin/bash
# Date : (2013-06-26)
# Last revision : see changelog
# Wine version used : 
# Distribution used to test : xUbuntu 16.04
# Licence : GPLv3
# Depend : msxml3, d3dx9
#
# CHANGELOG
# [?] (2013-06-26)
#   Initial script.
# [?] (2017-07-28)
#   ? 
# [Dadu042] (2020-01-22 21:30)
#   Wine 2.13-staging -> 3.0.3.

 
# This script was tested using the DVD version of `Civilization IV: Complete'
# version 1.74, bought in Sweden in 2011.
 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
TITLE="Civilization IV: Complete Edition"
TITLECIV="Civilization IV"
TITLEBTS="Civilization IV - Beyond The Sword"
TITLEW="Civilization IV - Warlords"
TITLECOL="Civilization IV - Colonization"
AUTHOR=""
PREFIX="Civilization4"
WORKINGWINEVERSION="3.0.3"
STEAM_ID_CIV="3900"
STEAM_ID_W="3990"
STEAM_ID_BTS="8800"
STEAM_ID_COL="16810"
 
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
 
POL_SetupWindow_Init
POL_SetupWindow_SetID 1779
POL_Debug_Init
 
POL_SetupWindow_presentation "$TITLE" "Firaxis Games" "http://www.firaxis.com/" "$AUTHOR" "$PREFIX"
POL_Wine_SelectPrefix "$PREFIX"
 
POL_SetupWindow_InstallMethod "DVD,STEAM"
 
if [ "$INSTALL_METHOD" == "DVD" ]; then
    # Let the user select a DVD
    POL_SetupWindow_cdrom
 
    # Check if this DVD is the Civilization IV DVD
    POL_SetupWindow_check_cdrom "Autorun/Civ4Installer.ico"
fi
 
# Set and install the correct Wine version
POL_Wine_PrefixCreate "$WORKINGWINEVERSION"
 
# Install DirectX9
POL_Call POL_Install_d3dx9
 
if [ "$INSTALL_METHOD" == "DVD" ]; then
    # Run installer
    POL_Wine_WaitBefore "$TITLECIV"
    POL_Wine start /unix "$CDROM/setup.exe"
    POL_Wine_WaitExit "$TITLECIV"
 
    # Patch Civilization IV: Beyond the sword to 3.19
    cd "$POL_USER_ROOT/tmp"
    POL_Download "http://files.playonlinux.com/Civ4BeyondTheSwordPatch3.19.exe" "c45f6e028f51db2386120a5861eabe7c"
    POL_Wine_WaitBefore "$TITLECIV"
    POL_Wine Civ4BeyondTheSwordPatch3.19.exe
    POL_Wine_WaitExit "$TITLECIV"
else
    POL_Call POL_Install_steam
 
    # Start steam, update it, and install the games
    cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
    POL_Wine start /unix "Steam.exe" steam://install/$STEAM_ID_CIV
    POL_SetupWindow_message "$(eval_gettext 'Steam is about to perform an update.\nAfter Steam finishes updating and shows you to the login interface, login and then let $TITLE install.\n\nWhen the installation is finished, press next (Do not close Steam)')" "$TITLECIV"
 
    POL_Wine start /unix "Steam.exe" steam://install/$STEAM_ID_W
    POL_SetupWindow_message "$(eval_gettext 'Steam is installing $TITLEW, press next when the installation is finished')" "$TITLECIV"
 
    POL_Wine start /unix "Steam.exe" steam://install/$STEAM_ID_BTS
    POL_SetupWindow_message "$(eval_gettext 'Steam is installing $TITLEBTS, press next when the installation is finished')" "$TITLECIV"
 
    POL_Wine start /unix "Steam.exe" steam://install/$STEAM_ID_COL
    POL_SetupWindow_message "$(eval_gettext 'Steam is installing $TITLECOL, please quit Steam properly when the installation is finished (make sure Steam is not still in the traybar) and then press next so that the installation script can continue.')" "$TITLECIV"
    POL_Wine_WaitExit "$TITLECIV"
fi
 
# Install msxml3.msi
# Override for msxml3 is needed before the install
# The msvcr71 one is just there so that mods will work later on
 
POL_Wine_OverrideDLL "native" "msxml3"
POL_Wine_OverrideDLL "builtin" "msvcr71"
POL_Call POL_Install_msxml3
 
#Create shortcuts
if [ "$INSTALL_METHOD" == "STEAM" ]; then
    POL_Shortcut "Steam.exe" "$TITLECIV" "$TITLECIV.png" "-applaunch $STEAM_ID_CIV" "Game;StrategyGame;"
    POL_Shortcut "Steam.exe" "$TITLEBTS" "$TITLEBTS.png" "-applaunch $STEAM_ID_BTS" "Game;StrategyGame;"
    POL_Shortcut "Steam.exe" "$TITLEW" "$TITLEW.png" "-applaunch $STEAM_ID_W" "Game;StrategyGame;"
    POL_Shortcut "Steam.exe" "$TITLECOL" "$TITLECOL.png" "-applaunch $STEAM_ID_COL" "Game;StrategyGame;"
    POL_Shortcut "Steam.exe" "Steam - Civ IV" "" "" "Game;"
else
    POL_Shortcut "Civilization4.exe" "$TITLECIV" "$TITLECIV.png" "" "Game;StrategyGame;"
    POL_Shortcut "Civ4BeyondSword.exe" "$TITLEBTS" "$TITLEBTS.png" "" "Game;StrategyGame;"
    POL_Shortcut "Civ4Warlords.exe" "$TITLEW" "$TITLEW.png" "" "Game;StrategyGame;"
fi
 
#Done!
POL_SetupWindow_message "$(eval_gettext 'Installation finished\n')" "$TITLECIV"
POL_SetupWindow_Close
exit 0

Contributions

Filters:

Contribute
Member Message
pepebuho Saturday 24 March 2018 at 4:27
pepebuho Anonymous

Message

Hi.

Could you update the script to install from GamersGate?

Thanks

Replies

iceiceice Tuesday 18 July 2017 at 3:06
iceiceice Anonymous

Message

Hi,

 

I used this installer for Civilization IV for years, thank you PlayOnLinux for creating it! It works great.

 

However, about a week ago it stopped working. The reason is, I install using the steam store purchase of the game, and the new steam update is broken with the wine 1.7.55 used in this package.

 

There is a bug report and a patch here:

 

https://www.playonlinux.com/en/topic-15336.html

 

To get the installer to work now with steam, I had to update the Wine version in the script: "2.12-staging". Since that wine has the patch described in the bug report. With that change to the script, the game installs and runs for me in Ubuntu 16.04.

 

It may be good to make a permanent change to the wine version in the script? I hope the maintainer will see this message.

Replies

Anonymous
Monday 24 July 2017 at 10:03
Just registered to be able to say thank you for this fix. Thank you!
Anonymous
Monday 24 July 2017 at 10:08
Thanks for the fix. I will make sure to update and do some maintenance work on the script shortly :-)
Anonymous
Tuesday 25 July 2017 at 11:22
Hi, so actually, having looked into your script, I didn't realize it would be so approachable. I guess I imagined that this would all be really horrible like debian packaging or something.
Anonymous
Tuesday 25 July 2017 at 11:29
So one thing that occurs to me is that I almost never actually play the vanilla Civ 4, I always play a mod called Fall from Heaven 2. It's a little bit annoying to install mods in the play on linux prefix by hand, mainly because if I use the command line I have to figure out how to use the right wine version for that prefix. I wonder how hard it would be to add Fall From Heaven install to your POL script though? If I did the work would you be interested in adding that as an option? Is it better if I fork the script and make a different POL item? Let me know what you think. The install instructions are here: https://forums.civfanatics.com/threads/how-to-install-ffh2.324731/ If I can use POL_WINE to run the installer, and there is some form of POL_WGET or something to fetch the installers for the mod, then I don't think this should be very hard. I'd have to check to see if the installers for the mod can take arguments at command-line and avoid user interaction.
Anonymous
Tuesday 25 July 2017 at 13:17
This sounds interesting. I don't see why we couldn't try doing this. I will take a look at it after I have done the regular maintenance work on the script (so that it can be used by regular users in the meantime). You could write an install script as stand-alone in the meantime if you want (for POL) so that we can easily integrate it later.
Anonymous
Sunday 8 April 2018 at 0:56
Sorry for not responding to this in a long time, stuff came up. I have looked at your script and decided that it may be best if we keep them separate. It makes maintaining them easier (since I don't update this script very often these days). And it feels a bit more logical since there are so many other mods out there, and if we add one then people might want us to add more.So I would suggest that we make it work with the main script, but keep them separate.
Grubshka Friday 17 February 2017 at 15:43
Grubshka Anonymous

Message

Everything is working well.

However, after installation, I had an error running the game : "caught unhandled exception creating xml parser object".
I reinstalled msxml3 from POL and it solved the problem !

Replies

djg Saturday 13 February 2016 at 9:32
djg Anonymous

Message

Script worked great for me. Mint 17.2 with Civ4 Complete DVD. Installed and running single player mode.

Replies

LinuxScripter Saturday 21 November 2015 at 8:45
LinuxScripter Anonymous

Warning

This update has not been approved yet by the team.
Use it at your own risk

Message

Once I select the DVD the installator shows the "unable to find the CD-ROM" error. This is because the PoL is looking for file that dosen't exist on the disc. (Civ4Installer.ico)

I'm uploading the fixes to the script.

PS:Just in case you were wondering, I was using original Civilization 4 Complete Edition disc bought in Poland in 2013.

Differences

@@ -1,72 +1,63 @@
 #!/bin/bash
 # Date : (2013-06-26)
-# Last revision : see changelog
-# Wine version used : 
-# Distribution used to test : xUbuntu 16.04
-# Author : Jinny Ramsmark
+# Last revision : (2015-11-21)
+# Wine version used : 1.7.51
+# Distribution used to test : xUbuntu 13.10,Ubuntu 15.04 64bit
+# Author : Jinny Ramsmark (original script),LinuxScripter (fixes)
 # Licence : GPLv3
 # Depend : msxml3, d3dx9
-#
-# CHANGELOG
-# [Jinny Ramsmark] (2013-06-26)
-#   Initial script.
-# [?] (2017-07-28)
-#   ?
-# [Dadu042] (2020-01-22 21:30)
-#   Wine 2.13-staging -> 3.0.3.
 
- 
 # This script was tested using the DVD version of `Civilization IV: Complete'
-# version 1.74, bought in Sweden in 2011.
- 
+# version 1.74, bought in the Sweden in 2011.
+
 [ "$PLAYONLINUX" = "" ] && exit 0
 source "$PLAYONLINUX/lib/sources"
- 
+
 TITLE="Civilization IV: Complete Edition"
 TITLECIV="Civilization IV"
 TITLEBTS="Civilization IV - Beyond The Sword"
 TITLEW="Civilization IV - Warlords"
 TITLECOL="Civilization IV - Colonization"
-AUTHOR="Jinny Ramsmark"
+AUTHOR="Jinny Ramsmark and LinuxScripter"
 PREFIX="Civilization4"
-WORKINGWINEVERSION="3.0.3"
+WORKINGWINEVERSION="1.7.51"
 STEAM_ID_CIV="3900"
 STEAM_ID_W="3990"
 STEAM_ID_BTS="8800"
 STEAM_ID_COL="16810"
- 
+
 POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
- 
+
 POL_SetupWindow_Init
 POL_SetupWindow_SetID 1779
 POL_Debug_Init
- 
+
 POL_SetupWindow_presentation "$TITLE" "Firaxis Games" "http://www.firaxis.com/" "$AUTHOR" "$PREFIX"
 POL_Wine_SelectPrefix "$PREFIX"
- 
+
 POL_SetupWindow_InstallMethod "DVD,STEAM"
- 
+
 if [ "$INSTALL_METHOD" == "DVD" ]; then
     # Let the user select a DVD
     POL_SetupWindow_cdrom
- 
+
     # Check if this DVD is the Civilization IV DVD
-    POL_SetupWindow_check_cdrom "Autorun/Civ4Installer.ico"
+    POL_SetupWindow_check_cdrom "autorun.exe"
 fi
- 
+
 # Set and install the correct Wine version
 POL_Wine_PrefixCreate "$WORKINGWINEVERSION"
- 
+
 # Install DirectX9
 POL_Call POL_Install_d3dx9
- 
+
 if [ "$INSTALL_METHOD" == "DVD" ]; then
     # Run installer
     POL_Wine_WaitBefore "$TITLECIV"
     POL_Wine start /unix "$CDROM/setup.exe"
     POL_Wine_WaitExit "$TITLECIV"
- 
-    # Patch Civilization IV: Beyond the sword to 3.19
+
+    #Patch Civilization IV: Beyond the sword to 3.19
     cd "$POL_USER_ROOT/tmp"
     POL_Download "http://files.playonlinux.com/Civ4BeyondTheSwordPatch3.19.exe" "c45f6e028f51db2386120a5861eabe7c"
     POL_Wine_WaitBefore "$TITLECIV"
@@ -74,7 +65,7 @@
     POL_Wine_WaitExit "$TITLECIV"
 else
     POL_Call POL_Install_steam
- 
+
     # Start steam, update it, and install the games
     cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
     POL_Wine start /unix "Steam.exe" steam://install/$STEAM_ID_CIV
@@ -82,23 +73,23 @@
  
     POL_Wine start /unix "Steam.exe" steam://install/$STEAM_ID_W
     POL_SetupWindow_message "$(eval_gettext 'Steam is installing $TITLEW, press next when the installation is finished')" "$TITLECIV"
- 
+
     POL_Wine start /unix "Steam.exe" steam://install/$STEAM_ID_BTS
     POL_SetupWindow_message "$(eval_gettext 'Steam is installing $TITLEBTS, press next when the installation is finished')" "$TITLECIV"
- 
+
     POL_Wine start /unix "Steam.exe" steam://install/$STEAM_ID_COL
     POL_SetupWindow_message "$(eval_gettext 'Steam is installing $TITLECOL, please quit Steam properly when the installation is finished (make sure Steam is not still in the traybar) and then press next so that the installation script can continue.')" "$TITLECIV"
     POL_Wine_WaitExit "$TITLECIV"
 fi
- 
+
 # Install msxml3.msi
 # Override for msxml3 is needed before the install
 # The msvcr71 one is just there so that mods will work later on
- 
+
 POL_Wine_OverrideDLL "native" "msxml3"
 POL_Wine_OverrideDLL "builtin" "msvcr71"
 POL_Call POL_Install_msxml3
- 
+
 #Create shortcuts
 if [ "$INSTALL_METHOD" == "STEAM" ]; then
     POL_Shortcut "Steam.exe" "$TITLECIV" "$TITLECIV.png" "-applaunch $STEAM_ID_CIV" "Game;StrategyGame;"
@@ -111,8 +102,8 @@
     POL_Shortcut "Civ4BeyondSword.exe" "$TITLEBTS" "$TITLEBTS.png" "" "Game;StrategyGame;"
     POL_Shortcut "Civ4Warlords.exe" "$TITLEW" "$TITLEW.png" "" "Game;StrategyGame;"
 fi
- 
+
 #Done!
-POL_SetupWindow_message "$(eval_gettext 'Installation finished\n')" "$TITLECIV"
+POL_SetupWindow_message "$(eval_gettext 'Installation finished\n\nThe game might crash on the first attempt, but no worries, just try one more time.')" "$TITLECIV"
 POL_SetupWindow_Close
 exit 0
\ No newline at end of file

New source code

#!/bin/bash
# Date : (2013-06-26)
# Last revision : (2015-11-21)
# Wine version used : 1.7.51
# Distribution used to test : xUbuntu 13.10,Ubuntu 15.04 64bit
# Author : Jinny Ramsmark (original script),LinuxScripter (fixes)
# Licence : GPLv3
# Depend : msxml3, d3dx9

# This script was tested using the DVD version of `Civilization IV: Complete'
# version 1.74, bought in the Sweden in 2011.

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Civilization IV: Complete Edition"
TITLECIV="Civilization IV"
TITLEBTS="Civilization IV - Beyond The Sword"
TITLEW="Civilization IV - Warlords"
TITLECOL="Civilization IV - Colonization"
AUTHOR="Jinny Ramsmark and LinuxScripter"
PREFIX="Civilization4"
WORKINGWINEVERSION="1.7.51"
STEAM_ID_CIV="3900"
STEAM_ID_W="3990"
STEAM_ID_BTS="8800"
STEAM_ID_COL="16810"

POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"

POL_SetupWindow_Init
POL_SetupWindow_SetID 1779
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "Firaxis Games" "http://www.firaxis.com/" "$AUTHOR" "$PREFIX"
POL_Wine_SelectPrefix "$PREFIX"

POL_SetupWindow_InstallMethod "DVD,STEAM"

if [ "$INSTALL_METHOD" == "DVD" ]; then
    # Let the user select a DVD
    POL_SetupWindow_cdrom

    # Check if this DVD is the Civilization IV DVD
    POL_SetupWindow_check_cdrom "autorun.exe"
fi

# Set and install the correct Wine version
POL_Wine_PrefixCreate "$WORKINGWINEVERSION"

# Install DirectX9
POL_Call POL_Install_d3dx9

if [ "$INSTALL_METHOD" == "DVD" ]; then
    # Run installer
    POL_Wine_WaitBefore "$TITLECIV"
    POL_Wine start /unix "$CDROM/setup.exe"
    POL_Wine_WaitExit "$TITLECIV"

    #Patch Civilization IV: Beyond the sword to 3.19
    cd "$POL_USER_ROOT/tmp"
    POL_Download "http://files.playonlinux.com/Civ4BeyondTheSwordPatch3.19.exe" "c45f6e028f51db2386120a5861eabe7c"
    POL_Wine_WaitBefore "$TITLECIV"
    POL_Wine Civ4BeyondTheSwordPatch3.19.exe
    POL_Wine_WaitExit "$TITLECIV"
else
    POL_Call POL_Install_steam

    # Start steam, update it, and install the games
    cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
    POL_Wine start /unix "Steam.exe" steam://install/$STEAM_ID_CIV
    POL_SetupWindow_message "$(eval_gettext 'Steam is about to perform an update.\nAfter Steam finishes updating and shows you to the login interface, login and then let $TITLE install.\n\nWhen the installation is finished, press next (Do not close Steam)')" "$TITLECIV"
 
    POL_Wine start /unix "Steam.exe" steam://install/$STEAM_ID_W
    POL_SetupWindow_message "$(eval_gettext 'Steam is installing $TITLEW, press next when the installation is finished')" "$TITLECIV"

    POL_Wine start /unix "Steam.exe" steam://install/$STEAM_ID_BTS
    POL_SetupWindow_message "$(eval_gettext 'Steam is installing $TITLEBTS, press next when the installation is finished')" "$TITLECIV"

    POL_Wine start /unix "Steam.exe" steam://install/$STEAM_ID_COL
    POL_SetupWindow_message "$(eval_gettext 'Steam is installing $TITLECOL, please quit Steam properly when the installation is finished (make sure Steam is not still in the traybar) and then press next so that the installation script can continue.')" "$TITLECIV"
    POL_Wine_WaitExit "$TITLECIV"
fi

# Install msxml3.msi
# Override for msxml3 is needed before the install
# The msvcr71 one is just there so that mods will work later on

POL_Wine_OverrideDLL "native" "msxml3"
POL_Wine_OverrideDLL "builtin" "msvcr71"
POL_Call POL_Install_msxml3

#Create shortcuts
if [ "$INSTALL_METHOD" == "STEAM" ]; then
    POL_Shortcut "Steam.exe" "$TITLECIV" "$TITLECIV.png" "-applaunch $STEAM_ID_CIV" "Game;StrategyGame;"
    POL_Shortcut "Steam.exe" "$TITLEBTS" "$TITLEBTS.png" "-applaunch $STEAM_ID_BTS" "Game;StrategyGame;"
    POL_Shortcut "Steam.exe" "$TITLEW" "$TITLEW.png" "-applaunch $STEAM_ID_W" "Game;StrategyGame;"
    POL_Shortcut "Steam.exe" "$TITLECOL" "$TITLECOL.png" "-applaunch $STEAM_ID_COL" "Game;StrategyGame;"
    POL_Shortcut "Steam.exe" "Steam - Civ IV" "" "" "Game;"
else
    POL_Shortcut "Civilization4.exe" "$TITLECIV" "$TITLECIV.png" "" "Game;StrategyGame;"
    POL_Shortcut "Civ4BeyondSword.exe" "$TITLEBTS" "$TITLEBTS.png" "" "Game;StrategyGame;"
    POL_Shortcut "Civ4Warlords.exe" "$TITLEW" "$TITLEW.png" "" "Game;StrategyGame;"
fi

#Done!
POL_SetupWindow_message "$(eval_gettext 'Installation finished\n\nThe game might crash on the first attempt, but no worries, just try one more time.')" "$TITLECIV"
POL_SetupWindow_Close
exit 0

Replies

Saturday 21 November 2015 at 10:34
The problem is that almost all software DVDs contain an autorun.exe, so that's not specific enough; user could have put just about any DVD in the tray...
I don't have this software though, much less on DVD, so I can't tell what could be better candidate files...
Anonymous
Wednesday 25 November 2015 at 12:51
Haven't used this script in a few years now. Guess it's time to check and update it. LinuxScripter, could you please provide a full listing of the files/folders of your disc? Do a "find ." inside the mounted disc to get a complete listing, and then post it here if possible. Or send it to me via PM. I have a few different versions of Civilization IV so I can compare and find a file that exists in all of them. Thanks! : )
Anonymous
Friday 11 December 2015 at 17:47
@alcorsepol done
Anonymous
Monday 14 December 2015 at 23:48
@LinuxScripter awesome! I will check my other versions of the game and pick a common file for all of them (if any). Either way it should not be solvable :-)
Anonymous
Monday 14 December 2015 at 23:48
it should be solvable* ... there is no edit function on comments : (
Anonymous
Sunday 8 April 2018 at 0:53
Sorry for not responding to this ... in like 3 years. I have started playing around with it now however, and will see if I can solve it since I'm writing some scripts for some other games now anyway.

Edited by Dadu042

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca-notice@playonlinux.com