Jesteś tutaj > Les forums > Your creations. > [script] Escape from Monkey Island
| Nowy - Odpowiedz |
| Autor | Odpowiedzi |
| NSLW | Data: Piątek 18 Wrzesień 2009 ŕ 19:45 - [Cytuj] |
Membre![]() ![]() |
Hello,
I wrote script which installs Escape from Monkey Island. Wine version : 1.1.29 Distribution : Fedora Distribution Version : 11 (32 bit) Graphics card : Nvidia, GeForce 9xxx Drivers of the graphics card : 190.32 Icon for the game:
#!/bin/bash
# Date : (2009-09-18 18-00)
# Last revision : (2009-09-18 18-00)
# Wine version used : 1.1.29
# Distribution used to test : Fedora 11
# Author : NSLW
# Licence : Retail
# Depend : ImageMagick
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
#fetching PROGRAMFILES environmental variable
PROGRAMFILES=`wine cmd /c echo "%ProgramFiles%"`
PROGRAMFILES=${PROGRAMFILES:3}
TYTUL="Escape from Monkey Island"
PREFIX="EFMI"
Get_Latest_Wine_Version()
{
wget http://mulx.playonlinux.com/wine/linux-i386/LIST --output-document="$REPERTOIRE/tmp/LIST"
xyz=`cat "$REPERTOIRE/tmp/LIST" | sed -e 's/\.//g' | cut -d';' -f2 | sort -n | tail -n1`
echo "$(echo $xyz | cut -c1-1).$(echo $xyz | cut -c2-2).$(echo $xyz | cut -c3-4)"
}
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/d/d6/Escape_from_Monkey_Island_artwork.jpg --output-document="$REPERTOIRE/tmp/leftnotscaled.jpeg"
convert "$REPERTOIRE/tmp/leftnotscaled.jpeg" -scale 150x356\! "$REPERTOIRE/tmp/left.jpeg"
POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.jpeg"
POL_SetupWindow_presentation "$TYTUL" "LucasArts Entertainment Company LLC" "N/A" "NSLW" "$PREFIX"
select_prefix "$REPERTOIRE/wineprefix/$PREFIX"
POL_SetupWindow_message "Please insert first $TYTUL media into your disk drive."
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "Monkey.exe"
CDROM2=${CDROM//"1"/"2"} #MONKEY4_CD2
LATESTVERSION=$(Get_Latest_Wine_Version)
CHOSENWINEVERSION=$LATESTVERSION
POL_SetupWindow_install_wine "$CHOSENWINEVERSION"
POL_SetupWindow_prefixcreate
Use_WineVersion "$CHOSENWINEVERSION"
#adding CD-ROM as drive d: to winecfg
cd "$WINEPREFIX/dosdevices"
ln -s "$CDROM" d:
ln -s "$CDROM2" e:
cd "$WINEPREFIX/drive_c/windows/temp/"
echo "[HKEY_LOCAL_MACHINE\\Software\\Wine\\Drives]" > cdrom.reg
echo "\"d:\"=\"cdrom\"" >> cdrom.reg
echo "\"e:\"=\"cdrom\"" >> cdrom.reg
regedit cdrom.reg
sleep 5
POL_SetupWindow_message_image "Please choose \"Complete Installation\" if asked\n\nPlease return to this window if asked for second CD" "Size of installation" "/usr/share/playonlinux/themes/tango/info.png"
#starting installation
cd "$WINEPREFIX/drive_c/windows/temp/"
echo "#!/bin/bash" > install
echo "cd \"$CDROM\"" >> install
echo "env WINEPREFIX=\"$REPERTOIRE/wineprefix/$PREFIX\" wine Install/setup.exe" >> install
chmod 777 install
./install 1&
#cd "$CDROM"
#wine "Install/setup.exe"
POL_SetupWindow_message "Please insert second CD when installer asks and press Forward" "$TYTUL"
cd "$WINEPREFIX/dosdevices"
mv d: sd:
mv e: d:
POL_SetupWindow_message "Please insert first CD when installer asks and press Forward" "$TYTUL"
mv d: e:
mv sd: d:
POL_SetupWindow_message "Click \"Next\" when installation will finish." "$TYTUL"
POL_SetupWindow_menu "What is your language version?" "Languages" "English~French~Italian~German~Portuguese~Spanish" "~"
LANGUAGEVERSION=$APP_ANSWER
if [ "$APP_ANSWER" == "English" ]; then
LANGUAGEVERSIONSHRT=""
elif [ "$APP_ANSWER" == "French" ]
then
LANGUAGEVERSIONSHRT="_FRA"
elif [ "$APP_ANSWER" == "Italian" ]
then
LANGUAGEVERSIONSHRT="_ITA"
elif [ "$APP_ANSWER" == "German" ]
then
LANGUAGEVERSIONSHRT="_DEU"
elif [ "$APP_ANSWER" == "Portuguese" ]
then
LANGUAGEVERSIONSHRT="_BRZ"
elif [ "$APP_ANSWER" == "Spanish" ]
then
LANGUAGEVERSIONSHRT="_ESP"
fi
cd "$REPERTOIRE/ressources"
if [ ! -e "MonkeyUpdate${LANGUAGEVERSIONSHRT}.exe" ]; then
POL_SetupWindow_wait_next_signal "PlayOnLinux is downloading MonkeyUpdate${LANGUAGEVERSIONSHRT}.exe (ca. 1.12 MB)" "$TYTUL"
wget "ftp://ftp.lucasarts.com/patches/pc/MonkeyUpdate${LANGUAGEVERSIONSHRT}.exe"
POL_SetupWindow_detect_exit
fi
POL_SetupWindow_wait_next_signal "Installation in progress..." "$TYTUL"
wine "MonkeyUpdate${LANGUAGEVERSIONSHRT}.exe"
POL_SetupWindow_detect_exit
POL_SetupWindow_message "Patch for $TYTUL has been installed successfully" "$TYTUL"
#solve blue head issue
cd "$WINEPREFIX/drive_c/windows/temp/"
echo "[HKEY_LOCAL_MACHINE\\Software\\LucasArts Entertainment Company LLC\\Monkey4\\Retail]" > OpenGL.reg
echo "\"OpenGL\"=dword:1" >> OpenGL.reg
regedit OpenGL.reg
Set_Managed "Off"
#making shortcut
POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/LucasArts/Monkey 4" "Monkey.exe" "" "$TYTUL" "" ""
Set_WineVersion_Assign "$CHOSENWINEVERSION" "$TYTUL"
POL_SetupWindow_make_icon_for_shortcut "$TYTUL" "8aff_monkey.0.xpm"
POL_SetupWindow_message "$TYTUL has been installed successfully" "$TYTUL"
POL_SetupWindow_Close
exit |
| djiock | Data: Poniedziałek 30 Sierpień 2010 ŕ 23:35 - [Cytuj] |
Membre![]() |
Hi, don't know id it's the right place to write but your script doesn't work with me...
I just can't continue the installation on the second CD because it won't mount, any other CD won't either from now on... The only way is to do it on the command line, but even with that and putting the right name in /media/, the installer doesn't want to continue... I don't know if you have any clue, I'd love to play the game ! I'm on Ubuntu 10.04 BTW. thanks |
| Unkuiri | Data: Sobota 25 Wrzesień 2010 ŕ 1:16 - [Cytuj] |
Membre![]() ![]() |
Hi, have you tried those commands?:
to mount: Console: sudo mkdir /media/cdrom1 sudo mount 'your_first_cd_image.iso' /media/cdrom1 -t iso9660 -o loop Console: sudo umount /media/cdrom1 Console: sudo mount 'your_second_cd_image.iso' /media/cdrom1 -t iso9660 -o loop Edytowane przez Unkuiri |
214 ludzie online



