#!/bin/bash
[
"$PLAYONLINUX"
=
""
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
PREFIX=
"CnC_TibSun"
TITLE=
"Command and Conquer : Tiberian Sun"
CHECKSUM=
"c42d739487169d51d15e0c79c256cc5c"
WORKING_WINE_VERSION=
"2.10"
POL_Debug_Init
POL_SetupWindow_Init
POL_System_TmpCreate
"$PREFIX"
POL_SetupWindow_InstallMethod
"LOCAL,DOWNLOAD"
if
[
"$INSTALL_METHOD"
=
"LOCAL"
]
then
cd
"$HOME"
||
exit
POL_SetupWindow_browse
"$(eval_gettext 'Please select the downloaded archive to extract.')"
"$TITLE"
"Rar Archive (*.rar)|*.rar;*.RAR"
ARCHIVE=
"$APP_ANSWER"
elif
[
"$INSTALL_METHOD"
=
"DOWNLOAD"
]
then
cd
"$POL_System_TmpDir"
POL_Debug_Message
"Download file $DOWNLOADLINK to temp directory."
POL_Download
"$DOWNLOADLINK"
"$CHECKSUM"
ARCHIVE=
"$POL_System_TmpDir/OfficialCnCTiberianSun.rar"
fi
POL_Wine_SelectPrefix
"$PREFIX"
POL_Wine_PrefixCreate
"$WORKING_WINE_VERSION"
Set_Desktop
"On"
"800"
"600"
POL_SetupWindow_message
"$(eval_gettext 'The window resolution is hard set to 800*600.\n If you want a different resolution go to the game directory in: \n\n\t$WINEPREFIX/drive_c/EA Games/Command & Conquer The First Decade/Command & Conquer(tm) Tiberian Sun(tm)/SUN/\n\n and adapt the SUN.ini according to the resolution, but keep in mind that the game cant handle aspect ratios other then 4:3.')"
"$TITLE"
POL_Wine_Direct3D
"DirectDrawRenderer"
"opengl"
POL_Wine_Direct3D
"RenderTargetModeLock"
"readtex"
POL_SetupWindow_wait_next_signal
"$(eval_gettext 'Please wait while $TITLE is installed.')"
"$TITLE"
7z x
"$ARCHIVE"
-o
"$WINEPREFIX/drive_c/."
POL_Shortcut
"SUN.exe"
"$TITLE"
POL_SetupWindow_message
"The setup is completed, have fun playing the game!"
"$TITLE"
POL_System_TmpDelete
POL_SetupWindow_Close
exit