Das Forum

[Rewrite] Theme Hospital

Autor Antworten
massimiliano0790 Tuesday 15 March 2011 at 21:49
massimiliano0790Anonymous

Hi I tried to use the script of theme hospital and refine the best ... The result was that the mouse is no longer at times, but ... say that you can play without irritation. The only thing I recommend when you get to write Installation path in terms of how it is translated on your system (eg Italian Programmi, English "Program Files ", etc. .)... Sorry for any spelling mistakes.

#!/bin/bash
# Wine version used : 1.2.2
# Distribution used to test : Ubuntu 10.10
# Author : Maximo90
# Licence : Retail
# Depend : -
       
#What does not
#- Music (i don't know why..)
# As said in other tests, it works well on low resolution, but it's pretty ugly.
       
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
       
GAMETITLE="Theme Hospital"
PREFIX="ThemeHospital"
       
if [ "$POL_LANG" == "de" ]; then
LNG_MEM="Wieviel speicher hat deine Grafikkarte? (Ex : 32)"
LNG_WAIT_NEXT="Klicke erst auf \\"Next\\" wenn das installieren abgeschlossen ist"
LNG_WAIT_END="wurde erfolgreich installiert"
else
LNG_MEM="How much memory do your graphic card have got? (Ex : 32)"
LNG_WAIT_NEXT="Click on \\"Next\\" ONLY when the game installation"
LNG_WAIT_END="has been installed successfully"
fi
       
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/2/26/Theme_Hospital.front_cover.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 "$GAMETITLE" "Bullfrog" "N/A" "Maximo90" "$PREFIX"
       
CHOSENWINEVERSION="1.2.2"
POL_SetupWindow_install_wine "$CHOSENWINEVERSION"
Use_WineVersion "$CHOSENWINEVERSION"
       
POL_SetupWindow_cdrom
#POL_SetupWindow_check_cdrom "autoset.exe"
       
select_prefix "$REPERTOIRE/wineprefix/$PREFIX"
POL_SetupWindow_prefixcreate
       
PROGRAMFILES=`wine cmd /c echo "%ProgramFiles%" |tr -d '\\015' | tr -d '\\010'`
PROGRAMFILES=${PROGRAMFILES:3}
       
#adding CD-ROM as drive d: to winecfg
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 win95
       
#starting installation
cd "$CDROM"
wine "autoset.exe"
POL_SetupWindow_message "$LNG_WAIT_NEXT" "$GAMETITLE"
       
cd "$WINEPREFIX/drive_c/windows/temp/"
       
#asking about memory size
POL_SetupWindow_menu_list "$LNG_MEM" "$GAMETITLE" "32-64-128-256-384-512-768-890-1024-2048" "-" "32"
VMS="$APP_ANSWER"

Set_OS winxp

#Installing mandatory dependencies
POL_Call POL_Install_gecko
POL_Call POL_Install_tahoma
POL_Call POL_Install_d3dx9

Set_OS win98
       
if [ "$VMS" -lt "32" ]; then
POL_SetupWindow_message_image "" "$GAMETITLE" "$PLAYONLINUX/themes/tango/warning.png"
fi
       
echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]" > vms.reg
echo "\\"VideoMemorySize\\"=\\"$VMS\\"" >> vms.reg
regedit vms.reg
#sound voreinstellung
echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Drivers]" > sound.reg
echo "\\"Audio\\"=\\"alsa\\"" >> sound.reg
regedit sound.reg
       
#cleaning temp
cd "$WINEPREFIX/drive_c/windows/temp/"
rm -rf *
rm -f "$REPERTOIRE/tmp/left.jpeg"
       
#making shortcut
POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/Bullfrog/Hospital" "HOSPITAL.EXE" "" "$GAMETITLE" "" ""
Set_WineVersion_Assign "$CHOSENWINEVERSION" "$GAMETITLE"
POL_SetupWindow_make_icon_for_shortcut "$GAMETITLE" "*_hospital.0.xpm"
       
POL_SetupWindow_message "$GAMETITLE $LNG_WAIT_END" "$GAMETITLE"
       
POL_SetupWindow_Close
exit
Quentin PÂRIS Tuesday 15 March 2011 at 22:03
Quentin PÂRISAnonymous

