Outils pour utilisateurs

Outils du site


jeux:templates

AppInfo.xml

AppInfo.xml
<?xml version="1.0"?>
<AppInfo>
  <Summary>Nom complet du jeu</Summary>
  <About>
    <Purpose>Type de jeu ?</Purpose>
    <Version>1.0</Version>
    <Authors></Authors>
    <License>GPL</License>
    <Homepage>http://www.developpeur.org</Homepage>
  </About>
  <AppMenu>
    <Item label="Run with Nvidia chipset" option="nvidia" />
    <Item label="Run with internal chipset" option="intel" />
  </AppMenu>
</AppInfo>

AppRun

AppRun
#! /bin/sh
 
# Set the name of the executable here.
PROG=./programme
PRIMUSRUN=`which primusrun 2>/dev/null`
APP_DIR=`dirname "$0"`
APP_DIR=`cd "$APP_DIR";pwd`;
 
cd "$APP_DIR"
 
# If you use pack_libs.sh, you can use something like that:
#export LD_LIBRARY_PATH=my_libs:${LD_LIBRARY_PATH}
case "$1" in
  nvidia)
    exec $PRIMUSRUN "$PROG"
    ;;
  intel)
    exec "$PROG"
    ;;
  *)
    chipset=$(xmessage -buttons NVidia,Intel,Annuler -print -center "Quelle carte graphique utiliser ?")
    [[ $chipset == Annuler ]] && exit 0
 
    # Convert $chipset to lower case, use ${chipset^^} for upper case...
    exec "$0" ${chipset,,}
    ;;
esac
 
# EoF
jeux/templates.txt · Dernière modification: 2015/12/04 11:22 par cyriac