[Script] GOG.com - Treasure Adventure Game

Автор Replies
MageJohn Wednesday 19 February 2014 at 20:27

This is a script to install Treasure Adventure Game (TAG), from GOG.com. This is my first script, so I based it off of some other GOG.com scripts.
The only nonstandard thing it does is edit TAGs config file so it runs fullscreen, because otherwise it looks wierd. It's perfectly playable without this, but it looks much nicer to have it fullscreen.

By the way, how do I include the images in the installer before it becomes official and they can be downloaded from the server?

Any pointers as to how to improve it would be gratefully recieved!

[code language=playonlinux]
# Date : (2014-2-19 17-40)
# Last revision : (2014-2-19 17-40)
# Wine version used : 1.7.9
# Distribution used to test : Ubuntu 13.10
# Author : MageJohn
# Script licence : GPL v.2
# Depend : None
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"


TITLE="GOG.com - Treasure Adventure Game"
SHORTCUT_NAME="Treasure Adventure Game"


POL_SetupWindow_presentation "$TITLE" "Robit Studios" "http://www.robitstudios.com/" "MageJohn" "$PREFIX"

POL_Call POL_GoG_setup "$GOGID" "7539c85cb8026b5ca87c2a985c7549d8"
POL_Wine_SelectPrefix "$PREFIX"

POL_Call POL_GoG_install

# This line makes sure that the game has the proper resolution.
# Without it, it starts in a kind of windowed mode, but without decoration.
# It just changes on line of the config.ini file.
sed -i "21s/.*/Selected Resolution=0/" "$GOGROOT/Treasure Adventure Game/config.ini"

POL_Shortcut "treasure_adventure_game_1.0.exe" "$SHORTCUT_NAME"





22x22 icon

48x48 icon

petch Wednesday 19 February 2014 at 21:26

Hi MageJohn,
Not much to say about your script, beside maybe some warning about sed for PlayOnMac compatibility (BSD sed can be significantly different from GNU one).

Anyway I tried it, and it worked much better than it used to (https://github.com/petchema/playonlinux/wiki/Treasure-Adventure-Game)
Speed seems to vary significantly, and the crashed when exiting, but the display is now correct.

It would be great to have access to the setup program too, because on, say, an azerty keyboard, half of the control buttons are in weird locations
If you want an example of script that uses a configurator just to run a setup program, you can have a look at, say, the Broken Sword 3 script (l. 58-70):
Hope it helps!

Edited by petch

MageJohn Saturday 22 February 2014 at 14:42

Hey petch!

Thanks for the reply. I'd spent so much time on the installer I hadn't noticed the crashes! They don't seem to follow much of a pattern. Sometimes it crashes on first input, sometimes immediately on opening, and sometimes on quit. However, most of the time it appears to be perfectly playable, luckily. I've attempted it with different versions of wine, but unfortunately, they don't seem to have any effect. Either that, or the resolution is broken.

I'll look into the configurator. How does it work? I haven't encountered it before.
petch Saturday 22 February 2014 at 17:44

I'll look into the configurator. How does it work? I haven't encountered it before.

Quote from MageJohn

The install script has to write a configurator script associated with shortcut; This will create an extra button in the General tab to launch it:

One difficulty is that those are themselves PlayOnLinux style scripts, so you have to be careful with quoting to prevent, say, all variables of the configurator script from being immediately evaluated in the install script.
Easiest way to get started is to look at some examples.

Edited by petch

Вы находитесь здесь: Index > Your creations. > [Script] GOG.com - Treasure Adventure Game