Skip to content

HTTPS clone URL

Subversion checkout URL

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

Cannot retrieve contributors at this time

138 lines (106 sloc) 6.169 kB
#!/bin/bash
# Date : (2012-05-10 00-04)
# Last revision : (2012-06-06 21-04)
# Wine version used : 1.4-dos_support_0.5
# 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="might_and_magic_6_limited_edition"
PREFIX="MightAndMagic6Pack_gog"
WORKING_WINE_VERSION="1.4-dos_support_0.5"
TITLE="Might and Magic 6-Pack Limited Edition (GoG release)"
SHORTCUT_NAME1="Might and Magic 1 - Book I"
SHORTCUT_NAME2="Might and Magic 2 - Gates to Another World"
SHORTCUT_NAME3="Might and Magic 3 - Isles of Terra"
SHORTCUT_NAME45="Might and Magic 4-5 - World of Xeen"
SHORTCUT_NAME5A="Might and Magic 5a - Swords of Xeen"
SHORTCUT_NAME6="Might and Magic 6 - The Mandate to Heaven"
SHORTCUT_NAME345PW="Might and Magic Password reference card 3-4-5"
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init
# For POL_unbase64
POL_RequiredVersion "4.0.17" || POL_Debug_Fatal "$APPLICATION_TITLE 4.0.17 is required to install $TITLE"
POL_Debug_Init
POL_SetupWindow_presentation "$TITLE" "New World Computing Inc. / Ubisoft" "http://www.gog.com/en/gamecard/$GOGID" "Pierre Etchemaite" "$PREFIX"
POL_Call POL_GoG_setup "$GOGID" "8d83c2301cf9f58567e34e395cd08738"
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')"
# GoG work!
Set_OS winxp
POL_SetupWindow_VMS "1"
# Doesn't hurt ;)
POL_Wine_reboot
# Problem with shortizing subdirectories side-by-side :(
MIGHTANDMAGIC1="MM1"
mv "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Might & Magic VI Limited Edition/Might and Magic 1 - Book I" "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Might & Magic VI Limited Edition/$MIGHTANDMAGIC1"
MIGHTANDMAGIC2="MM2"
mv "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Might & Magic VI Limited Edition/Might and Magic 2 - Gates to Another World" "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Might & Magic VI Limited Edition/$MIGHTANDMAGIC2"
MIGHTANDMAGIC3="MM3"
mv "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Might & Magic VI Limited Edition/Might and Magic 3 - Isles of Terra" "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Might & Magic VI Limited Edition/$MIGHTANDMAGIC3"
MIGHTANDMAGIC45="MM4-5"
mv "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Might & Magic VI Limited Edition/Might and Magic 4-5 - World of Xeen" "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Might & Magic VI Limited Edition/$MIGHTANDMAGIC45"
MIGHTANDMAGIC5A="MM5A"
mv "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Might & Magic VI Limited Edition/Might and Magic - Swords of Xeen" "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Might & Magic VI Limited Edition/$MIGHTANDMAGIC5A"
cat <<_EOFCFG_ >> "$WINEPREFIX/playonlinux_dos.cfg"
dosbox_memsize=16
cpu_core=auto
cpu_cycles=max
ipx_enable=1
ipx_connection=1
ipx_ipx=true
_EOFCFG_
[ "$POL_OS" = "Linux" ] && echo "render_scaler=hq2x" >> "$WINEPREFIX/playonlinux_dos.cfg"
# Using SBPro 0x220 7 1 fixes lockups in WoX and SoX
# http://www.gog.com/en/forum/might_and_magic_series/world_of_xeen_crashes_when_i_sign_in_in_a_tavern
cd "$POL_USER_ROOT/tmp"
POL_unbase64 <<_EOFCFG_ > "XEEN.CFG"
BwAgAgMAIAIHAAAAAAAAAAAAAQABAAAAAQAAAA==
_EOFCFG_
if [ -s "XEEN.CFG" ]; then
cp "XEEN.CFG" "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Might & Magic VI Limited Edition/$MIGHTANDMAGIC45/XEEN.CFG"
cp "XEEN.CFG" "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Might & Magic VI Limited Edition/$MIGHTANDMAGIC5A/XEEN.CFG"
fi
cat <<_EOFBAT_ > "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Might & Magic VI Limited Edition/$MIGHTANDMAGIC1/MM1.BAT"
@ECHO OFF
CONFIG -set "cpu cycles=2000"
MM.EXE
EXIT
_EOFBAT_
cat <<_EOFBAT_ > "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Might & Magic VI Limited Edition/$MIGHTANDMAGIC2/MM2.BAT"
@ECHO OFF
CONFIG -set "cpu cycles=8000"
loadfix -4 MM2.EXE
EXIT
_EOFBAT_
cat <<_EOFBAT_ > "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Might & Magic VI Limited Edition/$MIGHTANDMAGIC3/MM3.BAT"
@ECHO OFF
CONFIG -set "cpu cycles=8000"
Mm3.com
EXIT
_EOFBAT_
POL_Shortcut "MM1.BAT" "$SHORTCUT_NAME1" "$SHORTCUT_NAME1.png" ""
POL_Shortcut_Document "$SHORTCUT_NAME1" "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Might & Magic VI Limited Edition/$MIGHTANDMAGIC1/Manual.pdf"
# C:\Program Files\GOG.com\Might & Magic VI Limited Edition/Might and Magic 1 - Book I\Readme.txt
POL_Shortcut "MM2.BAT" "$SHORTCUT_NAME2" "$SHORTCUT_NAME2.png" ""
POL_Shortcut_Document "$SHORTCUT_NAME2" "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Might & Magic VI Limited Edition/$MIGHTANDMAGIC2/Manual.pdf"
POL_Shortcut "MM3.BAT" "$SHORTCUT_NAME3" "$SHORTCUT_NAME3.png" ""
POL_Shortcut_Document "$SHORTCUT_NAME3" "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Might & Magic VI Limited Edition/$MIGHTANDMAGIC3/Manual.pdf"
POL_Shortcut "XEEN.EXE" "$SHORTCUT_NAME45" "$SHORTCUT_NAME45.png" ""
POL_Shortcut_Document "$SHORTCUT_NAME45" "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Might & Magic VI Limited Edition/$MIGHTANDMAGIC45/Manual_world_of_xeen.pdf"
POL_Shortcut "SWORDS.EXE" "$SHORTCUT_NAME5A" "$SHORTCUT_NAME5A.png" ""
POL_Shortcut_Document "$SHORTCUT_NAME5A" "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Might & Magic VI Limited Edition/$MIGHTANDMAGIC5A/Manual_Swords_of_Xeen.PDF"
POL_Shortcut "MM6.exe" "$SHORTCUT_NAME6" "$SHORTCUT_NAME6.png" ""
POL_Shortcut_Document "$SHORTCUT_NAME6" "$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Might & Magic VI Limited Edition/Might and Magic 6 - The Mandate of Heaven/Manual.pdf"
# C:\Program Files\GOG.com\Might & Magic VI Limited Edition\Might and Magic 6 - The Mandate of Heaven\Readme.txt
# FIXME
POL_Shortcut "winebrowser.exe" "$SHORTCUT_NAME345PW" "" "'$WINEPREFIX/drive_c/$PROGRAMFILES/GOG.com/Might & Magic VI Limited Edition/$MIGHTANDMAGIC3/keys_3_5.pdf'"
POL_SetupWindow_Close
exit
Jump to Line
Something went wrong with that request. Please try again.