#!/bin/bash
[
"$PLAYONLINUX"
=
""
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
TITLE=
"Half-Life 2 : Lost Coast"
PREFIX=
"hl2_lc"
EDITOR=
"Valve"
AUTHOR=
"GNU_Raziel"
WORKING_WINE_VERSION=
"3.0.3"
GAME_VMS=
"256"
STEAM_ID=
"340"
if
[
"$POL_LANG"
==
"fr"
];
then
STEAM_ID=
"342"
elif
[
"$POL_LANG"
==
"de"
];
then
STEAM_ID=
"343"
elif
[
"$POL_LANG"
==
"it"
];
then
STEAM_ID=
"344"
elif
[
"$POL_LANG"
==
"ko"
];
then
STEAM_ID=
"346"
elif
[
"$POL_LANG"
==
"ru"
];
then
STEAM_ID=
"347"
elif
[
"$POL_LANG"
==
"es"
];
then
STEAM_ID=
"349"
fi
POL_SetupWindow_Init
POL_Debug_Init
POL_SetupWindow_presentation
"$TITLE"
"$EDITOR"
"$GAME_URL"
"$AUTHOR"
"$PREFIX"
POL_SetupWindow_checkexist()
{
if
[ -e
"$POL_USER_ROOT/wineprefix/$1"
];
then
STEAM=`
find
$WINEPREFIX -name
"Steam.exe"
`
if
[
"$STEAM"
!=
""
];
then
POL_SetupWindow_menu
"$(eval_gettext 'Steam installation has been detected\nwould you like to install this game in the same virtual drive?')"
"$TITLE"
"$(eval_gettext 'Yes')~$(eval_gettext 'No')"
"~"
STEAM_USE=$APP_ANSWER
if
[
"$STEAM_USE"
==
"$(eval_gettext 'Yes')"
];
then
STEAM_USE=
"1"
PREFIX=
"Steam"
else
STEAM_USE=
"0"
fi
fi
else
STEAM_USE=
"0"
fi
}
POL_SetupWindow_checkexist
"Steam"
POL_Wine_SelectPrefix
"$PREFIX"
if
[
"$STEAM_USE"
==
"0"
];
then
POL_System_SetArch
"x86"
POL_Wine_PrefixCreate
"$WORKING_WINE_VERSION"
fi
POL_SetupWindow_InstallMethod
"DVD,STEAM"
if
[
"$STEAM_USE"
==
"0"
];
then
POL_Call
POL_Install_steam
fi
POL_Call
POL_Install_steam_flags
"$STEAM_ID"
POL_SetupWindow_VMS
$GAME_VMS
[
"$POL_OS"
=
"Linux"
] && Set_SoundDriver
"alsa"
[
"$POL_OS"
=
"Linux"
] && Set_SoundEmulDriver
"Y"
POL_Shortcut
"steam.exe"
"Steam ($TITLE)"
""
""
if
[
"$INSTALL_METHOD"
==
"DVD"
];
then
POL_SetupWindow_message
"$(eval_gettext 'Please select the setup file to run')"
"$TITLE"
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom
"Setup.exe"
POL_Wine
start
/unix
"$CDROM/Setup.exe"
POL_Wine_WaitExit
"$TITLE"
else
POL_SetupWindow_message
"$(eval_gettext 'When $TITLE download by Steam is finished,\nDo NOT click on Play.\n\nClose COMPLETELY the Steam interface, \nso that the installation script can continue')"
"$TITLE"
cd
"$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine
start
/unix
"steam.exe"
steam:
//install/
$STEAM_ID
POL_Wine_WaitExit
"$TITLE"
fi
POL_SetupWindow_Close
exit
0