El Foro

[script] Zeus: Master of Olympus

Autor Respuestas
marco_g Thursday 20 May 2010 at 12:16
marco_gAnonymous

Here is a script to install "Zeus: Master of Olympus". It works perfectly for me. Wine version 1.0.1 is used since other versions can give a black screen some times. Please let me know if something has to be changed.

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

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

TITLE="Zeus: Master of Olympus"
AUTHOR="Marco Gerards"
PREFIX="Zeus"
PREFIXDIR="$HOME/.PlayOnLinux/wineprefix/$PREFIX"
WORKINGWINEVERSION="1.0.1"

POL_SetupWindow_Init

# Note: http://sierra-online.co.uk does not work anymore
POL_SetupWindow_presentation "$TITLE" "Sierra" "" "$AUTHOR" "$PREFIX"
select_prefix "$PREFIXDIR"

# Let the user select a CDROM
POL_SetupWindow_cdrom

# Check if this CDROM is the correct
POL_SetupWindow_check_cdrom "/ZEUS.DAT"

# To make sure the user has the same environment as the game was
# tested with.
POL_SetupWindow_install_wine "$WORKINGWINEVERSION"

Use_WineVersion "$WORKINGWINEVERSION"

POL_SetupWindow_prefixcreate

# Create a response file for silent installation
cat <<EOF >> "$WINEPREFIX/drive_c/Zeus.iss"
[InstallShield Silent]
Version=v5.00.000
File=Response File

[DlgOrder]
Dlg0=SdLicense-0
Count=8
Dlg1=SdWelcome-0
Dlg2=SdSetupTypeEx-0
Dlg3=SdAskDestPath-0
Dlg4=MessageBox-0
Dlg5=AskOptions-0
Dlg6=AskYesNo-0
Dlg7=SdFinishReboot-0

[SdLicense-0]
Result=1

[SdWelcome-0]
Result=1

[SdSetupTypeEx-0]
Result=Full Install

[SdAskDestPath-0]
szDir=C:\\Sierra\\Master of Olympus - Zeus
Result=1

[Application]
Name=Master of Olympus - Zeus
Version=1.0
Company=Sierra On-Line

[MessageBox-0]
Result=1

[AskOptions-0]
Result=1
Sel-0=0
Sel-1=1

[AskYesNo-0]
Result=0

[SdFinishReboot-0]
Result=1
BootOption=0

EOF

# Show the EULA after converting the codepage
iconv -f CP1250 <"$CDROM/EULA.TXT" >"$REPERTOIRE/tmp/EULA.TXT"
POL_SetupWindow_licence "Please read carefuly the following terms of service" "EULA" "$REPERTOIRE/tmp/EULA.TXT"

# Run the installer
POL_SetupWindow_wait_next_signal "Installing game..." "$TITLE"
wine "$CDROM/SETUP.EXE" -s -f1"c:\\Zeus.iss" 
POL_SetupWindow_detect_exit

wine reboot

# Use OSS, since using ALSA results in noise
Set_SoundDriver "oss"

# Setup an icon for the game
cd "$WINEPREFIX/drive_c/Sierra/Master of Olympus - Zeus"
convert zeus.ico zeus.png
cp zeus-1.png "$HOME/.PlayOnLinux/icones/32/$TITLE"

# Make a short cut
POL_SetupWindow_make_shortcut "$PREFIX" "Sierra/Master of Olympus - Zeus" "Zeus.exe" "" "$TITLE"
Set_WineVersion_Assign "$WORKINGWINEVERSION" "$TITLE"

# Done!
POL_SetupWindow_message "$TITLE installed"

POL_SetupWindow_Close
exit

Editado por: marco_g

NSLW Friday 21 May 2010 at 11:33
NSLW

Please use WINEPREFIX instead of PREFIXDIR

Editado por: NSLW

marco_g Friday 21 May 2010 at 18:08
marco_gAnonymous

Please use WINEPREFIX instead of PREFIXDIR

Quote from NSLW


