Forums

Update script: RollerCoaster Tycoon 3

Auteur Réponses
massimiliano0790 Mercredi 18 Aoüt 2010 à 22:31
massimiliano0790Anonymous

Italiano: Salve. Lo script è stato aggiornato con nuove impostazioni.
English: Hello. The script has been updated with new settings.
Française: Bonjour. Le script a été mis à jour avec les nouveaux paramètres.

#!/bin/bash
# Wine version used : 1.3.26
# Distribution used to test : Ubuntu 11.04
# Arch version : x64
# Author : Massimiliano0790
# Licence : Retail
# Only For : http://www.playonmac.com

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

TITLE="RollerCoaster Tycoon 3"
PREFIX="RCT3"
WORKING_WINE_VERSION="1.3.26"

if [ "$POL_LANG" == "fr" ]; then
LNG_CHOOSE_MEDIA="Quelle version possédez-vous?"
LNG_DVD="Version DVD"
LNG_INSERT_MEDIA="Veuillez insérer le disque $TITLE dans votre lecteur\\nsi ce n'est pas déja fait."
LNG_WAIT_END="Appuyez sur \\"Suivant\\" UNIQUEMENT quand l'installation du\\njeu sera terminée sous peine de devoir recommencer l'installation."
LNG_INSTALL_ON="Installation en cours..."
LNG_GAME_VMS="Quelle est la quantité de mémoire (Mo) de votre carte graphique ?"
LNG_VMS_ERROR="Ce jeu ne fonctionnera correctement qu'avec une carte graphique ayant plus de 128Mo de mémoire."
LNG_SUCCES="$TITLE a été installé avec succès."
else
LNG_CHOOSE_MEDIA="Che versione hai?"
LNG_DVD="DVD"
LNG_INSERT_MEDIA="Prego inserire $TITLE nel lettore\\nse non è pronto."
LNG_WAIT_END="Clicca \\"Avanti\\" SOLO quando l'installazione del gioco è completata\\o ripetere l'installazione."
LNG_INSTALL_ON="Installazione in corso..."
LNG_GAME_VMS="Quanta memoria grafica possiedi?"
LNG_VMS_ERROR="Questo gioco non lavora correttamente con una scheda grafica minore di 128MB di memoria."
LNG_SUCCES="$TITLE è stato installato correttamente."
fi

#starting the script
rm "$REPERTOIRE/tmp/*.jpg"
POL_SetupWindow_Init

POL_SetupWindow_presentation "$TITLE" "Atari" "http://www.rollercoastertycoon.com" "Massimiliano0790" "$PREFIX" 

select_prefix "$POL_USER_ROOT/wineprefix/$PREFIX"

# Downloading specific Wine
POL_SetupWindow_install_wine "$WORKING_WINE_VERSION"
Use_WineVersion "$WORKING_WINE_VERSION"

# Creating prefix
POL_SetupWindow_prefixcreate

# Choose between DVD
POL_SetupWindow_menu "$LNG_CHOOSE_MEDIA" "$TITLE" "$LNG_DVD" "~"

if [ "$APP_ANSWER" == "$LNG_DVD" ]; then
GAME_MEDIAVERSION="DVD"
fi

# Installing mandatory dependencies
POL_Call POL_Install_mono210
POL_Call POL_Install_d3dx10
POL_Call POL_Install_d3dx11
POL_Call POL_Install_d3dx9
POL_Call POL_Install_devenum
POL_Call POL_Install_dinput
POL_Call POL_Install_dinput8
POL_Call POL_Install_directmusic
POL_Call POL_Install_directplay
POL_Call POL_Install_directx9
POL_Call POL_Install_dsound
POL_Call POL_Install_dxfullsetup
POL_Call POL_Install_quartz
POL_Call POL_Install_wmp10
POL_Call POL_Install_wmpcodecs

if [ "$GAME_MEDIAVERSION" == "DVD" ]; then
# Asking for CDROM and checking if it's correct one
POL_SetupWindow_message "$LNG_INSERT_MEDIA" "$TITLE"
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "setup.exe"
wine start /unix "$CDROM/setup.exe"
POL_SetupWindow_message "$LNG_WAIT_END" "$TITLE"
POL_SetupWindow_detect_exit
fi

# Asking about memory size of graphic card
POL_SetupWindow_menu_list "$LNG_GAME_VMS" "$TITLE" "64-128-256-320-384-512-640-768-896-1024-1536-1792-2048-3072-4096" "-" "256"
VMS="$APP_ANSWER"

cd "$WINEPREFIX/drive_c/windows/temp/"
cat << EOF > vms.reg
[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]"VideoMemorySize"="$VMS"
EOF
regedit vms.reg
if [ "$VMS" -lt "128" ]; then
POL_SetupWindow_message "$LNG_VMS_ERROR" "$TITLE"
fi

## Begin GNU/Linux fix ##
# don't work with OSX since 'lspci' command do not exist
if [ "$PLAYONMAC" == "" ]; then
VGA_ID1=`lspci | grep VGA | awk '{ print $1 }' | head -n 1`
VGA_ID2=`lspci -n | grep $VGA_ID1 | awk '{ print $3 }'`
VendorID=`echo $VGA_ID2 | awk -F: '{ print $1 }'`
DeviceID=`echo $VGA_ID2 | awk -F: '{ print $2 }'`
cd "$WINEPREFIX/drive_c/windows/temp/"
if [ "$VendorID" == "10de" ]; then
drvID="nv4_disp.dll"
elif [ "$VendorID" == "1002" ]; then
drvID="ati2dvag.dll"
elif [ "$VendorID" == "8086" ]; then
drvID="ig4icd32.dll"
else
drvID="vga.dll"
fi
cat << EOF > "$POL_USER_ROOT/tmp/VGA_ID_fix.reg"
[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]
"VideoPCIVendorID"="dword:0000$VendorID"
"VideoPCIDeviceID"="dword:0000$DeviceID"
"VideoDriver"="$drvID"
EOF
regedit "$POL_USER_ROOT/tmp/VGA_ID_fix.reg"
fi
## End GNU/Linux fix ##
 
POL_Call POL_Function_OverrideDLL "" "mmdevapi"
 
# Sound problem fix - pulseaudio related
[ "$PLAYONMAC" == "" ] && Set_SoundDriver "alsa"
[ "$PLAYONMAC" == "" ] && Set_SoundEmulDriver "Y"
## End Fix
 
## PlayOnMac Section
[ "$PLAYONMAC" == "" ] || Set_Managed "Off"
## End Section
 
# Cleaning temp
if [ -e "$WINEPREFIX/drive_c/windows/temp/" ]; then
rm -rf "$WINEPREFIX/drive_c/windows/temp/*"
chmod -R 777 "$POL_USER_ROOT/tmp/"
rm -rf "$POL_USER_ROOT/tmp/*"
fi

# Making shortcut
POL_SetupWindow_auto_shortcut "$PREFIX" "RCT3.exe" "$TITLE" ""
Set_WineVersion_Assign "$WORKING_WINE_VERSION" "$TITLE"

POL_SetupWindow_message "$LNG_SUCCES" "$TITLE"
POL_SetupWindow_Close
exit

Edité par massimiliano0790

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