Description:This script installs Civilization IV: Complete according to the following order:
1: d3dx9
2: Civ IV: Complete
3: Patch 3.19 (This will be done automatically if Steam is used)
4: Override for msxml3 and msvcr71
5: msxml3
It creates an icon for all three versions of the game.
Extra notes:
If you find any bugs or have any improvements that you would like to suggest, then please let me know!
When the installation has finished, Civilization IV and the Warlords expansion might crash on the first try, but don't worry, just let it crash and then try again and it will work (Beyond the sword does not crash). This information is also available in the script when installing, so you will get reminded of this.
There's already a script available for Civilization IV, but it's old and doesn't work correctly on the Complete edition it seems. This one is updated, uses a newer version of Wine and has been tested and tailored to make sure that everything works directly after installation :)
Like I mentioned, of you see anything that I have forgotten or that can be improved, then please let me know!
Screenshots:Screenshot 1

Screenshot 2

Screenshot 3
Install images:Left

Top
Icons:22x22 - For the POL List

48x48 - For the Civilization IV shortcut

48x48 - For the Warlords shortcut

48x48 - For the Colonization shortcut

48x48 - For the Beyond The Sword shortcut
Code:[code language=playonlinux]
#!/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"
TITLECIV="Civilization IV"
TITLE="Civilization IV: Complete"
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_SetupWindow_Init
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://ayu.alcor.se/files/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" "" "-applaunch $STEAM_ID_CIV" "Game;StrategyGame;"
POL_Shortcut "Steam.exe" "$TITLEBTS" "" "-applaunch $STEAM_ID_BTS" "Game;StrategyGame;"
POL_Shortcut "Steam.exe" "$TITLEW" "" "-applaunch $STEAM_ID_W" "Game;StrategyGame;"
POL_Shortcut "Steam.exe" "$TITLECOL" "" "-applaunch $STEAM_ID_COL" "Game;StrategyGame;"
POL_Shortcut "Steam.exe" "Steam - Civ IV" "" "" "Game;"
else
POL_Shortcut "Civilization4.exe" "$TITLECIV" "" "" "Game;StrategyGame;"
POL_Shortcut "Civ4BeyondSword.exe" "$TITLEBTS" "" "" "Game;StrategyGame;"
POL_Shortcut "Civ4Warlords.exe" "$TITLEW" "" "" "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
[/code]
Editiert von: alcorsepol