The forum

Sam & Max Season 2

Author Replies
Kjella Saturday 27 September 2008 at 20:46
KjellaAnonymous

Hello,

Episode one of Sam & Max season two does not work because of a special launcher, but episodes 2-5 work. I've screated v3 scripts for these, I'll update the Strong Bad scripts to be v3 as well soon. Ep 202:

#!/bin/bash
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
source "$PLAYONLINUX/lib/sources"
cfg_check

FULLNAME="Sam and Max 202: Moai Better Blues"
CODENAME="sammax-202"
COMPANY="Telltale Games"
WEBSITE="http://www.telltalegames.com/samandmax"
SCRIPTER="Kjella"

INSTDIR="http://www.telltalegames.com/download"
INSTNAME="moaibetterblues"

ICONDIR="http://files.telltalegames.com/productshots/gameicons"
ICONNAME="icon_sammax202.png"

LINKDIR="Program Files/Telltale Games/Sam and Max - Season Two/Episode 202 - Moai Better Blues"
LINKFILE="SamMax202.exe"
LINKNAME="Sam & Max 202: Moai Better Blues"

# Basic setup
POL_SetupWindow_Init
POL_SetupWindow_presentation "$FULLNAME" "$COMPANY" "$WEBSITE" "$SCRIPTER" "$CODENAME"
select_prefixe "$REPERTOIRE/wineprefix/$CODENAME"
POL_SetupWindow_prefixcreate

### Custom: WINE setup
Set_OS "vista"

# Install game
cd $PLAYONLINUX/tmp/
download "Downloading installer from $COMPANY" "$INSTDIR/$INSTNAME" "Downloading installer" 1 1 1 "" 1 1
mv $INSTNAME $CODENAME.exe
wine $CODENAME.exe
rm $CODENAME.exe

### Custom: Remove WINE desktop icon
rm ~/Desktop/Episode\ 202\ -\ Moai\ Better\ Blues.desktop

# Set up the shortcut
cd $REPERTOIRE/icones
wget $ICONDIR/$ICONNAME
mv $ICONNAME $CODENAME.png
POL_SetupWindow_make_shortcut "$CODENAME" "$LINKDIR" "$LINKFILE" "$CODENAME.png" "$LINKNAME"

# Cleanup
POL_SetupWindow_reboot
POL_SetupWindow_Close
exit
Kjella Saturday 27 September 2008 at 20:47
KjellaAnonymous

Ep 203:

#!/bin/bash
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
source "$PLAYONLINUX/lib/sources"
cfg_check

FULLNAME="Sam and Max 203: Night of the Raving Dead"
CODENAME="sammax-203"
COMPANY="Telltale Games"
WEBSITE="http://www.telltalegames.com/samandmax"
SCRIPTER="Kjella"

INSTDIR="http://www.telltalegames.com/download"
INSTNAME="nightoftheravingdead"

ICONDIR="http://files.telltalegames.com/productshots/gameicons"
ICONNAME="icon_sammax203.png"

LINKDIR="Program Files/Telltale Games/Sam and Max - Season Two/Episode 203 - Night of the Raving Dead"
LINKFILE="SamMax203.exe"
LINKNAME="Sam & Max 203: Night of the Raving Dead"

# Basic setup
POL_SetupWindow_Init
POL_SetupWindow_presentation "$FULLNAME" "$COMPANY" "$WEBSITE" "$SCRIPTER" "$CODENAME"
select_prefixe "$REPERTOIRE/wineprefix/$CODENAME"
POL_SetupWindow_prefixcreate

### Custom: WINE setup
Set_OS "vista"

# Install game
cd $PLAYONLINUX/tmp/
download "Downloading installer from $COMPANY" "$INSTDIR/$INSTNAME" "Downloading installer" 1 1 1 "" 1 1
mv $INSTNAME $CODENAME.exe
wine $CODENAME.exe
rm $CODENAME.exe

### Custom: Remove WINE desktop icon
rm ~/Desktop/Episode\ 203\ -\ Night\ of\ the\ Raving\ Dead.desktop

# Set up the shortcut
cd $REPERTOIRE/icones
wget $ICONDIR/$ICONNAME
mv $ICONNAME $CODENAME.png
POL_SetupWindow_make_shortcut "$CODENAME" "$LINKDIR" "$LINKFILE" "$CODENAME.png" "$LINKNAME"

# Cleanup
POL_SetupWindow_reboot
POL_SetupWindow_Close
exit
Kjella Saturday 27 September 2008 at 20:47
KjellaAnonymous

Ep 204:

#!/bin/bash
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
source "$PLAYONLINUX/lib/sources"
cfg_check

