#!/bin/bash
[ -z
"$PLAYONLINUX"
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
PREFIX=
"FeebleFiles_gog"
WORKING_WINE_VERSION=
"1.3.36"
TITLE=
"$(eval_gettext 'The Feeble Files (GoG release)')"
SHORTCUT_NAME=
"The Feeble Files"
SHORTCUT_DOC=
"$SHORTCUT_NAME - $(eval_gettext 'User manual')"
POL_SetupWindow_Init
POL_Debug_Init
POL_Wine_SelectPrefix
"$PREFIX"
POL_Wine_PrefixCreate
"$WORKING_WINE_VERSION"
cd
$HOME
POL_SetupWindow_browse
"$(eval_gettext 'Please select the setup file to run.')"
"$TITLE"
"setup_the_feeble_files.exe"
ARCHIVE=
"$APP_ANSWER"
POL_SetupWindow_question
"$(eval_gettext 'This game uses the ScummVM emulator, that also exists natively for Linux.\\nUse native version when present?')"
"$TITLE"
NATIVESCUMMVM=
''
[
"$APP_ANSWER"
=
"TRUE"
] && NATIVESCUMMVM=1
POL_SetupWindow_wait
"$(eval_gettext 'Please wait while $TITLE is installed.')"
"$TITLE"
POL_Call
POL_Function_SetNativeExtension
"pdf"
POL_Wine
start
/unix
"$ARCHIVE"
|| POL_Debug_Fatal
"$(eval_gettext 'Error while installing archive')"
POL_Wine_WaitExit
"$TITLE"
if
cd
"$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/The Feeble Files/"
;
then
perl -
ne
'chomp;
if
(/^(.*path)=(.*)/) {
my($setting, $path)=($1, $2);
my $unix_path=`winepath -u
'"'
"
'$path'
"'"
'`;
chomp $unix_path;
print
"$setting=$unix_path\\n"
;
}
else
{
print
"$_\\n"
;
}' < feeble.ini > feeble-unix.ini
fi
Set_OS winxp
POL_SetupWindow_VMS
"2"
POL_Wine_reboot
POL_Shortcut
"scummvm.exe"
"$SHORTCUT_NAME"
""
"-c 'C:/$PROGRAMFILES/GOG.com/The Feeble Files/feeble.ini'"
cp
"$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/The Feeble Files/game.ico"
"$REPERTOIRE/icones/32/$SHORTCUT_NAME"
if
[ -n
"$NATIVESCUMMVM"
];
then
POL_Shortcut_InsertBeforeWine
"$SHORTCUT_NAME"
"cd .."
POL_Shortcut_InsertBeforeWine
"$SHORTCUT_NAME"
"exec scummvm -c 'feeble-unix.ini'"
POL_Shortcut_InsertBeforeWine
"$SHORTCUT_NAME"
"cd -"
fi
POL_Shortcut
"start.exe"
"$SHORTCUT_DOC"
""
"'C:/$PROGRAMFILES/GOG.com/The Feeble Files/manual.pdf'"
POL_SetupWindow_Close
exit