You are here    Supported software    Civilization IV: Complete Edition nl sv ru pl es de fr

Civilization IV: Complete Edition

Informations

Creator Message
alcorsepol Anonymous

Information

This installer has been approved by the team.

Informations

Platforms:
Downloads: 52979
Wine: 1.7.55

Feedbacks

Description

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

Screenshots

MiniatureMiniatureMiniature

Source code

#!/bin/bash
# Date : (2013-06-26)
# Last revision : (2015-12-06)
# Wine version used : 1.7.55
# Distribution used to test : xUbuntu 15.10
# Author : Jimmy Ramsmark
# 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="Jimmy Ramsmark"
PREFIX="Civilization4"
WORKINGWINEVERSION="1.7.55"
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
alcorsepol Saturday 29 July 2017 at 18:15
alcorsepol Anonymous

Warning

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

Message

Maintenance done. Please update the main script with the attached improvements.

Tested with both steam and dvd (same dvd as with first version of the script).

Differences

@@ -1,18 +1,18 @@
 #!/bin/bash
 # Date : (2013-06-26)
-# Last revision : (2015-12-06)
-# Wine version used : 1.7.55
-# Distribution used to test : xUbuntu 15.10
+# Last revision : (2017-07-28)
+# Wine version used : 2.13-staging
+# Distribution used to test : xUbuntu 16.04
 # Author : Jimmy Ramsmark
 # 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.
-
+# 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"
@@ -20,43 +20,43 @@
 TITLECOL="Civilization IV - Colonization"
 AUTHOR="Jimmy Ramsmark"
 PREFIX="Civilization4"
-WORKINGWINEVERSION="1.7.55"
+WORKINGWINEVERSION="2.13-staging"
 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"
@@ -65,31 +65,31 @@
     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;"
@@ -102,7 +102,7 @@
     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

New source code

#!/bin/bash
# Date : (2013-06-26)
# Last revision : (2017-07-28)
# Wine version used : 2.13-staging
# Distribution used to test : xUbuntu 16.04
# Author : Jimmy Ramsmark
# Licence : GPLv3
# Depend : msxml3, d3dx9
 
# 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="Jimmy Ramsmark"
PREFIX="Civilization4"
WORKINGWINEVERSION="2.13-staging"
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

Replies

Anonymous
Sunday 30 July 2017 at 7:32 -
Hi, I tested the new version, it works for me. I also did a bunch of work on a patch for FFH2 support. It seems to be working for all combinations of options, although, I don't have the DVD so I can't test it that way afaik. I put my version in this gist, let me know what you think: https://gist.github.com/cbeck88/03f04bb5dbe62f564fe8112182f8a47b
Anonymous
Sunday 30 July 2017 at 14:29 -
Cool. I will test it as soon as I can (Today or sometime the coming week). It looks good and I'm pretty sure we can go with it, although it would be nice if we could solve the "hacks" in the future. Also the files will have to be hosted at POL (I think they can help us with that).
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.
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

alcorsepol Sunday 6 December 2015 at 1:30
alcorsepol Anonymous

Information

This update has been approved by the team.

Message

Updated for newer wine version and tested.

Works much better now and doesn't crash anymore on the first attempt to start after installation.

It's important to keep up with the Wine version since Steam changes and will eventually not work properly anymore when innstalling through Steam.

I intend to make some more improvements in an attempt to automate the installation even further, but for now these changes will have to do.
 

Differences

@@ -1,8 +1,8 @@
 #!/bin/bash
 # Date : (2013-06-26)
-# Last revision : (2013-07-23)
-# Wine version used : 1.4.1
-# Distribution used to test : xUbuntu 13.10
+# Last revision : (2015-12-06)
+# Wine version used : 1.7.55
+# Distribution used to test : xUbuntu 15.10
 # Author : Jimmy Ramsmark
 # Licence : GPLv3
 # Depend : msxml3, d3dx9
@@ -20,7 +20,7 @@
 TITLECOL="Civilization IV - Colonization"
 AUTHOR="Jimmy Ramsmark"
 PREFIX="Civilization4"