WINEPREFIX is only available after the prefix is selected, right? PREFIXDIR is used to select the prefix. So I cannot replace PREFIXDIR by WINEPREFIX. What do you want me to change?
NSLW Saturday 22 May 2010 at 11:13
NSLW

Indeed it doesn't need to be changed, but you should use $REPERTOIRE instead of $HOME/.PlayOnLinux
marco_g Saturday 22 May 2010 at 12:24
marco_gAnonymous

Indeed it doesn't need to be changed, but you should use $REPERTOIRE instead of $HOME/.PlayOnLinux

Quote from NSLW


Right, furthermore I noticed that Set_WineVersion_Assign was not called. This has been fixed too.

Two off-topic questions:

1) If there are no comments for a script within a few days, can I assume I can submit it for validation? (Like for my Arctic Adventure, accidently posted as Arctic Command, script)

2) How long does it usually take before scripts are validated and how does this process work? ie, do I get an e-mail or so if there are problems?

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

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

TITLE="Zeus: Master of Olympus"
AUTHOR="Marco Gerards"
PREFIX="Zeus"
PREFIXDIR="$REPERTOIRE/wineprefix/$PREFIX"
WORKINGWINEVERSION="1.0.1"

POL_SetupWindow_Init

# Note: http://sierra-online.co.uk does not work anymore
POL_SetupWindow_presentation "$TITLE" "Sierra" "" "$AUTHOR" "$PREFIX"
select_prefix "$PREFIXDIR"

# Let the user select a CDROM
POL_SetupWindow_cdrom

# Check if this CDROM is the correct CDROM
POL_SetupWindow_check_cdrom "/ZEUS.DAT"

# To make sure the user has the same environment as the game was
# tested with.
POL_SetupWindow_install_wine "$WORKINGWINEVERSION"

Use_WineVersion "$WORKINGWINEVERSION"

POL_SetupWindow_prefixcreate

# Create a response file for silent installation
cat <<EOF >> "$WINEPREFIX/drive_c/Zeus.iss"
[InstallShield Silent]
Version=v5.00.000
File=Response File

[DlgOrder]
Dlg0=SdLicense-0
Count=8
Dlg1=SdWelcome-0
Dlg2=SdSetupTypeEx-0
Dlg3=SdAskDestPath-0
Dlg4=MessageBox-0
Dlg5=AskOptions-0
Dlg6=AskYesNo-0
Dlg7=SdFinishReboot-0

[SdLicense-0]
Result=1

[SdWelcome-0]
Result=1

[SdSetupTypeEx-0]
Result=Full Install

[SdAskDestPath-0]
szDir=C:\\Sierra\\Master of Olympus - Zeus
Result=1

[Application]
Name=Master of Olympus - Zeus
Version=1.0
Company=Sierra On-Line

[MessageBox-0]
Result=1

[AskOptions-0]
Result=1
Sel-0=0
Sel-1=1

[AskYesNo-0]
Result=0

[SdFinishReboot-0]
Result=1
BootOption=0

EOF

# Show the EULA after converting the codepage
iconv -f CP1250 <"$CDROM/EULA.TXT" >"$REPERTOIRE/tmp/EULA.TXT"
POL_SetupWindow_licence "Please read carefuly the following terms of service" "EULA" "$REPERTOIRE/tmp/EULA.TXT"

# Run the installer
POL_SetupWindow_wait_next_signal "Installing game..." "$TITLE"
wine "$CDROM/SETUP.EXE" -s -f1"c:\\Zeus.iss" 
POL_SetupWindow_detect_exit

wine reboot

# Use OSS, since using ALSA results in noise
Set_SoundDriver "oss"

# Setup an icon for the game
cd "$WINEPREFIX/drive_c/Sierra/Master of Olympus - Zeus"
convert zeus.ico zeus.png
cp zeus-1.png "$HOME/.PlayOnLinux/icones/32/$TITLE"

