@@ -0,0 +1,112 @@ +#!/bin/bash +# Date : (2012-02-29 21:00) +# Last revision : N/A +# Wine version used : 1.4-rc4-raw3 +# Distribution used to test : Linux Mint 12 x64 +# Author : GNU_Raziel +# Licence : Retail +# Only For : http://www.playonlinux.com + +## Begin Note ## +# Used RawInput3 patch to fix Bug #20395 - http://bugs.winehq.org/show_bug.cgi?id=20395 +## End Note ## + +[ "$PLAYONLINUX" = "" ] && exit 0 +source "$PLAYONLINUX/lib/sources" + +TITLE="Shank 2" +TITLE_DEMO="Shank 2 (Demo)" +PREFIX="shank2" +EDITOR="Klei Entertainment" +GAME_URL="http://www.shankgame.com/" +AUTHOR="GNU_Raziel" +WORKING_WINE_VERSION="1.4-rc4-raw3" +GAME_VMS="256" + +# Starting the script +rm "$POL_USER_ROOT/tmp/*.jpg" +POL_GetSetupImages "http://files.playonlinux.com/resources/setups/shank2/top.jpg" "http://files.playonlinux.com/resources/setups/shank2/left.jpg" "$TITLE" +POL_SetupWindow_Init + +# Starting debugging API +POL_Debug_Init + +POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX" + +# Setting prefix path +POL_Wine_SelectPrefix "$PREFIX" + +# Downloading wine if necessary and creating prefix +POL_System_SetArch "auto" +POL_Wine_PrefixCreate "$WORKING_WINE_VERSION" + +# Choose between DVD and Digital Download version +POL_SetupWindow_InstallMethod "STEAM_DEMO,STEAM,LOCAL" + +# Installing mandatory dependencies +if [ "$INSTALL_METHOD" == "STEAM" ] || [ "$INSTALL_METHOD" == "STEAM_DEMO" ]; then + POL_Call POL_Install_steam +fi +POL_Call POL_Install_dxfullsetup # Fix black screens issues + +# Mandatory pre-install fix for steam +if [ "$INSTALL_METHOD" == "STEAM_DEMO" ]; then + POL_Call POL_Install_steam_flags "204680" +elif [ "$INSTALL_METHOD" == "STEAM" ]; then + POL_Call POL_Install_steam_flags "102840" +fi + +# Begin installation +if [ "$INSTALL_METHOD" == "STEAM_DEMO" ]; then + 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/204680 + POL_Wine_WaitExit "$TITLE" +elif [ "$INSTALL_METHOD" == "STEAM" ]; then + 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/102840 + POL_Wine_WaitExit "$TITLE" +else + # Asking then installing DDV of the game + 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" +fi + +# Asking about memory size of graphic card +POL_SetupWindow_VMS $GAME_VMS + +# Set Graphic Card information keys for wine +POL_Wine_SetVideoDriver + +## Fix for this game +# Sound problem fix - pulseaudio related +[ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa" +[ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y" +## End Fix + +## PlayOnMac Section +[ "$POL_OS" = "Mac" ] && Set_Managed "Off" +## End Section + +# Cleaning temp +if [ -e "$WINEPREFIX/drive_c/windows/temp/" ]; then + rm -rf "$WINEPREFIX/drive_c/windows/temp/*" + chmod -R 777 "$POL_USER_ROOT/tmp/" + rm -rf "$POL_USER_ROOT/tmp/*" +fi + +# Making shortcut +if [ "$INSTALL_METHOD" == "STEAM_DEMO" ]; then + POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/204680" +elif [ "$INSTALL_METHOD" == "STEAM" ]; then + POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/102840" +else + POL_Shortcut "shank2.exe" "$TITLE" "$TITLE.png" "" +fi + +POL_SetupWindow_Close +exit 0 \ No newline at end of file