root/pbibuild/modules/assaultcube/overlay-dir/PBI.FirstRun.sh

Revision 946, 2.1 KB (checked in by gonzalo, 12 months ago)

AssaultCube? added. I need to know which hidden profile is

  • Property svn:executable set to *
Line 
1#!/bin/sh
2# Filename: PBI.FirstRun.sh
3# Place any custom installation code here.
4# This script will be run before your program is extracted into
5# /Programs/<ProgNameVer>/
6# Available variables:
7# $PROGDIR - Directory where the files will be extracted to.
8# $USERNAME - Username of who started the installation.
9# $INSTALLMODE - Set to 'TEXT' or 'GUI', depending on which installer is running.
10#
11# Return a '2' to halt the PBI installation
12# TIP: 'kdialog' should be used for user interaction.
13# To interact with the progress dialog echo these flags:
14# echo 'TOTALSTEPS: <num>' # Set the total steps of the progress bar
15# echo 'SETSTEPS: <num>' # Set the current progress of the progress bar
16# echo 'MSG: <text>' # Display this text above progress bar
17#########################################
18
19if [ -e "/usr/local/bin/assaultcube_client" ]
20then
21    # Looks like FF is installed, ask if they want to remove the old one
22    ls -al /usr/local/bin/assaultcube_client | grep Programs 2>/dev/null
23    if [ "$?" = "0" ]
24    then
25      kdialog --yesno "AssaultCube is already installed, do you wish to uninstall it?" 
26      if [ "$?" = "0" ]
27      then
28        FF="`ls -al /usr/local/bin/assaultcube_client | cut -d '>' -f 2 | cut -d "/" -f 3`"
29        echo $FF | grep AssaultCube 2>/dev/null
30        if [ "$?" = "0" ]
31        then
32          PBIdelete -remove ${FF}
33          sleep 2
34        else
35          kdialog --sorry "AssaultCube could not be automatically removed... Please remove it in Add / Remove Programs and try again."
36          return 2
37        fi
38      else
39        kdialog --sorry "AssaultCube is already installed, it must be uninstalled before loading this PBI"
40        return 2
41      fi
42     
43    else
44      # Could not find a link to PBI folder
45      kdialog --sorry "AssaultCube is already installed, it must be uninstalled before loading this PBI"
46      return 2
47    fi
48fi 
49
50#3D APPLICATION: 3D ACC IS NEEDED
51
52glxinfo | grep "direct rendering:" | grep " Yes" 2>/dev/null
53if [ "$?" != "0" ]
54then
55   kdialog --msgbox "Your system does not appear to have hardware 3D
56support enabled. This application requires 3D acceleration to function
57properly."
58fi
Note: See TracBrowser for help on using the browser.