The forum

[scripts] Age of empires 2

update script, testing and expansions

Author Replies
Jump to the page: 1 - 2
petch Tuesday 3 September 2013 at 20:54
petch

Script validated, sorry for the delay the notifications happen thru email and I seldom check my emails :p
fekir Thursday 5 September 2013 at 9:19
fekirAnonymous

Hi,
I've noticed that the old script are still present.

Shouldn't it be bettere to have only one POL installer per game?
petch Thursday 5 September 2013 at 22:51
petch

I don't know the game, which scripts are being superseded?
http://www.playonmac.com/en/app-147-Age_Of_Empires_II__The_Age_of_Kings.html
and
http://www.playonmac.com/en/app-305-Age_Of_Empires_II__The_Conquerors_Expansion.html
?
fekir Friday 6 September 2013 at 7:57
fekirAnonymous

Yes, both of them.
petch Friday 6 September 2013 at 13:50
petch

fekir Wednesday 4 December 2013 at 22:25
fekirAnonymous

Update for Age of empires 2, The conquerors.

This should fix a bug with the suggested update
As I wrote on the bug ticket, I've some problem using wine, so I was not able to test the script, I've simply added the possibility to choose the language.


#!/bin/bash
# Date:
# Last revision:
# Distribution used to test: Debian 8 (Jessie) x86_64
# Author: Fekir
# Wine version used: 1.6
# Depend: "Age Of Empires II: The Age of Kings"

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

#############
# Variables #
#############
TITLE="Age Of Empires II: The Conquerors"
PREFIX="AOE2_conq"
WORKING_WINE_VERSION="1.6"

#################
# Debug Options #
#################
POL_SetupWindow_Init
POL_Debug_Init

##############################################
# Check if AOE2: The Conquerors is installed #
# and if PlayOnLinux is v 4.1.6+             #
##############################################
POL_RequiredVersion 4.1.6 || POL_Debug_Fatal "This program requires $APPLICATION_TITLE 4.1.6"
if [ "$(POL_Wine_PrefixExists "AOE2_king")" = "False" ]; then
    POL_SetupWindow_message "$(eval_gettext 'Please install "Age Of Empires II: The Age of Kings"')" "$TITLE"
    POL_SetupWindow_Close
    exit
fi

################
# Presentation #
################
POL_GetSetupImages "http://files.playonlinux.com/resources/icones_back2/Age%20Of%20Empires%20II%20:%20The%20Conquerors%20Expansion" "" "$TITLE"
POL_SetupWindow_presentation "$TITLE" "Ensemble Studios" "http://www.ensemblestudios.com/" "Fekir" "$PREFIX"

###############################################
# Prepare everything for AOE2: The Conquerors #
###############################################
POL_System_SetArch "x86"
POL_System_TmpCreate "$PREFIX"
POL_Wine_SelectPrefix "$PREFIX"
POL_System_CopyDirectory "$POL_USER_ROOT/wineprefix/AOE2_king" "$WINEPREFIX"
POL_LoadVar_PROGRAMFILES

#########################
# Select file & install #
#########################
POL_SetupWindow_InstallMethod "CD,LOCAL"
SETUP_OPTIONS=""
if [ "$INSTALL_METHOD" = "CD" ]; then
    POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')" "$TITLE"
    POL_SetupWindow_cdrom
    POL_SetupWindow_check_cdrom "aocsetup.exe"
    SETUP_EXE="$CDROM/aocsetup.exe"
else
    cd "$HOME"
    POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
    SETUP_EXE="$APP_ANSWER"
fi
POL_SetupWindow_wait "$(eval_gettext 'Please wait while $TITLE is installed.')" "$TITLE"
POL_Wine start /unix "$SETUP_EXE" "$SETUP_OPTIONS"
POL_Wine_WaitExit "$TITLE"
POL_Wine_reboot

###################
# Making shortcut #
###################
POL_Shortcut "age2_x1.exe" "$TITLE" "" "-nostartup" "Game;StrategyGame;"