# Make a short cut
POL_SetupWindow_make_shortcut "$PREFIX" "Sierra/Master of Olympus - Zeus" "Zeus.exe" "" "$TITLE"
Set_WineVersion_Assign "$WORKINGWINEVERSION" "$TITLE"

# Done!
POL_SetupWindow_message "$TITLE installed"

POL_SetupWindow_Close
exit

Editado por: marco_g

NSLW Sunday 23 May 2010 at 9:09
NSLW


1) If there are no comments for a script within a few days, can I assume I can submit it for validation? (Like for my Arctic Adventure, accidently posted as Arctic Command, script)

Quote from marco_g

It's up to you when you send your script for validation.


2) How long does it usually take before scripts are validated and how does this process work? ie, do I get an e-mail or so if there are problems?

Quote from marco_g

If the script is correct then I press validate and script is already in database. You'll not get any notification about it.
marco_g Sunday 23 May 2010 at 10:56
marco_gAnonymous

That's clear :)

Here is a new version of the Zeus script. I had a quick look at the North American version of the game and noticed they use different paths and made a few other changes. This new version detects if this.

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

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

TITLE="Zeus: Master of Olympus"
AUTHOR="Marco Gerards"
PREFIX="Zeus"
PREFIXDIR="$REPERTOIRE/wineprefix/$PREFIX"
WORKINGWINEVERSION="1.0.1"

POL_SetupWindow_Init

# Note: http://sierra-online.co.uk does not work anymore
POL_SetupWindow_presentation "$TITLE" "Sierra" "http://sierra-online.co.uk" "$AUTHOR" "$PREFIX"
select_prefix "$PREFIXDIR"

# Let the user select a CDROM
POL_SetupWindow_cdrom

# Check if this CDROM is the correct CDROM
POL_SetupWindow_check_cdrom "/ZEUS.ICO"

# To make sure the user has the same environment as the game was
# tested with.
POL_SetupWindow_install_wine "$WORKINGWINEVERSION"

Use_WineVersion "$WORKINGWINEVERSION"

POL_SetupWindow_prefixcreate

# Check which version of the CDROM this is
grep return "$CDROM/EULA.TXT"  >/dev/null && VERSION="USA"

# The USA version of the Game has an additional message box and uses
# by default a different path to install to.
if [ $VERSION = "USA" ] ; then
  APPNAME="Zeus"
  COUNT=9
  DLG6="Dlg6=MessageBox-1"
  DLG7="Dlg7=AskYesNo-0"
  DLG8="Dlg8=SdFinishReboot-0"
  MB1_1="[MessageBox-1]"
  MB1_2="Result=1"
else
  APPNAME="Master of Olympus - Zeus"
  COUNT=8
  DLG6="Dlg6=AskYesNo-0"
  DLG7="Dlg7=SdFinishReboot-0"
  DLG8=""
fi

# Create a response file for silent installation
cat <<EOF >> "$WINEPREFIX/drive_c/Zeus.iss"
[InstallShield Silent]
Version=v5.00.000
File=Response File

[DlgOrder]
Dlg0=SdLicense-0
Count=$COUNT
Dlg1=SdWelcome-0
Dlg2=SdSetupTypeEx-0
Dlg3=SdAskDestPath-0
Dlg4=MessageBox-0
Dlg5=AskOptions-0
$DLG6
$DLG7
$DLG8

[SdLicense-0]
Result=1

[SdWelcome-0]
Result=1

[SdSetupTypeEx-0]
Result=Full Install

[SdAskDestPath-0]
szDir=C:\\Sierra\\\\$APPNAME
Result=1

[Application]
Name=$APPNAME
Version=1.0
Company=Sierra On-Line

[MessageBox-0]
Result=1

[AskOptions-0]
Result=1
Sel-0=0
Sel-1=1

$MB1_1
$MB1_2

[AskYesNo-0]
Result=0

[SdFinishReboot-0]
Result=1
BootOption=0

EOF

# Show the EULA after converting the codepage
iconv -f CP1250 <"$CDROM/EULA.TXT" >"$REPERTOIRE/tmp/EULA.TXT"
POL_SetupWindow_licence "Please read carefuly the following terms of service" "EULA" "$REPERTOIRE/tmp/EULA.TXT"

# Run the installer
POL_SetupWindow_wait_next_signal "Installing game..." "$TITLE"
wine "$CDROM/SETUP.EXE" -s -f1"c:\\Zeus.iss" 
POL_SetupWindow_detect_exit

wine reboot

# Use OSS, since using ALSA results in noise
Set_SoundDriver "oss"

# Setup an icon for the game
cd "$WINEPREFIX/drive_c/Sierra/$APPNAME"
convert zeus.ico zeus.png
cp zeus-1.png "$HOME/.PlayOnLinux/icones/32/$TITLE"

# Make a short cut
POL_SetupWindow_make_shortcut "$PREFIX" "Sierra/$APPNAME" "Zeus.exe" "" "$TITLE"
Set_WineVersion_Assign "$WORKINGWINEVERSION" "$TITLE"

# Done!
POL_SetupWindow_message "$TITLE installed"

POL_SetupWindow_Close
exit

Editado por: marco_g

NSLW Monday 24 May 2010 at 9:20
NSLW

I think the script is correct. You can add cover of the game from wikipedia.to POL_SetupWindow_Init
marco_g Monday 24 May 2010 at 12:29
marco_gAnonymous

I think the script is correct. You can add cover of the game from wikipedia.to POL_SetupWindow_Init

Quote from NSLW


Great, I have added this. Furthermore, I found there is another version of the game (USA 1.1.0.0) which works differently when installing. I am posting this version again so you can comment on it.

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

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

TITLE="Zeus: Master of Olympus"
AUTHOR="Marco Gerards"
PREFIX="Zeus"
PREFIXDIR="$REPERTOIRE/wineprefix/$PREFIX"
WORKINGWINEVERSION="1.0.1"

wget http://upload.wikimedia.org/wikipedia/en/8/8e/Master_of_Olympus_-_Zeus_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"

# Note: http://sierra-online.co.uk does not work anymore
POL_SetupWindow_presentation "$TITLE" "Sierra" "http://sierra-online.co.uk" "$AUTHOR" "$PREFIX"
select_prefix "$PREFIXDIR"

# Let the user select a CDROM
POL_SetupWindow_cdrom

# Check if this CDROM is the correct CDROM
POL_SetupWindow_check_cdrom "/ZEUS.ICO"

# To make sure the user has the same environment as the game was
# tested with.
POL_SetupWindow_install_wine "$WORKINGWINEVERSION"

Use_WineVersion "$WORKINGWINEVERSION"

POL_SetupWindow_prefixcreate

if [ -e "$CDROM/version.txt" ] ; then
  VERSION=`cat "$CDROM/version.txt" | grep version`
  VERSION=${VERSION:24:7}
else
  # The version of Zeus sold in Europe does not have a version.txt.
  # Hopefully this covers all versions of the game.
  VERSION="EU"
fi

# The USA version of the Game has an additional message box and uses
# by default a different path to install to.
if [ "$VERSION" = "1.0.0.0" ] ; then
  APPNAME="Zeus"
cat <<EOF >>"$WINEPREFIX/drive_c/Zeus.iss"
[InstallShield Silent]
Version=v5.00.000
File=Response File

[DlgOrder]
Dlg0=SdLicense-0
Count=9
Dlg1=SdWelcome-0
Dlg2=SdSetupTypeEx-0
Dlg3=SdAskDestPath-0
Dlg4=MessageBox-0
Dlg5=AskOptions-0
Dlg6=MessageBox-1
Dlg7=AskYesNo-0
Dlg8=SdFinishReboot-0

[SdLicense-0]
Result=1

[SdWelcome-0]
Result=1

[SdSetupTypeEx-0]
Result=Full Install

[SdAskDestPath-0]
szDir=C:\\Sierra\\Zeus
Result=1

[Application]
Name=Zeus
Version=1.0
Company=Sierra On-Line

