#!/bin/bash
if
[
"$PLAYONLINUX"
=
""
]
then
exit
0
fi
source
"$PLAYONLINUX/lib/sources"
TYTUL=
"Silent Hill 2"
PREFIX=
"SH2"
patch_sh2()
{
POL_SetupWindow_browse
"Select patch file"
"$TYTUL"
""
wine
"$APP_ANSWER"
POL_SetupWindow_message
"Patch for $TYTUL has been installed successfully"
"$TYTUL"
}
POL_SetupWindow_Init
POL_SetupWindow_presentation
"$TYTUL"
"Konami"
"N/A"
"NSLW"
"$PREFIX"
select_prefixe
"$REPERTOIRE/wineprefix/$PREFIX"
POL_SetupWindow_menu
"What do you want to do?"
"Actions"
"install-game patch-game"
" "
if
[
"$APP_ANSWER"
==
"patch-game"
];
then
if
[ -e
"$REPERTOIRE/wineprefix/$PREFIX"
];
then
patch_sh2
POL_SetupWindow_Close
fi
fi
POL_SetupWindow_prefixcreate
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom
"Setup.exe"
CDROM2=${CDROM
//
"1"
/
"2"
}
CDROM3=${CDROM
//
"1"
/
"3"
}
cd
"$WINEPREFIX/dosdevices"
ln
-s $CDROM d:
ln
-s $CDROM2 e:
ln
-s $CDROM3 f:
echo
"\\"
d:\\
"=\\"
cdrom\\
""
>>
"$REPERTOIRE/tmp/cdrom.reg"
echo
"\\"
e:\\
"=\\"
cdrom\\
""
>>
"$REPERTOIRE/tmp/cdrom.reg"
echo
"\\"
f:\\
"=\\"
cdrom\\
""
>>
"$REPERTOIRE/tmp/cdrom.reg"
regedit
"$REPERTOIRE/tmp/cdrom.reg"
POL_SetupWindow_message
"Wait 5 seconds then click next"
"$TYTUL"
POL_SetupWindow_wait_next_signal
"Installation in progress..."
"$TYTUL"
cd
$CDROM
wine
"Setup.exe"
POL_SetupWindow_detect_exit
cd
"$WINEPREFIX/drive_c/windows/temp/"
echo
"[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]"
> fbo.reg
echo
"\\"
OffscreenRenderingMode\\
"=\\"
fbo\\
""
>> fbo.reg
regedit fbo.reg
POL_SetupWindow_menu_list
"How much memory do your graphic card have got?"
"$TYTUL"
"32-64-128-256-384-512-768-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 *
cp
"$CDROM/sh2.ico"
"$REPERTOIRE/icones/32/$TYTUL"
POL_SetupWindow_make_shortcut
"$PREFIX"
"Program Files/Konami/Silent Hill 2"
"sh2pc.exe"
""
"$TYTUL"
""
""
POL_SetupWindow_message
"$TYTUL has been installed successfully"
"$TYTUL"
POL_SetupWindow_question
"Do you want to patch your game?"
"$TYTUL"
if
[
"$APP_ANSWER"
==
"TRUE"
] ;
then
patch_sh2
fi
POL_SetupWindow_Close
exit