Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 31aebd8b66
Fetching contributors…

Cannot retrieve contributors at this time

93 lines (64 sloc) 2.769 kb
#!/bin/bash
# Date : (2011-12-11 20-52)
# Last revision : (2012-04-19 00-38)
# Wine version used : 1.3.34
# Distribution used to test : Debian Sid (Unstable)
# Author : Pierre Etchemaite pe-pol@concept-micro.com
# Script licence : GPL v.2
# Program licence : Retail
# Depend :
[ -z "$PLAYONLINUX" ] && exit 0
source "$PLAYONLINUX/lib/sources"
GOGID="age_of_wonders_shadow_magic"
PREFIX="AgeOfWonders3_gog"
WORKING_WINE_VERSION="1.3.34"
TITLE="Age of Wonders III: Shadow Magic (GoG release)"
SHORTCUT_NAME="Age of Wonders: Shadow Magic"
SHORTCUT_EDITOR="$SHORTCUT_NAME - $(eval_gettext 'Editor')"
POL_SetupWindow_Init
POL_Debug_Init
POL_SetupWindow_presentation "$TITLE" "Triumph Studios" "http://www.gog.com/en/gamecard/$GOGID" "Pierre Etchemaite" "$PREFIX"
POL_Call POL_GoG_setup "$GOGID" "85786a3a6872896adc1720536a626f05"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_SetupWindow_wait "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE"
# Prevent GoG installer from installing Acrobat Reader or Foxit in each prefix
POL_Call POL_Function_SetNativeExtension "pdf"
POL_Wine "$POL_GoG_location" || POL_Debug_Fatal "$(eval_gettext 'Error while installing archive')"
POL_Wine_WaitExit "$TITLE"
POL_Call POL_Install_directplay
# GoG work!
Set_OS winxp
POL_SetupWindow_VMS "16"
# Direct3D: off; Cursor: colors
cat <<_EOFINI_ > "$POL_USER_ROOT/tmp/aow3_video.reg"
REGEDIT4
[HKEY_CURRENT_USER\Software\Triumph Studios\Age of Wonders Shadow Magic\Video]
"Cursor Mode"=dword:00000002
"Use Direct3D"=dword:00000000
_EOFINI_
POL_Wine regedit "$POL_USER_ROOT/tmp/aow3_video.reg"
rm "$POL_USER_ROOT/tmp/aow3_video.reg"
# Doesn't hurt ;)
POL_Wine_reboot
POL_Shortcut "AoWSM.exe" "$SHORTCUT_NAME"
# Now the trick: Shadow magic needs a "slow" wineserver to be responsive!
# http://appdb.winehq.org/objectManager.php?sClass=version&iId=3101&iTestingId=14987
POL_Shortcut_InsertBeforeWine "$SHORTCUT_NAME" "POL_Wine_AutoSetVersionEnv"
POL_Shortcut_InsertBeforeWine "$SHORTCUT_NAME" "wineserver -k"
POL_Shortcut_InsertBeforeWine "$SHORTCUT_NAME" "nice -19 wineserver"
POL_Shortcut_Document "$SHORTCUT_NAME" "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Age of Wonders Shadow Magic/QuickStart.pdf"
# C:/$PROGRAMFILES/GOG.com/Age of Wonders Shadow Magic/Readme.html
POL_Shortcut "AoWSMEd.exe" "$SHORTCUT_EDITOR"
POL_SetupWindow_Close
cat <<_EOF_ > "$POL_USER_ROOT/configurations/configurators/$SHORTCUT_NAME"
#!/bin/bash
[ -z "\$PLAYONLINUX" ] && exit 0
source "\$PLAYONLINUX/lib/sources"
export WINEPREFIX="\$POL_USER_ROOT/wineprefix/$PREFIX"
export WINEDEBUG=""
POL_LoadVar_PROGRAMFILES
cd "\$WINEPREFIX/drive_c/\$PROGRAMFILES/GOG.com/Age of Wonders Shadow Magic/" || exit 1
POL_Wine AoWSMSetup.exe
_EOF_
exit
Jump to Line
Something went wrong with that request. Please try again.