#!/bin/bash
[
"$PLAYONLINUX"
=
""
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
TITLE=
"Q.U.B.E"
TITLE_DEMO=
"Q.U.B.E (Demo)"
PREFIX=
"qube"
EDITOR=
"Toxic Games"
AUTHOR=
"GNU_Raziel"
WORKING_WINE_VERSION=
"3.0.3"
GAME_VMS=
"256"
POL_SetupWindow_Init
POL_Debug_Init
POL_SetupWindow_presentation
"$TITLE"
"$EDITOR"
"$GAME_URL"
"$AUTHOR"
"$PREFIX"
POL_Wine_SelectPrefix
"$PREFIX"
POL_System_SetArch
"x86"
POL_Wine_PrefixCreate
"$WORKING_WINE_VERSION"
POL_SetupWindow_InstallMethod
"STEAM_DEMO,STEAM,DESURA,LOCAL"
if
[
"$INSTALL_METHOD"
==
"STEAM"
] || [
"$INSTALL_METHOD"
==
"STEAM_DEMO"
];
then
POL_Call
POL_Install_steam
fi
if
[
"$INSTALL_METHOD"
==
"DESURA"
];
then
POL_Call
POL_Install_desura
fi
POL_Call
POL_Install_dxfullsetup
POL_Call
POL_Install_dotnet40
[
"$INSTALL_METHOD"
==
"STEAM_DEMO"
] && { STEAM_ID=
"204610"
; SHORTCUT_NAME=
"$TITLE_DEMO"
; }
[
"$INSTALL_METHOD"
==
"STEAM"
] && { STEAM_ID=
"203730"
; SHORTCUT_NAME=
"$TITLE"
; }
[
"$INSTALL_METHOD"
==
"DESURA"
] && { DESURA_ID=
"1334"
; SHORTCUT_NAME=
"$TITLE"
; }
POL_SetupWindow_VMS
$GAME_VMS
POL_Wine_SetVideoDriver
cd
"$WINEPREFIX/drive_c/windows/temp/"
cat
<< EOF > Fix.reg
[HKEY_CURRENT_USER\\Software\\Wine\\X11 Driver]
"GrabFullscreen"
=
"Y"
EOF
POL_Wine
regedit
"Fix.reg"
[
"$POL_OS"
=
"Linux"
] && Set_SoundDriver
"alsa"
[
"$POL_OS"
=
"Linux"
] && Set_SoundEmulDriver
"Y"
[
"$POL_OS"
=
"Mac"
] && Set_Managed
"Off"
if
[
"$INSTALL_METHOD"
==
"STEAM"
] || [
"$INSTALL_METHOD"
==
"STEAM_DEMO"
];
then
POL_Call
POL_Install_steam_flags
"$STEAM_ID"
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"
elif
[
"$INSTALL_METHOD"
==
"DESURA"
];
then
POL_SetupWindow_message
"$(eval_gettext 'When $TITLE download by Desura is finished,\nDo NOT click on Play.\n\nClose COMPLETELY the Desura interface, \nso that the installation script can continue')"
"$TITLE"
cd
"$WINEPREFIX/drive_c/$PROGRAMFILES/Desura"
POL_Wine
start
/unix
"Desura.exe"
desura:
//launch/games/star-twine/
$DESURA_ID
POL_Wine_WaitExit
"$TITLE"
else
cd
"$HOME"
POL_SetupWindow_browse
"$(eval_gettext 'Please select the setup file to run')"
"$TITLE"
SETUP_EXE=
"$APP_ANSWER"
POL_Wine
start
/unix
"$SETUP_EXE"
POL_Wine_WaitExit
"$TITLE"
POL_Shortcut
"QUBE.exe"
"$TITLE"
"$TITLE.png"
""
"Game;"
fi
POL_SetupWindow_Close
exit
0