The forum

Hasbro Interactive Axis & Allies 1998

Script

Author Replies
hangingman Sunday 4 August 2013 at 0:25
hangingmanAnonymous

A functioning Hasbro Interactive Axis And Allies 1998 installation script follows.  It includes the Axis_133 patch.  You will need to locate this patch before running the script.  This script works on Ubuntu 12.04 with Gnome 2D classic desktop.  This desktop is used because other installed games require it.  Try the script on other desktops, it may work just fine.  It is not being offered for approval because of known limitations on my system.  It should however work for anyone having the CDROM and the Axis_133 patch.

Enjoy

hangingman

#!/bin/bash
# Date : (2013-08-14)
# Last revision : (2013-07-03)
# Wine version used : 1.3.37
# Distribution used to test : Ubuntu 12.04 LTS
# Author : James Denier
# Licence : GPLv3
 
# This script was tested using the CDROM 1998 version of `Axis & Allies'
 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
TITLECOMPLETE="Axis_And_Allies"
TITLE="Axis & Allies"
TITLEC="Axis_Allies"
AUTHOR="James Denier"
PREFIX="AxisAndAllies"
PREFIXDIR="$HOME/.PlayOnLinux/wineprefix/$PREFIX"
WORKINGWINEVERSION="1.3.37"
 
POL_SetupWindow_Init
 
POL_SetupWindow_presentation "$TITLE" "Hasbro Interactive" "http://www.nocurrentwebsite.com/" "$AUTHOR" "$PREFIX"
select_prefix "$PREFIXDIR"
 
# Let the user select a CDROM
POL_SetupWindow_cdrom
 
# Check if this CDROM is the Axis & Allies CDROM
POL_SetupWindow_check_cdrom "axis.ico"
 
# Make sure the right wine version is used, otherwise
# the user will run into a problem regarding copyright protection.
POL_SetupWindow_install_wine "$WORKINGWINEVERSION"
 
Use_WineVersion "$WORKINGWINEVERSION"
 
# Create the prefix for Axis & Allies, a directory called `axis'
POL_SetupWindow_prefixcreate
 
PROGRAMFILES="Program Files"
POL_LoadVar_PROGRAMFILES
 
# Install DirectX9
POL_Call POL_Install_d3dx9
 
# Run installer
POL_SetupWindow_menu "Which installation medium do you want to use?" "Medium" "DVD~CDROM" "~"
wine start /unix "$CDROM/setup.exe"
 
POL_SetupWindow_message "Click Forward when the installation is finished" "$TITLECOMPLETE"
 
#Patch Axis_133
cd "$HOME/.PlayOnLinux/ressources"
POL_SetupWindow_wait_next_signal "Patching game..." "$TITLECOMPLETE"
wine axis_133.exe
POL_SetupWindow_detect_exit
 
# Download and install msxml3.msi
# Override for msxml3 is needed before the install
# The msvcr71 one is just there so that mods will work later on
 

#Create shortcuts
POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/Hasbro Interactive/Axis and Allies" "AxisAllies.exe" "" "$TITLE"
Set_WineVersion_Assign "$WORKINGWINEVERSION" "$TITLE"
 
#Done!
POL_SetupWindow_message "$TITLECOMPLETE installed."
POL_SetupWindow_Close
exit
petch Sunday 4 August 2013 at 9:06
petch

Hi hangingman,
You're using lots of statements that are obsolete in POL 4:
- select_prefix, POL_SetupWindow_install_wine, POL_SetupWindow_prefixcreate: use POL_Wine_SelectPrefix and POL_Wine_PrefixCreate. Don't forget to remove $PREFIXDIR
- Use_WineVersion, Set_WineVersion_Assign: simply obsolete, supoorting more than one Wine version in a prefix has been dropped.
- POL_SetupWindow_make_shortcut: use POL_Shortcut instead. Full path to the binary may not be needed if there's only one exe called AxisAllies.exe in the virtual drive

TITLEC seems unused

POL_SetupWindow_menu "Which installation medium do you want to use?" "Medium" "DVD~CDROM" "~" There's a dedicated POL_SetupWindow_InstallMethod for that. The script is using the media support way before this statement, so the script behavior won't appear very logical to users, I'd put them below this line

I don't get where the axis_133.exe patch come from, seems it's expected to be in the resources but I see no download. Also, in my opinion its place is not in the resources, since it's not useful for other games (resources should be reusable).

wine axis_133.exe: calling wine directly is prohibited, use POL_Wine instead, so that debugging infos get logged. Talking of which, you should add a POL_Debug_Init right after the POL_SetupWindow_Init statement to enable debugger support

POL_SetupWindow_message "Click Forward when the installation is finished" "$TITLECOMPLETE" If the previous POL_Wine is asynchronous (probably because of the use of start /unix), try POL_Wine_WaitExit instead, it will be more user friendly (one less click)

All messages should have localized using $(eval_gettext '') method: http://www.playonmac.com/en/dev-documentation-10.html

I think you should (re)read the scripter's documentation (http://www.playonmac.com/en/documentation.html), and some recently submitted scripts as examples, as many things have changed with POL 4 (and some POL 3 statements may stop working with POL 5).

Edited by 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