Forums

Tropico Reloaded (GoG)

Auteur Réponses
TonyFlow Vendredi 30 Aoüt 2013 à 15:39
TonyFlow

http://www.playonlinux.com/fr/app-1806.html

[code language=playonlinux]
#!/bin/bash
# Date : (2013-08-22 23-00)
# Last revision : (2013-08-29 18-00)
# Wine version used : 1.4.1
# Distribution used to test : Fedora 19
# Author : TonyFlow
# Script licence : GPL v.2
# Program licence : Retail
# Depend :
 
[ -z "$PLAYONLINUX" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
GOGID="tropico_reloaded"
PREFIX="TropicoReloaded_gog"
WORKING_WINE_VERSION="1.4.1"
 
TITLE="GOG.com - Tropico Reloaded"
SHORTCUT_NAME_1="Tropico 1: Paradise Island"
SHORTCUT_NAME_2="Tropico 2: Pirate Cove"
 
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 1806
POL_Debug_Init
 
POL_SetupWindow_presentation "$TITLE" "Kalypso / PopTop" "http://www.gog.com/gamecard/$GOGID" "TonyFlow" "$PREFIX"
 
POL_Call POL_GoG_setup "$GOGID" "df2913ef618fd5449cd8e580ee6b7fb0"
 
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
 
POL_Call POL_GoG_install
 
# GoG work!
Set_OS winxp
 
POL_SetupWindow_VMS "16"
 
 
# The game (Tropico 1) require a cdrom drive
ln -sf / "$WINEPREFIX/dosdevices/p:"
cat <<_EOFINI_ > "$POL_USER_ROOT/tmp/cdrom.reg"
REGEDIT4
 
[HKEY_LOCAL_MACHINE\\Software\\Wine\\Drives]
"P:"="cdrom"
_EOFINI_
# Define the cdrom drive into the registry
POL_Wine regedit.exe "$POL_USER_ROOT/tmp/cdrom.reg"
rm "$POL_USER_ROOT/tmp/cdrom.reg"
 
 
# Doesn't hurt ;)
POL_Wine_reboot
 
# Configure the shortcut
GOGPATH="$GOGROOT/Tropico Reloaded"
POL_Shortcut "Tropico.EXE" "$SHORTCUT_NAME_1" "$SHORTCUT_NAME_1.png" "" "Game;StrategyGame;"
POL_Shortcut_Document "$SHORTCUT_NAME_1" "$GOGPATH/Tropico 1/Manual.pdf"
POL_Shortcut "Tropico2.exe" "$SHORTCUT_NAME_2" "$SHORTCUT_NAME_2.png" "" "Game;StrategyGame;"
POL_Shortcut_Document "$SHORTCUT_NAME_2" "$GOGPATH/Tropico 2/Manual.pdf"
 
POL_SetupWindow_Close
exit 0
[/code]

Nous avons ici un unique installeur pour deux jeux (Tropico 1 et 2). Comme les exe ont des noms différents, la création des raccourcis ne pose pas de soucis.
Les jeux datent un peu et n'ont visiblement pas d'exigence particulière. Seul le 1er volume refuse de se lancer s'il ne trouve pas de lecteur CD, malgré la désactivation de la protection... J'ai donc repris le bout de code pour ajouter un lecteur bidon et ça roule !

Les différents éléments graphiques pour l'installeur et les raccourcis sont disponibles dans ce dossier http://greg.rhcp.net/POL/tropico/

Ne voyant pas ce que je pourrais changer à ce script, la demande de signature est lancée.


petch Samedi 31 Aoüt 2013 à 1:53
petch