Forums

Dungeon Keeper 2 (GoG)

Auteur Réponses
petch Dimanche 18 Décembre 2011 à 2:28
petch

Another game that works out of the box, at least with recent Wine versions (kudos guys!)
As usual, I create shortcuts for documentations, because I think they're often useful, and that it's easy enough to remove the shortcuts you don't use. What do you think?

Enjoy!
https://raw.github.com/petchema/playonlinux/master/dungeonkeeper2-gog
#!/bin/bash
# Date : (2011-12-18 01-01)
# Last revision : (2011-12-18 01-17)
# Wine version used : 1.3.35
# Distribution used to test : Debian Sid (Unstable)
# Author : Pierre Etchemaite petchema@concept-micro.com
# Script licence : GPL v.2
# Program licence : Retail
# Depend :

[ -z "$PLAYONLINUX" ] && exit 0
source "$PLAYONLINUX/lib/sources"

check_install_archive () {
    FILE="$1"
    EXPECTED_NAME="$2"
    EXPECTED_SIZE="$3"
    EXPECTED_MD5="$4"

    POL_SetupWindow_wait "$(eval_gettext 'Checking install archive...')" "$TITLE"
    # Temporarily prevent word splitting
    OLDIFS="$IFS"
    IFS=''
    NAME="$(basename $FILE)"
    SIZE="$(stat -c%s $FILE)"
    MD5="$(POL_MD5_file $FILE)"
    IFS="$OLDIFS"

    if [ $SIZE -ne $EXPECTED_SIZE -o "$MD5" != "$EXPECTED_MD5" ]; then
        POL_Debug_Error "$(eval_gettext 'Install archive mismatch.\\nEither your install archive is corrupted, or is not the expected version.\\nThis script cannot guarantee that installation will work correctly. Please report success or failure to PlayOnLinux forums.')\\n$(eval_gettext 'Name:') $NAME ($(eval_gettext 'expected') $EXPECTED_NAME)\\n$(eval_gettext 'Size:') $SIZE ($(eval_gettext 'expected') $EXPECTED_SIZE)\\n$(eval_gettext 'MD5:') $MD5\\n     ($(eval_gettext 'expected') $EXPECTED_MD5)"
        POL_SetupWindow_question "$(eval_gettext 'Continue?')" "$TITLE"
        [ "$APP_ANSWER" != "TRUE" ] && POL_Debug_Fatal "$(eval_gettext 'Not the expected archive')"
    fi
}


PREFIX="DungeonKeeper2_gog"
WORKING_WINE_VERSION="1.3.35"

TITLE="$(eval_gettext 'Dungeon Keeper II (GoG release)')"
SHORTCUT_NAME="Dungeon Keeper II"
SHORTCUT_SAFE="$SHORTCUT_NAME - $(eval_gettext 'Safe mode')"
SHORTCUT_DOC="$SHORTCUT_NAME - $(eval_gettext 'User manual')"
SHORTCUT_REFCARD="$SHORTCUT_NAME - $(eval_gettext 'Reference Card')"
SHORTCUT_README="$SHORTCUT_NAME - $(eval_gettext 'Readme')"

POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "Bullfrog Productions / Electronic Arts" "http://www.gog.com/en/gamecard/dungeon_keeper_2" "Pierre Etchemaite" "$PREFIX"

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"

cd $HOME
POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"
ARCHIVE="$APP_ANSWER"

check_install_archive "$ARCHIVE" setup_dungeon_keeper_2.exe 436819889 "44ddedeca494543b528ea022aa971a61"


POL_SetupWindow_wait "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE"

# Associate .PDF with native app
# http://wiki.winehq.org/FAQ#head-91bf3f0a8ccbfab8dee96f82fae2f1a489e0d243
# Do it before installing the game, so you have the possibility to open
# PDFs with Win32 reader if you choose to install it
cat <<'_EOF_' > "$REPERTOIRE/tmp/pdfnativereader.reg"
[HKEY_CLASSES_ROOT\\.pdf]
@="PDFfile"
"Content Type"="application/pdf"
[HKEY_CLASSES_ROOT\\PDFfile\\Shell\\Open\\command]
@="winebrowser \\"%1\\""
_EOF_
POL_Wine regedit "$REPERTOIRE/tmp/pdfnativereader.reg"
rm "$REPERTOIRE/tmp/pdfnativereader.reg"

POL_Wine start /unix "$ARCHIVE" || POL_Debug_Fatal "$(eval_gettext 'Error while installing archive')"

POL_Wine_WaitExit "$TITLE"


# GoG work!
Set_OS winxp

POL_SetupWindow_VMS "2"
 
## PlayOnMac Section
[ -n "$PLAYONMAC" ] && Set_SoundDriver "alsa"
[ -n "$PLAYONMAC" ] || Set_Managed "Off"
## End Section

# Doesn't hurt ;)
POL_Wine_reboot

POL_Shortcut "DKII.EXE" "$SHORTCUT_NAME"
POL_Shortcut "DKII_SOFT.EXE" "$SHORTCUT_SAFE"
POL_Shortcut "start.exe" "$SHORTCUT_DOC" "" "'C:/$PROGRAMFILES/GOGcom/Dungeon Keeper 2/manual.pdf'"
POL_Shortcut "start.exe" "$SHORTCUT_REFCARD" "" "'C:/$PROGRAMFILES/GOGcom/Dungeon Keeper 2/reference_card.pdf'"
POL_Shortcut "start.exe" "$SHORTCUT_README" "" "'C:/$PROGRAMFILES/GOGcom/Dungeon Keeper 2/ReadMe.txt'"

POL_SetupWindow_Close

exit
john91 Lundi 9 Juin 2014 à 0:49
john91Anonymous

Hi!

Just installed dungeon keeper2 2.0.0.32 in xubuntu 14.04 64bit and it gets stuck at the wizard's intro video. I can hear the music from the game's menu only.

Update also doesn't work because it tries to find windows instalation and aborts.

Edit: Somehow, the game started to work, but only on full screen.

I also would love to play this windowed and manage to get the mouse off the game to do stuff on desktop.

Thanks in advance.

J

Edité par john91

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca-notice@playonlinux.com