FULLNAME="Sam and Max 204: Chariots of the Dogs"
CODENAME="sammax-204"
COMPANY="Telltale Games"
WEBSITE="http://www.telltalegames.com/samandmax"
SCRIPTER="Kjella"

INSTDIR="http://www.telltalegames.com/download"
INSTNAME="chariotsofthedogs"

ICONDIR="http://files.telltalegames.com/productshots/gameicons"
ICONNAME="icon_sammax204.png"

LINKDIR="Program Files/Telltale Games/Sam and Max - Season Two/Episode 204 - Chariots of the Dogs"
LINKFILE="SamMax204.exe"
LINKNAME="Sam & Max 204: Chariots of the Dogs"

# Basic setup
POL_SetupWindow_Init
POL_SetupWindow_presentation "$FULLNAME" "$COMPANY" "$WEBSITE" "$SCRIPTER" "$CODENAME"
select_prefixe "$REPERTOIRE/wineprefix/$CODENAME"
POL_SetupWindow_prefixcreate

### Custom: WINE setup
Set_OS "vista"

# Install game
cd $PLAYONLINUX/tmp/
download "Downloading installer from $COMPANY" "$INSTDIR/$INSTNAME" "Downloading installer" 1 1 1 "" 1 1
mv $INSTNAME $CODENAME.exe
wine $CODENAME.exe
rm $CODENAME.exe

### Custom: Remove WINE desktop icon
rm ~/Desktop/Episode\ 204\ -\ Chariots\ of\ the\ Dogs.desktop

# Set up the shortcut
cd $REPERTOIRE/icones
wget $ICONDIR/$ICONNAME
mv $ICONNAME $CODENAME.png
POL_SetupWindow_make_shortcut "$CODENAME" "$LINKDIR" "$LINKFILE" "$CODENAME.png" "$LINKNAME"

# Cleanup
POL_SetupWindow_reboot
POL_SetupWindow_Close
exit
Kjella Saturday 27 September 2008 at 20:48
KjellaAnonymous

Ep 205:

#!/bin/bash
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
source "$PLAYONLINUX/lib/sources"
cfg_check

FULLNAME="Sam and Max 205: What's New, Beelzebub?"
CODENAME="sammax-205"
COMPANY="Telltale Games"
WEBSITE="http://www.telltalegames.com/samandmax"
SCRIPTER="Kjella"

INSTDIR="http://www.telltalegames.com/download"
INSTNAME="whatsnewbeelzebub"

ICONDIR="http://files.telltalegames.com/productshots/whatsnewbeelzebub"
ICONNAME="whatsnewbeelzebub_icon.png"

LINKDIR="Program Files/Telltale Games/Sam and Max - Season Two/Episode 205 - What's New, Beelzebub"
LINKFILE="SamMax205.exe"
LINKNAME="Sam & Max 205: What's New, Beelzebub?"

# Basic setup
POL_SetupWindow_Init
POL_SetupWindow_presentation "$FULLNAME" "$COMPANY" "$WEBSITE" "$SCRIPTER" "$CODENAME"
select_prefixe "$REPERTOIRE/wineprefix/$CODENAME"
POL_SetupWindow_prefixcreate

### Custom: WINE setup
Set_OS "vista"

# Install game
cd $PLAYONLINUX/tmp/
download "Downloading installer from $COMPANY" "$INSTDIR/$INSTNAME" "Downloading installer" 1 1 1 "" 1 1
mv $INSTNAME $CODENAME.exe
wine $CODENAME.exe
rm $CODENAME.exe

### Custom: Remove WINE desktop icon
rm ~/Desktop/Episode\ 205\ -\ What\'s\ New,\ Beelzebub.desktop

# Set up the shortcut
cd $REPERTOIRE/icones
wget $ICONDIR/$ICONNAME
mv $ICONNAME $CODENAME.png
POL_SetupWindow_make_shortcut "$CODENAME" "$LINKDIR" "$LINKFILE" "$CODENAME.png" "$LINKNAME"

# Cleanup
POL_SetupWindow_reboot
POL_SetupWindow_Close
exit
Kjella Sunday 28 September 2008 at 0:33
KjellaAnonymous

Replace all lines like:
download "Downloading installer from $COMPANY" "$INSTDIR/$INSTNAME" "Downloading installer" 1 1 1 "" 1 1

With the following:
POL_SetupWindow_download "Downloading installer from $COMPANY" "Downloading installer" "$INSTDIR/$INSTNAME"

This will make it work right with v3 setup window.
Quentin PÂRIS Monday 29 September 2008 at 18:12
Quentin PÂRISAnonymous

I think it would be easier to have all in one script ?
Kjella Thursday 2 October 2008 at 12:41
KjellaAnonymous

