Commit b8c50b64 authored by Bruno Coudoin's avatar Bruno Coudoin

First release of an improved generic runit.sh script.

Now each activity contains a simpler script init_path.sh
that contains the various path it requires. The generic
runit.sh source the init_path and then run gcompris with
these values.
There is no more need for a runit.sh in each activity and
a gcompris.bin.


svn path=/branches/gcomprixo/; revision=3024
parent 8b7ab41c
......@@ -39,6 +39,7 @@ cp activity.info $activity_dir/activity
sed -i s/@ACTIVITY_NAME@/$activity_name/g $activity_dir/activity/activity.info
cp gcompris-instance $activity_dir/
cp gcompris-factory $activity_dir/
cp gcompris/gcompris $activity_dir/gcompris.bin
if [ -f $activity_dir/.libs/*.so ]; then
mv $activity_dir/.libs/*.so $activity_dir
fi
......
../gcompris/gcompris
\ No newline at end of file
# Set the different path for this activity
# This is sourced by runit.sh
path=$1
activity=crane
resourcedir=$path/resources
menudir=$path
configdir=$path
localedir=$path/locale
plugindir=$path/.libs
pythonplugindir=$path
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=crane
plugindir=$path
if [ -f $path/.libs/lib$activity.so ]
then
plugindir=$path/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /puzzle/$activity $*
#!/bin/sh
if [ -z $1 ]; then
echo "Usage: runit.sh [GCompris activity directory]"
exit 1
fi
path=`dirname $0`
. $1/init_path.sh
if [ ! -f $localedir ]; then
localedir=/usr/share/locale
fi
if [ ! -d $plugindir ]; then
plugindir=$path
fi
gcompris=$1/gcompris.bin
if [ ! -f $gcompris ]; then
gcompris=$1/../gcompris/gcompris
fi
$gcompris -L $plugindir \
-P $pythonplugindir \
-A $resourcedir \
--config-dir=$configdir \
-M $menudir \
--locale_dir=$path/locale \
-l /puzzle/$activity $*
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment