Estas Aqui > Les forums > Your creations. > [script] Anno 1602
| Nuevo tema - Responder |
| Autor | Respuestas |
| marco_g | Lunes 24 Mayo 2010 a las 19:21 - [Citar] |
Membre![]() |
Here is a script for Anno 1602 (the regular version) and a script to patch Anno 1602. The patch is for the dutch version of the game. However, the script was created such that it can be easily extended to other versions.
#!/bin/bash # Date : (2010-05-29) # Last revision : (2010-07-25) # Wine version used : 1.1.44 # Distribution used to test : Ubuntu 10.04 # Author : Marco Gerards # Licence : GPLv3 # Depend : none [ "$PLAYONLINUX" = "" ] && exit 0 source "$PLAYONLINUX/lib/sources" TITLE="Anno 1602: Creation of a New World" AUTHOR="Marco Gerards" PREFIX="Anno1602" PREFIXDIR="$REPERTOIRE/wineprefix/$PREFIX" WORKINGWINEVERSION="1.1.44" wget http://upload.wikimedia.org/wikipedia/en/3/32/Anno_1602_-_Creation_of_a_New_World_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" "Sunflowers" "http://anno.uk.ubi.com/pc/history1602.php" "$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 "/Anno1602/1602.exe" # 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 POL_SetupWindow_message "Click Forward to start the installation. This can take a while." # Installation using Setup.exe does not work, manual installation does # work. See http://www.capsu.org/1602/7.html for details cd "$WINEPREFIX/drive_c" mkdir Anno1602 cd Anno1602 POL_SetupWindow_wait_next_signal cp -r "$CDROM/Anno1602/"* . chmod -R a+rw * rm -r MUSIC8 rm -r VideoSmk POL_SetupWindow_detect_exit cat < Patch: #!/bin/bash
# Date : (2010-05-24)
# Last revision : (2010-07-25)
# Wine version used : 1.1.44
# Distribution used to test : Ubuntu 10.04
# Author : Marco Gerards
# Licence : GPLv3
# Depend : none
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
TITLE="Anno 1602: Creation of a New World - Patch"
AUTHOR="Marco Gerards"
PREFIX="Anno1602"
PREFIXDIR="$REPERTOIRE/wineprefix/$PREFIX"
WORKINGWINEVERSION="1.1.44"
LNG_DOWNLOADING="PlayOnLinux is downloading"
LNG_LANGUAGE="What is your language version?"
LNG_INSTALLATIONINPROGRESS="Installation in progress..."
LNG_PATCHSUCCES="Patch for $TITLE has been installed successfully."
LNG_CHOOSEACTION="What do you want to do?"
LNG_PATCHM="Let me choose patch manually"
LNG_PATCHA="Download patch automatically"
LNG_PATCHLOCATION="Where is your patch located?"
wget http://upload.wikimedia.org/wikipedia/en/3/32/Anno_1602_-_Creation_of_a_New_World_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_checkexist()
{
if [ ! -e $REPERTOIRE/wineprefix/$1 ]; then
if [ "$POL_LANG" == "fr" ]; then
LNG_PREFIX_NOT_EXIST="Le jeu n'est pas installé."
else
LNG_PREFIX_NOT_EXIST="The Game is not installed."
fi
POL_SetupWindow_message_image "$LNG_PREFIX_NOT_EXIST" "Prefix Checker" "$PLAYONLINUX/themes/tango/warning.png"
exit
fi
}
POL_SetupWindow_checkexist "$PREFIX"
POL_SetupWindow_presentation "$TITLE" "Sunflowers" "http://anno.uk.ubi.com/pc/history1602.php" "$AUTHOR" "$PREFIX"
select_prefix "$PREFIXDIR"
POL_SetupWindow_install_wine "$WORKINGWINEVERSION"
Use_WineVersion "$WORKINGWINEVERSION"
# Automatically determine which patch to install. Currently only
# downloading the Dutch version of the game is supported.
if [ -e $WINEPREFIX/drive_c/Anno1602/LeesDit.rtf ] ; then
PATCHNAME="Anno 1602 patch 1 dutch"
PATCHFILE="anno1602patch1_dut.exe"
else
POL_SetupWindow_message_image "Downloading the patch for your version of Anno 1602 is not supported yet" "$TITLE" "$PLAYONLINUX/themes/tango/error.png"
POL_SetupWindow_Close
exit
fi
POL_SetupWindow_menu "$LNG_CHOOSEACTION" "Actions" "$LNG_PATCHM~$LNG_PATCHA" "~"
if [ "$APP_ANSWER" == "$LNG_PATCHM" ]; then
POL_SetupWindow_browse "$LNG_PATCHLOCATION" "$TITLE" ""
PATCHFILE="$APP_ANSWER"
else
# Patch the game
POL_SetupWindow_message "The patch \"$PATCHNAME\" for Anno 1602 will be downloaded and installed"
cd "$REPERTOIRE/ressources"
if [ ! -e "$PATCHFILE" ]; then
POL_SetupWindow_download "$LNG_DOWNLOADING $TITLE" "$TITLE" "http://annomuseum.de/webseiten/SF/download.sunflowers.de/$PATCHFILE"
fi
fi
POL_SetupWindow_wait_next_signal "$LNG_INSTALLATIONINPROGRESS" "$TITLE"
wine "$PATCHFILE"
POL_SetupWindow_detect_exit
POL_SetupWindow_message "$LNG_PATCHSUCCES" "$TITLE"
POL_SetupWindow_Close
exitEditado por: marco_g |
| NSLW | Martes 25 Mayo 2010 a las 7:50 - [Citar] |
Membre![]() ![]() |
1) Why do you copy game from CD instead of installing it?
2) In patch script you should also use POL_SetupWindow_install_wine "$WORKINGWINEVERSION" because it's not always true that user has Wine $WORKINGWINEVERSION 3) In patch script What if servers are down or user has it's own patch on hdd? You should add possibility to install user's patch. You can see how it's done [url=http://www.playonlinux.com/repository/?script=624]here[/ur] 4) What's the reason for choosing Wine 1.1.37? 5) Why echo "http://annomuseum.de/webseiten/SF/download.sunflowers.de/$PATCHFILE" ? 6) Use $REPERTOIRE instead of $HOME/.PlayOnLinux |
| marco_g | Martes 25 Mayo 2010 a las 8:12 - [Citar] |
Membre![]() |
Citation de NSLW: 1) Why do you copy game from CD instead of installing it? Unfortunately the installer will not work. Copying it seems to be the commonly accepted solution: http://appdb.winehq.org/objectManager.php?sClass=version&iId=11464&iTestingId=49924 Citation de NSLW:
Oops, I will add this. Citation de NSLW:
I will do that. Citation de NSLW:
One user (although on the mac) marked it as platinum: http://appdb.winehq.org/objectManager.php?sClass=version&iId=11464&iTestingId=49924 So if I have to try one initial version, I will select the one with the highest rating on WineHQ. Do I have to use other criteria to select a wine version? Citation de NSLW:
Oops
Citation de NSLW:
I will change this. Later I will post a new patch. Editado por: marco_g |
| NSLW | Martes 25 Mayo 2010 a las 9:17 - [Citar] |
Membre![]() ![]() |
Citation de marco_g:
Use the latest Wine version, check if the game installs and runs, if not then lower the version number. It's very easy and fast to do in POL. Citation de marco_g:
Please edit your first post rather than posting new script. |
| marco_g | Sabado 29 Mayo 2010 a las 20:23 - [Citar] |
Membre![]() |
Citation de NSLW:
I have done this and changed the other things you asked me to change. Citation de NSLW:
Okay, I have edited my first post. |
| NSLW | Miercoles 2 Junio 2010 a las 21:37 - [Citar] |
Membre![]() ![]() |
If you copy the game instead of installing it you can embrace copying process by following commands POL_SetupWindow_wait_next_signal
and POL_SetupWindow_detect_exit Currently you use POL_SetupWindow_message and during copying process some users may have feeling that program stalled. Following PATCHFILE=$APP_ANSWER won't work if APP_ANSWER is /home/user/Desktop/my patch/annopatch.exe Editado por: NSLW |
| marco_g | Domingo 25 Julio 2010 a las 10:30 - [Citar] |
Membre![]() |
Sorry for the late reply. I have updated the script in the first post and will send it in for validation real soon.
If you accept it, you can consider to use the icon which was used for Anno 1602 KE. In a few weeks I will create a script for Anno 1602 GE, which cannot be installed using this script, while this game cannot be installed in the way Anno 1602 GE has to be installed... |
156 Usuarios Conectados