Well, I'm guessing most people are either hooked or not and buy the whole season, but they're standalone applications and individually purchasable. This season is finished, but if I'm doing season three it'll come episode by episode as they're released so there'll be a season / episode mix then. Also not all episodes are alike, like I said at the top of the first post episode one doesn't work. I think it's fairly clean this way, there's the Gecko download that gets repeated 4x.but it's not a heavy download compared to the 100-150MB episode downloads. I saw that season one was done as a season script but that is stupid - episode 1x04 is free (basicly a free sample) playable by anyone, but under PlayOnLinux you must install the whole season. Same goes if you buy just one episode to check it out (8$ compared to 35$, pretty big difference). Though if episode one ever becomes playable under wine, I might consider a season script as a supplement.
Quentin PÂRIS Thursday 2 October 2008 at 21:28
Quentin PÂRISAnonymous

I think it would be easier if you could choose what episode you want to install (POL_SetupWindow_checkbox_list)
Kjella Wednesday 8 October 2008 at 22:18
KjellaAnonymous

That would be a good idea if I knew it existed, which I didn't. And even when I do, I can't find any instructions on how to use it. There's no documentation for all of v3, but this doesn't even have a counterpart in v2 I can start with neither on the english nor french pages. Obviously I must be getting many values back so it can't be just like the other ones. Is there any current documentation at all except to start reading the source code?
Kjella Wednesday 8 October 2008 at 22:37
KjellaAnonymous

Oh yeah and another thing... is there an easy way to update it if I do it this way? Like if episode 1,2,3 is installed and epsiode 4 is released and I update the script - is there an easy way to detect what's already installed? I would have to do some file checks or something for that. Or is that a solution only for seasons that are finished and that I know this is all the episodes?
Quentin PÂRIS Thursday 9 October 2008 at 21:30
Quentin PÂRISAnonymous

Yes you can if you are quite experimented. You can build "~/.PlayOnLinux/configurations/games_scripts/SamMax" and put file in it.

For POL_SetupWindow_checkbox_list, i think it is
POL_SetupWindow_list "text" "title" "item1~item2~item3~item4~etc..." "~"

and $APP_ANSWER contain "item1~item3" if the user has choosen "item3 and item1"

then you can cut the string with bash and use a for

"~" is the separator
Kjella Monday 27 October 2008 at 0:49
KjellaAnonymous

With an installer patch 2x01 Ice Station Santa now works as well, yay!

#!/bin/bash
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
source "$PLAYONLINUX/lib/sources"
cfg_check

FULLNAME="Sam and Max 201: Ice Station Santa"
CODENAME="sammax-201"
COMPANY="Telltale Games"
WEBSITE="http://www.telltalegames.com/samandmax"
SCRIPTER="Kjella"

INSTDIR="http://www.telltalegames.com/download"
INSTNAME="icestationsanta"

ICONDIR="http://files.telltalegames.com/productshots/gameicons"
ICONNAME="icon_sammax201.png"

LINKDIR="Program Files/Telltale Games/Sam and Max - Season Two/Episode 201 - Ice Station Santa"
LINKFILE="SamMax201.exe"
LINKNAME="Sam & Max 201: Ice Station Santa"

# Basic setup
POL_SetupWindow_Init
POL_SetupWindow_presentation "$FULLNAME" "$COMPANY" "$WEBSITE" "$SCRIPTER" "$CODENAME"
select_prefixe "$REPERTOIRE/wineprefix/$CODENAME"
POL_SetupWindow_prefixcreate

### Custom: WINE setup
Set_OS "vista"

# Install game
cd $PLAYONLINUX/tmp/
POL_SetupWindow_download "Downloading installer from $COMPANY" "Downloading installer" "$INSTDIR/$INSTNAME"
POL_SetupWindow_download "Downloading 1.0.0.3 patch from $COMPANY" "Downloading patch" "http://telltale.vo.llnwd.net/o15/games/samandmax/201/patches/20071129_SamMax201_patch_1003.exe"
mv $INSTNAME $CODENAME.exe
wine $CODENAME.exe
rm $CODENAME.exe
wine 20071129_SamMax201_patch_1003.exe
rm 20071129_SamMax201_patch_1003.exe

### Custom: Remove WINE desktop icon
rm ~/Desktop/Episode\ 201\ -\ Ice\ Station\ Santa.desktop

# Set up the shortcut
cd $REPERTOIRE/icones
wget $ICONDIR/$ICONNAME
mv $ICONNAME $CODENAME.png
POL_SetupWindow_make_shortcut "$CODENAME" "$LINKDIR" "$LINKFILE" "$CODENAME.png" "$LINKNAME"

# Cleanup
POL_SetupWindow_reboot
POL_SetupWindow_Close
exit