-WORKINGWINEVERSION="1.4.1"
+WORKINGWINEVERSION="1.7.55"
 STEAM_ID_CIV="3900"
 STEAM_ID_W="3990"
 STEAM_ID_BTS="8800"
@@ -70,7 +70,7 @@
     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"
 
@@ -104,6 +104,6 @@
 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_message "$(eval_gettext 'Installation finished\n')" "$TITLECIV"
 POL_SetupWindow_Close
 exit 0
\ No newline at end of file

New source code

#!/bin/bash
# Date : (2013-06-26)
# Last revision : (2015-12-06)
# Wine version used : 1.7.55
# Distribution used to test : xUbuntu 15.10
# Author : Jimmy Ramsmark
# 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="Jimmy Ramsmark"
PREFIX="Civilization4"
WORKINGWINEVERSION="1.7.55"
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

Replies

Anonymous
Saturday 3 December 2016 at 23:25 -
Hi! Would it be possible to add the option for GOG install?
Anonymous
Tuesday 25 July 2017 at 10:59 -
Hello! I have never used GOG before. But if you can provide me with an account that has the game, then I can give it a try.

Edited by petch

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,9 +1,9 @@
 #!/bin/bash
 # Date : (2013-06-26)
-# Last revision : (2013-07-23)
-# Wine version used : 1.4.1
-# Distribution used to test : xUbuntu 13.10
-# Author : Jimmy Ramsmark
+# Last revision : (2015-11-21)
+# Wine version used : 1.7.51
+# Distribution used to test : xUbuntu 13.10,Ubuntu 15.04 64bit
+# Author : Jimmy Ramsmark (original script),LinuxScripter (fixes)
 # Licence : GPLv3
 # Depend : msxml3, d3dx9
 
@@ -18,9 +18,9 @@
 TITLEBTS="Civilization IV - Beyond The Sword"
 TITLEW="Civilization IV - Warlords"
 TITLECOL="Civilization IV - Colonization"
-AUTHOR="Jimmy Ramsmark"
+AUTHOR="Jimmy Ramsmark and LinuxScripter"
 PREFIX="Civilization4"
-WORKINGWINEVERSION="1.4.1"
+WORKINGWINEVERSION="1.7.51"
 STEAM_ID_CIV="3900"
 STEAM_ID_W="3990"
 STEAM_ID_BTS="8800"
@@ -42,7 +42,7 @@
     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

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 : Jimmy 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="Jimmy 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 : (
petch Sunday 26 April 2015 at 23:30
petch
Developer

Warning

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

Message

Host the patch

Differences

@@ -59,7 +59,7 @@
 
     #Patch Civilization IV: Beyond the sword to 3.19
     cd "$POL_USER_ROOT/tmp"
-    POL_Download "http://ayu.alcor.se/files/Civ4BeyondTheSwordPatch3.19.exe" "c45f6e028f51db2386120a5861eabe7c"
+    POL_Download "http://files.playonlinux.com/Civ4BeyondTheSwordPatch3.19.exe" "c45f6e028f51db2386120a5861eabe7c"
     POL_Wine_WaitBefore "$TITLECIV"
     POL_Wine Civ4BeyondTheSwordPatch3.19.exe
     POL_Wine_WaitExit "$TITLECIV"

New source code

#!/bin/bash
# Date : (2013-06-26)
# Last revision : (2013-07-23)
# Wine version used : 1.4.1
# Distribution used to test : xUbuntu 13.10
# Author : Jimmy Ramsmark
# 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="Jimmy Ramsmark"
PREFIX="Civilization4"
WORKINGWINEVERSION="1.4.1"
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\nThe game might crash on the first attempt, but no worries, just try one more time.')" "$TITLECIV"
POL_SetupWindow_Close
exit 0

Replies

Anonymous
Wednesday 25 November 2015 at 12:53 -
Awesome. My server went offline when I moved and I forgot to put this file up again :).