#########################################
# Install AOE: Age of Kings, Patch 1.0c #
#########################################
POL_SetupWindow_question "Do you want to install the 1.0c Patch? (Recommended)" "Patch"
if [ "$APP_ANSWER" = "TRUE" ]; then
    POL_SetupWindow_InstallMethod "DOWNLOAD,LOCAL"
    SETUP_OPTIONS=""
    if [ "$INSTALL_METHOD" = "LOCAL" ]; then
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
    elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
        cd "$POL_System_TmpDir"
        SETUP_EXE="Age2XPatch.exe"
        LINK="http://download.microsoft.com/download/ageIIConquerers/Update/1.0c/W982KMe/"
        POL_SetupWindow_menu "Choose the game language" "$(eval_gettext 'Choose the game language')" "English~French~Italian~Spagnolo~German~Japanese" "~"
        cd "$POL_System_TmpDir"
        if [ "$APP_ANSWER" == "English" ]; then
            POL_Download "$LINK/EN-US/Age2XPatch.exe" "8170ef5a8fa02725dcecc230b2f172ec"
        elif [ "$APP_ANSWER" == "French" ]; then
            POL_Download "$LINK/FR/Age2XPatch.exe" "6e7f97ea81d54d0f5fe7f7ee38c2337b"
        elif [ "$APP_ANSWER" == "German" ]; then
            POL_Download "$LINK/DE/Age2XPatch.exe" "c7106b6684e5b8ca9f0168151e77c272"
        elif [ "$APP_ANSWER" == "Italian" ]; then
            POL_Download "$LINK/IT/Age2XPatch.exe" "1b9a28b035208904836bc434fa1d9fec"
        elif [ "$APP_ANSWER" == "Japanese" ]; then
            POL_Download "$LINK/JA/Age2XPatch.exe" "472af2fa5ba1a735784e5cf0e5cca395"
        elif [ "$APP_ANSWER" == "Spagnolo" ]; then
            POL_Download "$LINK/ES/Age2XPatch.exe" "f8d7ec2ad8e3ae1262b1106da542b85d"
        fi
    fi
    POL_SetupWindow_wait "$(eval_gettext 'Please wait while the 1.0c Patch is installed.')" "$TITLE"
    POL_Wine start /unix "$SETUP_EXE" "$SETUP_OPTIONS"
    POL_Wine_WaitExit "$TITLE"
    POL_Wine_reboot
fi

################
# Clean & exit #
################
POL_System_TmpDelete
POL_SetupWindow_Close
exit

petch Wednesday 4 December 2013 at 23:09
petch


You did not take into account any of the fixes or improvements done to the script in the repository, though
petch Wednesday 4 December 2013 at 23:38
petch

After some merge work, it looks like this:
#!/bin/bash
# Date : (2013-08-20 15-22)
# Last revision : (2013-12-04 23-32)
# Distribution used to test: Debian 8 (Jessie) x86_64
# Author: Fekir
# Wine version used: 1.6
# Depend: "Age Of Empires II: The Age of Kings"

# CHANGELOG
# [SuperPlumus] (2013-09-29 22-12)
#   Update $TITLE var
#   Clean code
#   Update gettext messages

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

#############
# Variables #
#############
TITLE="Age of Empires II : The Conquerors"
TITLE_REQUIRED="Age of Empires II : The Age of Kings"
PREFIX="AOE2_conq"
WORKING_WINE_VERSION="1.6"

#################
# Debug Options #
#################
POL_SetupWindow_Init
POL_Debug_Init

################################################
# Check if AOE2: The Age of Kings is installed #
# and if PlayOnLinux is v 4.1.6+               #
################################################
POL_RequiredVersion 4.1.6 || POL_Debug_Fatal "This program requires $APPLICATION_TITLE 4.1.6"
if [ "$(POL_Wine_PrefixExists "AOE2_king")" = "False" ]; then
    POL_SetupWindow_message "$(eval_gettext 'This is an installer for an update or an addon;\nPlease install $TITLE_REQUIRED first')" "$TITLE"
    POL_SetupWindow_Close
    exit
fi

