#!/bin/bash
[
"$PLAYONLINUX"
=
""
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
TITLE=
"The Witcher 2 : Assassins of Kings"
PREFIX=
"witcher2"
PVERSION=
"1.35"
POL_SetupWindow_Init
POL_Debug_Init
POL_SetupWindow_free_presentation
"$TITLE"
"$(eval_gettext 'Welcome in the patch $PVERSION installer for $TITLE')"
POL_SetupWindow_checkexist()
{
if
[ ! -e
"$POL_USER_ROOT/wineprefix/$1"
];
then
POL_SetupWindow_message
"$(eval_gettext 'Game is not installed')"
"$TITLE"
POL_SetupWindow_Close
exit
0
fi
}
POL_SetupWindow_checkexist
"$PREFIX"
POL_Wine_SelectPrefix
"$PREFIX"
STEAM=`
find
$WINEPREFIX -name
"Steam.exe"
`
if
[
"$STEAM"
!=
""
];
then
POL_SetupWindow_message
"$(eval_gettext 'Steam have is own automatic update system')"
"$TITLE"
POL_SetupWindow_Close
exit
0
fi
cd
"$HOME"
POL_SetupWindow_InstallMethod
"DOWNLOAD,LOCAL"
if
[
"$INSTALL_METHOD"
==
"LOCAL"
];
then
POL_SetupWindow_browse
"$(eval_gettext 'Select patch to execute')"
"$TITLE"
""
POL_Wine
start
/unix
"$APP_ANSWER"
POL_Wine_WaitExit
"$TITLE"
else
cd
"$POL_USER_ROOT/tmp"
if
[
"$POL_LANG"
==
"ru"
];
then
PATCH_EXE=
"Patcher_RU.exe"
elif
[
"$POL_LANG"
==
"jp"
];
then
PATCH_EXE=
"Patcher_0JP.exe"
else
PATCH_EXE=
"patcher.exe"
fi
POL_SetupWindow_download
"$(eval_gettext 'Wait while the patch is downloading...\nThis operation can take time, depending of your connexion.')"
"$TITLE"
"$PATCH_URL"
POL_Wine
start
/unix
"$PATCH_EXE"
POL_Wine_WaitExit
"$TITLE"
rm
"$PATCH_EXE"
fi
POL_SetupWindow_Close
exit
0