The forum

[script] Civilization 3

Author Replies
marco_g Monday 24 May 2010 at 13:47
marco_gAnonymous

Here is a script to install Civilization 3. Unfortunately the game has to run in a virtual desktop and the menus are very slow. Does this have to be documented somewhere?

#!/bin/bash
# Date : (2010-05-29)
# Last revision : (2010-05-29)
# Wine version used : 1.0.1
# Distribution used to test : Ubuntu 9.10
# Author : Marco Gerards
# Licence : GPLv3
# Depend : none

# Tested with Civilization 3, version 1.07f

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

TITLE="Civilization 3"
AUTHOR="Marco Gerards"
PREFIX="Civilization3"
PREFIXDIR="$REPERTOIRE/wineprefix/$PREFIX"
WORKINGWINEVERSION="1.0.1"


POL_SetupWindow_make_icon_for_shortcut()
{
convert "$HOME/.local/share/icons/$2" -geometry 32X32 "$REPERTOIRE/icones/32/$1"
}

wget http://upload.wikimedia.org/wikipedia/en/7/7a/Civilization_III_Coverart.png --output-document="$REPERTOIRE/tmp/leftnotscaled.png"
convert "$REPERTOIRE/tmp/leftnotscaled.png" -scale 150x356\\! "$REPERTOIRE/tmp/left.jpeg"
POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.jpeg"

POL_SetupWindow_presentation "$TITLE" "Firaxis" "http://www.firaxis.com/" "$AUTHOR" "$PREFIX"
select_prefix "$PREFIXDIR"

# Let the user select a CDROM
POL_SetupWindow_cdrom

# Check if this CDROM is the Civilization 3 CDROM
POL_SetupWindow_check_cdrom "/Civilization3.exe"

POL_SetupWindow_install_wine "$WORKINGWINEVERSION"

Use_WineVersion "$WORKINGWINEVERSION"

POL_SetupWindow_prefixcreate

cat <<EOF >>"$WINEPREFIX/drive_c/Civilization3.iss"

[InstallShield Silent]
Version=v6.00.000
File=Response File

[File Transfer]
OverwrittenReadOnly=NoToAll

[{0AD84416-63A4-4CF3-BDDF-8FA866711FB0}-DlgOrder]
Dlg0={0AD84416-63A4-4CF3-BDDF-8FA866711FB0}-SdWelcome-0
Count=8
Dlg1={0AD84416-63A4-4CF3-BDDF-8FA866711FB0}-SdLicense-0
Dlg2={0AD84416-63A4-4CF3-BDDF-8FA866711FB0}-AskYesNo-0
Dlg3={0AD84416-63A4-4CF3-BDDF-8FA866711FB0}-SdAskDestPath-0
Dlg4={0AD84416-63A4-4CF3-BDDF-8FA866711FB0}-SdSetupTypeEx-0
Dlg5={0AD84416-63A4-4CF3-BDDF-8FA866711FB0}-SdSelectFolder-0
Dlg6={0AD84416-63A4-4CF3-BDDF-8FA866711FB0}-MessageBox-0
Dlg7={0AD84416-63A4-4CF3-BDDF-8FA866711FB0}-SdFinish-0

[{0AD84416-63A4-4CF3-BDDF-8FA866711FB0}-SdWelcome-0]
Result=1

[{0AD84416-63A4-4CF3-BDDF-8FA866711FB0}-SdLicense-0]
Result=1

[{0AD84416-63A4-4CF3-BDDF-8FA866711FB0}-AskYesNo-0]
Result=1

[{0AD84416-63A4-4CF3-BDDF-8FA866711FB0}-SdAskDestPath-0]
szDir=C:\\Program Files\\Infogrames Interactive\\Civilization III
Result=1

[{0AD84416-63A4-4CF3-BDDF-8FA866711FB0}-SdSetupTypeEx-0]
Result=Typical

[{0AD84416-63A4-4CF3-BDDF-8FA866711FB0}-SdSelectFolder-0]
szFolder=Civilization III
Result=1

[Application]
Name=Civilization III
Version=1.00f
Company=Infogrames Interactive
Lang=0009

[{0AD84416-63A4-4CF3-BDDF-8FA866711FB0}-MessageBox-0]
Result=1

[{0AD84416-63A4-4CF3-BDDF-8FA866711FB0}-SdFinish-0]
Result=1
bOpt1=0
bOpt2=0

EOF

# Run the installer
POL_SetupWindow_wait_next_signal "Installing game..." "$TITLE"
wine "$CDROM/setup.exe" -s -f1"C:\\Civilization3.iss" 
POL_SetupWindow_detect_exit

Set_Desktop "On" "1024" "768"

PROGRAMFILES="Program Files" 
POL_LoadVar_PROGRAMFILES

cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Infogrames Interactive/Civilization III"
cp LSANS.TTF LSANS.fot

Set_SoundDriver "oss"

# Make a short cut
POL_SetupWindow_make_icon_for_shortcut "$TITLE" "*_civilization3.0.xpm"
POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/Infogrames Interactive/Civilization III" "Civilization3.exe" "" "$TITLE"
Set_WineVersion_Assign "$WORKINGWINEVERSION" "$TITLE"

# Done!
POL_SetupWindow_message "$TITLE installed.\\n\\nPlease note that the user interface is very slow in the main menu."

POL_SetupWindow_Close
exit

Edited by marco_g

NSLW Tuesday 25 May 2010 at 9:20
NSLW

What's that?
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Infogrames Interactive/Civilization III"
cp LSANS.TTF LSANS.fot

Unfortunately the game has to run in a virtual desktop and the menus are very slow. Does this have to be documented somewhere?

Quote

If you wish you can add info message about mouse behaviour


Does the game need NO-CD?
marco_g Saturday 29 May 2010 at 18:45
marco_gAnonymous

What's that?

cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Infogrames Interactive/Civilization III"
cp LSANS.TTF LSANS.fot

Quote from NSLW


This is a work around for http://bugs.winehq.org/show_bug.cgi?id=3498


Unfortunately the game has to run in a virtual desktop and the menus are very slow. Does this have to be documented somewhere?

Quote

If you wish you can add info message about mouse behaviour

Quote from NSLW


I have added a message to the updated script above.


Does the game need NO-CD?

Quote from NSLW


No, this is not required for this game or any of the games for which I created a script.

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