Sorry, your script is still not valid

A lot of commands are now forbidden in validation

- We do not accept resized left.jpg like that (We prefer nothing)
- The following lines are outdated :
PROGRAMFILES=`wine cmd /c echo "%ProgramFiles%" |tr -d '\\015' | tr -d '\\010'`
PROGRAMFILES=${PROGRAMFILES:3}
- Use POL_SetupWindow_auto_shortcut instead of POL_SetupWindow_make_shortcut
- Use of POL_SetupWindow_make_icon_for_shortcut is no longer accepted
- The more import point :

cd "$WINEPREFIX/drive_c/windows/temp/"
rm -rf *

What happen if the directory $WINEPREFIX/drive_c/windows/temp/ does not exist ?

Editiert von: Tinou

massimiliano0790 Wednesday 16 March 2011 at 9:47
massimiliano0790Anonymous

Hello. I read your message and I have recreated the script with new settings. I also updated with Wine (Wine Is Not an Emulator) and it seems to me that the mouse is a bit 'smoother than before.
ps: if you come in making shortcut I had to put the Program Files folder is because its root is also installed in other languages​​, is always the root folder.

#!/bin/bash
# Wine version used : 1.3.15
# Distribution used to test : Ubuntu 10.10
# Arch used to test : 64-bit
# Author : Maximo90
# Licence : Retail
 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
TITLE="Theme Hospital"
PREFIX="TH"
WORKINGWINEVERSION="1.3.15"
 
LNG_WAIT_NEXT="Click on \\"Next\\" ONLY when the game installation"

POL_SetupWindow_make_icon_for_shortcut()
{
convert "$HOME/.local/share/icons/$2" -geometry 32X32 "$REPERTOIRE/icones/32/$1"
}
 
#starting the script
wget http://upload.wikimedia.org/wikipedia/en/2/26/Theme_Hospital.front_cover.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 "$TITLE" "Bullfrog" "n/d" "Maximo90" "$PREFIX"
 
POL_SetupWindow_cdrom
#POL_SetupWindow_check_cdrom "autoset.exe"
 
select_prefix "$REPERTOIRE/wineprefix/$PREFIX"
POL_SetupWindow_prefixcreate
 
#downloading specific Wine
POL_SetupWindow_install_wine "$WORKINGWINEVERSION"
Use_WineVersion "$WORKINGWINEVERSION"
 
#creating application's own prefix
POL_SetupWindow_prefixcreate 
 
#fetching PROGRAMFILES environmental variable
PROGRAMFILES="Program Files"
POL_LoadVar_PROGRAMFILES
 
#adding CD-ROM as drive d: to winecfg
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 win95
 
#starting installation
cd "$CDROM"
wine "autoset.exe"
POL_SetupWindow_message "$LNG_WAIT_NEXT" "$GAMETITLE"

Set_OS winxp
 
#Installing mandatory dependencies
POL_Call POL_Install_gecko
POL_Call POL_Install_tahoma
POL_Call POL_Install_d3dx9
 
Set_OS win98
 
#cleaning temp
if [ -e "$WINEPREFIX/drive_c/windows/temp/" ]; then
rm -rf "$WINEPREFIX/drive_c/windows/temp/*"
chmod -R 777 "$REPERTOIRE/tmp/"
rm -rf "$REPERTOIRE/tmp/*"
fi
 
#making shortcut
POL_SetupWindow_make_shortcut "$PREFIX" "Program Files/Bullfrog/Hospital" "HOSPITAL.EXE" "" "$TITLE"
 
Set_WineVersion_Assign "$WORKINGWINEVERSION" "$TITLE"
POL_SetupWindow_make_icon_for_shortcut "$TITLE"
 
POL_SetupWindow_message "$TITLE has been installed successfully." "$TITLE"
 
POL_SetupWindow_message_image "Please note that this game has a copy protection system\\nand sadly, it prevents Wine from running the game.\\n\\nPlayOnLinux will not provide any help concerning any illegal\\nstuff." "Note about copy protection" "$PLAYONLINUX/themes/tango/warning.png"
 
POL_SetupWindow_Close
exit
Du bist hier: Index > > [Rewrite] Theme Hospital