[MessageBox-0]
Result=1

[AskOptions-0]
Result=1
Sel-0=0
Sel-1=1

[MessageBox-1]
Result=1

[AskYesNo-0]
Result=0

[SdFinishReboot-0]
Result=1
BootOption=0

EOF
elif [ "$VERSION" = "1.1.0.0" ] ; then
  APPNAME="Zeus"
cat <<EOF >>"$WINEPREFIX/drive_c/Zeus.iss"

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

[DlgOrder]
Dlg0=SdLicense-0
Count=11
Dlg1=SdWelcome-0
Dlg2=SdSetupTypeEx-0
Dlg3=SdAskDestPath-0
Dlg4=MessageBox-0
Dlg5=MessageBox-1
Dlg6=MessageBox-2
Dlg7=AskYesNo-0
Dlg8=MessageBox-3
Dlg9=AskYesNo-1
Dlg10=SdFinishReboot-0

[SdLicense-0]
Result=1

[SdWelcome-0]
Result=1

[SdSetupTypeEx-0]
Result=Full Install

[SdAskDestPath-0]
szDir=C:\\Sierra\\Zeus
Result=1

[Application]
Name=Zeus
Version=1.0
Company=Sierra On-Line

[MessageBox-0]
Result=1

[MessageBox-1]
Result=1

[MessageBox-2]
Result=1

[AskYesNo-0]
Result=0

[MessageBox-3]
Result=1

[AskYesNo-1]
Result=0

[SdFinishReboot-0]
Result=1
BootOption=0

EOF
elif [ "$VERSION" = "EU" ] ; then
  APPNAME="Master of Olympus - Zeus"
cat <<EOF >> "$WINEPREFIX/drive_c/Zeus.iss"
[InstallShield Silent]
Version=v5.00.000
File=Response File
 
[DlgOrder]
Dlg0=SdLicense-0
Count=8
Dlg1=SdWelcome-0
Dlg2=SdSetupTypeEx-0
Dlg3=SdAskDestPath-0
Dlg4=MessageBox-0
Dlg5=AskOptions-0
Dlg6=AskYesNo-0
Dlg7=SdFinishReboot-0
 
[SdLicense-0]
Result=1
 
[SdWelcome-0]
Result=1
 
[SdSetupTypeEx-0]
Result=Full Install
 
[SdAskDestPath-0]
szDir=C:\\Sierra\\Master of Olympus - Zeus
Result=1
 
[Application]
Name=Master of Olympus - Zeus
Version=1.0
Company=Sierra On-Line
 
[MessageBox-0]
Result=1
 
[AskOptions-0]
Result=1
Sel-0=0
Sel-1=1
 
[AskYesNo-0]
Result=0
 
[SdFinishReboot-0]
Result=1
BootOption=0
 
EOF

fi

# Show the EULA after converting the codepage
iconv -f CP1250 <"$CDROM/EULA.TXT" >"$REPERTOIRE/tmp/EULA.TXT"
POL_SetupWindow_licence "Please read carefuly the following terms of service" "EULA" "$REPERTOIRE/tmp/EULA.TXT"

# Run the installer
POL_SetupWindow_wait_next_signal "Installing game..." "$TITLE"
wine "$CDROM/SETUP.EXE" -s -f1"c:\\Zeus.iss" 
POL_SetupWindow_detect_exit

wine reboot

# Use OSS, since using ALSA results in noise
Set_SoundDriver "oss"

# Setup an icon for the game
cd "$WINEPREFIX/drive_c/Sierra/$APPNAME"
convert zeus.ico zeus.png
cp zeus-1.png "$HOME/.PlayOnLinux/icones/32/$TITLE"

# Make a short cut
POL_SetupWindow_make_shortcut "$PREFIX" "Sierra/$APPNAME" "Zeus.exe" "" "$TITLE"
Set_WineVersion_Assign "$WORKINGWINEVERSION" "$TITLE"

# Done!
POL_SetupWindow_message "$TITLE installed"

POL_SetupWindow_Close
exit