################
# Presentation #
################
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "" "$TITLE"
POL_SetupWindow_presentation "$TITLE" "Ensemble Studios" "http://www.ensemblestudios.com/" "Fekir" "$PREFIX"

###############################################
# Prepare everything for AOE2: The Conquerors #
###############################################
POL_System_SetArch "x86"
POL_System_TmpCreate "$PREFIX"
POL_Wine_SelectPrefix "$PREFIX"
POL_System_CopyDirectory "$POL_USER_ROOT/wineprefix/AOE2_king" "$WINEPREFIX"
POL_LoadVar_PROGRAMFILES

#########################
# Select file & install #
#########################
POL_SetupWindow_InstallMethod "CD,LOCAL"
SETUP_OPTIONS=""
if [ "$INSTALL_METHOD" = "CD" ]; then
    POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disk drive.')" "$TITLE"
    POL_SetupWindow_cdrom
    POL_SetupWindow_check_cdrom "aocsetup.exe"
    SETUP_EXE="$CDROM/aocsetup.exe"
else
    cd "$HOME"
    POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
    SETUP_EXE="$APP_ANSWER"
fi
POL_Wine_WaitBefore "$TITLE"
POL_Wine start /unix "$SETUP_EXE" "$SETUP_OPTIONS"
POL_Wine_WaitExit "$TITLE"
POL_Wine_reboot

###################
# Making shortcut #
###################
POL_Shortcut "age2_x1.exe" "$TITLE" "" "-nostartup" "Game;StrategyGame;"

#########################################
# Install AOE: Age of Kings, Patch 1.0c #
#########################################
POL_SetupWindow_question "$(eval_gettext 'Do you want to install the 1.0c Patch?')" "$TITLE"
if [ "$APP_ANSWER" = "TRUE" ]; then
    POL_SetupWindow_InstallMethod "DOWNLOAD,LOCAL"
    SETUP_OPTIONS=""
    if [ "$INSTALL_METHOD" = "LOCAL" ]; then
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
    elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
        cd "$POL_System_TmpDir"
        SETUP_EXE="Age2XPatch.exe"
        LINK="http://download.microsoft.com/download/ageIIConquerers/Update/1.0c/W982KMe/"
        POL_SetupWindow_menu "Choose the game language" "$(eval_gettext 'Choose the game language')" "English~French~Italian~Spagnolo~German~Japanese" "~"
        cd "$POL_System_TmpDir"
        if [ "$APP_ANSWER" == "English" ]; then
            POL_Download "$LINK/EN-US/Age2XPatch.exe" "8170ef5a8fa02725dcecc230b2f172ec"
        elif [ "$APP_ANSWER" == "French" ]; then
            POL_Download "$LINK/FR/Age2XPatch.exe" "6e7f97ea81d54d0f5fe7f7ee38c2337b"
        elif [ "$APP_ANSWER" == "German" ]; then
            POL_Download "$LINK/DE/Age2XPatch.exe" "c7106b6684e5b8ca9f0168151e77c272"
        elif [ "$APP_ANSWER" == "Italian" ]; then
            POL_Download "$LINK/IT/Age2XPatch.exe" "1b9a28b035208904836bc434fa1d9fec"
        elif [ "$APP_ANSWER" == "Japanese" ]; then
            POL_Download "$LINK/JA/Age2XPatch.exe" "472af2fa5ba1a735784e5cf0e5cca395"
        elif [ "$APP_ANSWER" == "Spagnolo" ]; then
            POL_Download "$LINK/ES/Age2XPatch.exe" "f8d7ec2ad8e3ae1262b1106da542b85d"
        fi
    fi
    POL_Wine_WaitBefore "$TITLE"
    POL_Wine start /unix "$SETUP_EXE" "$SETUP_OPTIONS"
    POL_Wine_WaitExit "$TITLE"
    POL_Wine_reboot
fi

################
# Clean & exit #
################
POL_System_TmpDelete
POL_SetupWindow_Close
exit


Does that look ok?

Edited by petch

petch Wednesday 9 July 2014 at 20:22
petch

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