#!/bin/bash
[
"$PLAYONLINUX"
=
""
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
PROGRAMFILES=`wine cmd
/c
echo
"%ProgramFiles%"
`
PROGRAMFILES=${PROGRAMFILES:3}
TYTUL=
"Theme Park World"
PREFIX=
"TPW"
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/a/a5/SimThemeParkWorld
.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"
"Bullfrog Productions"
"N/A"
"NSLW"
"$PREFIX"
select_prefix
"$REPERTOIRE/wineprefix/$PREFIX"
POL_SetupWindow_message
"Please insert $TYTUL media into your disk drive."
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom
"Autorun.exe"
LATESTVERSION=$(Get_Latest_Wine_Version)
CHOSENWINEVERSION=$LATESTVERSION
POL_SetupWindow_install_wine
"$CHOSENWINEVERSION"
POL_SetupWindow_prefixcreate
Use_WineVersion
"$CHOSENWINEVERSION"
cd
"$WINEPREFIX/dosdevices"
ln
-s
"$CDROM"
d:
cd
"$WINEPREFIX/drive_c/windows/temp/"
echo
"[HKEY_LOCAL_MACHINE\\\\Software\\\\Wine\\\\Drives]"
> cdrom.reg
echo
"\\"
d:\\
"=\\"
cdrom\\
""
>> cdrom.reg
regedit cdrom.reg
sleep
5
Set_OS
"win2k"
cd
"$CDROM"
wine
"Autorun.exe"
POL_SetupWindow_message
"Click \\"
Next\\
" when installation will finish."
"$TYTUL"
POL_SetupWindow_menu
"What is your language version?"
"Languages"
"european and american~traditional chinese~simplified chinese~korean~japanese"
"~"
LANGUAGEVERSION=$APP_ANSWER
if
[
"$APP_ANSWER"
==
"european and american"
];
then
LANGUAGEVERSIONSHRT=
"EUROAMER"
elif
[
"$APP_ANSWER"
==
"traditional chinese"
]
then
LANGUAGEVERSIONSHRT=
"TCHINESE"
elif
[
"$APP_ANSWER"
==
"simplified chinese"
]
then
LANGUAGEVERSIONSHRT=
"SCHINESE"
elif
[
"$APP_ANSWER"
==
"korean"
]
then
LANGUAGEVERSIONSHRT=
"KOREAN"
elif
[
"$APP_ANSWER"
==
"japanese"
]
then
LANGUAGEVERSIONSHRT=
"JAPANESE"
fi
cd
"$REPERTOIRE/ressources"
if
[ ! -e
"TPPatchTwo${LANGUAGEVERSIONSHRT}20000324a.exe"
];
then
POL_SetupWindow_wait_next_signal
"PlayOnLinux is downloading TPPatchTwo${LANGUAGEVERSIONSHRT}20000324a.exe"
"$TYTUL"
POL_SetupWindow_detect_exit
fi
POL_SetupWindow_wait_next_signal
"Installation in progress..."
"$TYTUL"
wine
"TPPatchTwo${LANGUAGEVERSIONSHRT}20000324a.exe"
POL_SetupWindow_detect_exit
POL_SetupWindow_message
"Patch for $TYTUL has been installed successfully"
"$TYTUL"
cd
"$WINEPREFIX/drive_c/windows/temp/"
echo
"[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\DirectInput]"
> mwo.reg
echo
"\\"
MouseWarpOverride\\
"=\\"
disable\\
""
>> mwo.reg
regedit mwo.reg
POL_SetupWindow_menu_list
"How much memory do your graphic card have got?"
"$TYTUL"
"32-64-128-256-384-512-768-890-1024-2048"
"-"
"256"
VMS=
"$APP_ANSWER"
echo
"[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]"
> vms.reg
echo
"\\"
VideoMemorySize\\
"=\\"
$VMS\\
""
>> vms.reg
regedit vms.reg
cd
"$WINEPREFIX/drive_c/windows/temp/"
rm
-rf *
POL_SetupWindow_make_shortcut
"$PREFIX"
"$PROGRAMFILES/Bullfrog/Theme Park World"
"TP.EXE"
""
"$TYTUL"
""
""
Set_WineVersion_Assign
"$CHOSENWINEVERSION"
"$TYTUL"
POL_SetupWindow_make_icon_for_shortcut
"$TYTUL"
"fcc7_tp.0.png"
POL_SetupWindow_message
"$TYTUL has been installed successfully"
"$TYTUL"
POL_SetupWindow_message_image "Please note that this game has a copy protection system\\nand sadly, it can cause you a problem starting this game.\\n\\nThere are two solutions to this:\\n1) be patient at starting the game\\n2)
find
unoriginal executable
file
for
\\nTheme Park World version 2.0
" "
Note about copy protection
" "
/usr/share/playonlinux/themes/tango/warning
.png"
POL_SetupWindow_Close
exit