The forum

Ufo: aftermath

Author Replies
lahtis Wednesday 20 February 2013 at 10:05
lahtisAnonymous

Game installers for day!!!

Ufo: aftermath


#!/bin/bash
# Date : (2013-02-20)
# Last revision : (2013-02-20)
# Distribution used to test : Ubuntu 12.10, Nvidia geforce 9800 GT
# Author : lahtis
# Licence : retail
# PlayOnLinux: 4.1.9
# CD-version installer

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

PREFIX="UfoAftermath"
WINEVERSION="1.5.24"
TITLE="Ufo: aftermath"
EDITOR="ALTAR Interactive"
GAME_URL="http://www.ufo-aftermath.com"
AUTHOR="lahtis"

#Initialization
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init
    
POL_Debug_Init
    
# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x86"
POL_Wine_PrefixCreate "$WINEVERSION" 

# Fix pulseaudio issue
which pulseaudio && Set_OS "winxp"

POL_SetupWindow_browse "Please select the installation file to run." "$TITLE installation"
POL_SetupWindow_wait "Installation in progress." "$TITLE installation"
POL_Wine start /unix "$APP_ANSWER"
POL_Wine_WaitExit "$TITLE"

POL_Shortcut "UFO.exe" "$TITLE"

POL_SetupWindow_message "$(eval_gettext '$TITLE has been successfully installed.\\n\\nIf the game crashes at startup, open a terminal and type:\\necho 0|sudo tee /proc/sys/kernel/yama/ptrace_scope')"

POL_SetupWindow_Close

exit

Edited by lahtis


Using Ubuntu 16.04 LTS and latest Playonlinux.
My scripts: https://github.com/lahtis/playonlinux
petch Wednesday 20 February 2013 at 12:48
petch
Developer

Looks good to me.
I have gfx resources from my script for the GOG version, but they're not the best (not much inspiration when I created those :p), so if you want to provide others, go ahead :)
Ronin DUSETTE Wednesday 20 February 2013 at 18:25
Ronin DUSETTE
Admin

POL_SetupWindow_Close

exit

__________________________

Shouldnt that be:

exit 0

?

Please:
Post debug logs & full computer specs in first post
No private messages for general help, use the forums
Read the wiki, Report broken scripts
petch Wednesday 20 February 2013 at 19:01
petch
Developer

Mmmh, according to Bash manpage,
exit [n]
Cause the shell to exit with a status of n. If n is omitted,
the exit status is that of the last command executed. A trap on
EXIT is executed before the shell terminates.

So "exit" may not always return an exit code of 0, thanks for pointing it out.
I don't think install scripts exit code is currently used, but just to be safe it's probably better to use exit 0 systematically.
lahtis Wednesday 20 February 2013 at 21:32
lahtisAnonymous

All my script missing exit 0

Terraria (can anyone change the name to Steam - Terraria)
Tree[d]
Steam - Legend of Grimrock
Ufo: aftermath

Can anyone admin fix it. I cant the are validated.

Using Ubuntu 16.04 LTS and latest Playonlinux.
My scripts: https://github.com/lahtis/playonlinux
petch Thursday 21 February 2013 at 0:19
petch
Developer

petch Thursday 21 February 2013 at 0:24
petch
Developer

@lahtis: by the way, the description is definitely not clear, but the "Tests" field can be used to add functional tests along with the scripts, like Bash functions to check that the downloadable resources are still available.
So, in general, keep that field empty (description of the testing environment in the script headers is perfectly fine).