Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: ad373da899
Fetching contributors…

Cannot retrieve contributors at this time

94 lines (69 sloc) 3.582 kB
#!/bin/bash
# Date : (2011-12-25 01-41)
# Last revision : (2012-09-15 12-09)
# Wine version used : 1.5.0
# Distribution used to test : Debian Sid (Unstable)
# Author : Pierre Etchemaite pe-pol@concept-micro.com
# Script licence : GPL v.2
# Program licence : Retail
# Depend :
# Crashes with 1.5.0 (tab key)
# workaround: WINEDEBUG=warn+heap
# Lots of crashes with 1.3.35 - pattern in flashlight (intentional?
# not exactly the one observed in native demo though), and
# flashlight goes thru obstacles (probably not intentional)
# Crashes with 1.3.34-vertex-blending
# Still some crashes with 1.3.34
# Still some crashes with 1.3.33
# Still some crashes with 1.3.32 (mods, special keys?)
# Still some crashes with 1.3.31
# Still some crashes with 1.3.30 (tab key?)
# Still some crashes with 1.3.29 (tab key)
# No sound out of 1.3.28, and still some crashes
# Still some crashes with 1.3.27-rawinput2 (tab key)
# Crashes woth 1.2.3 (tab key)
# Crashes with 0.9.54 (tab key)
[ -z "$PLAYONLINUX" ] && exit 0
source "$PLAYONLINUX/lib/sources"
GOGID="shadowgrounds"
PREFIX="ShadowGrounds_gog"
WORKING_WINE_VERSION="1.5.0"
TITLE="ShadowGrounds (GoG release)"
SHORTCUT_NAME="Shadowgrounds"
SHORTCUT_EDITOR="Shadowgrounds Editor"
POL_SetupWindow_Init
# 4.0.15 needed for complex POL_Shortcut_InsertBeforeWine
POL_RequiredVersion "4.0.15" || POL_Debug_Fatal "$APPLICATION_TITLE 4.0.15 is required to install $TITLE"
POL_Debug_Init
POL_SetupWindow_presentation "$TITLE" "Frozenbyte / Meridian4" "http://www.gog.com/en/gamecard/$GOGID" "Pierre Etchemaite" "$PREFIX"
POL_SetupWindow_message "$(eval_gettext 'Now, the bad news. No matter what version of Wine I tried, the game\nshowed some probability of crashing when displaying\nthe map/objectives 2D panel. Only use it when necessary and\nyou should be able to complete the game.\n(If that really bothers you, the Linux version of ShadowGrounds does\nnot have this problem).')" "$TITLE"
POL_Call POL_GoG_setup "$GOGID" "398af39f2b133fde083897c6c6a1c2f6"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
# Prevent GoG installer from installing Acrobat Reader or Foxit in each prefix
POL_Call POL_Function_SetNativeExtension "pdf"
POL_Wine_WaitBefore "$TITLE"
POL_Wine "$POL_GoG_location" || POL_Debug_Fatal "$(eval_gettext 'Error while installing archive')"
Set_OS winxp
POL_SetupWindow_VMS "128"
POL_Call POL_Install_wmp10
POL_Wine_X11Drv "GrabFullScreen" "Y"
# Doesn't hurt ;)
POL_Wine_reboot
LNG_EDITOR="$(eval_gettext 'The level editor and its documentation') (1)"
POL_SetupWindow_checkbox_list "$(eval_gettext 'What extra shortcuts should be created?')" "$TITLE" "${LNG_EDITOR}" "~"
SHORTCUTS="$APP_ANSWER"
POL_Shortcut "Shadowgrounds Launcher.exe" "$SHORTCUT_NAME" "$SHORTCUT_NAME.png" ""
# Restore resolution after game leaves fullscreen
# Any drawbacks?
POL_Shortcut_InsertBeforeWine "$SHORTCUT_NAME" 'RESOLUTION=`xrandr --current|sed -e "s/^.*current \([0-9]\+\) x \([0-9]\+\).*$/\1x\2/p; d"`'
echo 'xrandr -s $RESOLUTION' >> "$POL_USER_ROOT/shortcuts/$SHORTCUT_NAME"
POL_Shortcut_Document "$SHORTCUT_NAME" "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Shadowgrounds/Manual.pdf"
# C:/$PROGRAMFILES/GOG.com/Shadowgrounds/Readme.txt
# C:/$PROGRAMFILES/GOG.com/Shadowgrounds/weapon_chart.pdf
if echo "$SHORTCUTS" | grep -q "$LNG_EDITOR"; then
POL_Shortcut "Shadowgrounds Editor.exe" "$SHORTCUT_EDITOR" "$SHORTCUT_EDITOR.png" ""
POL_Shortcut_Document "$SHORTCUT_EDITOR" "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Shadowgrounds/EditorManual.rtf"
fi
POL_SetupWindow_Close
exit
Jump to Line
Something went wrong with that request. Please try again.