Commit 02ea1c11 authored by Bruno Coudoin's avatar Bruno Coudoin

improved bundleit, - fixed mandatory sound check and import, now added a

improved bundleit,
 - fixed mandatory sound check and import, now added a token mandatory_sound_dir in the menu
   file for that.
 - now manage activities with external resources (uncomplete, the runit.sh file is not adapted for
   having changing places for resources.
 - now manage activities with external plugins (not python)

Now acivities that does point to an other activity resources must not have the
resources directory.


svn path=/branches/gcomprixo/; revision=3021
parent 725d62cf
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=administration
......@@ -9,7 +10,7 @@ then
plugindir=$path/../boards/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -a $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=advanced_colors
......@@ -9,7 +10,7 @@ then
plugindir=$path/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /discovery/colors_group/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=algebra_by
type=algebra
......@@ -10,7 +11,7 @@ then
plugindir=$path/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /math/algebramenu/algebra_group/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=algebra_guesscount
......@@ -9,7 +10,7 @@ then
plugindir=$path/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /math/algebramenu/$activity $*
../../../boards/skins/
\ No newline at end of file
#!/bin/sh
path=`dirname $0`
resources=$path/../algebra_by-activity/resources
activity=algebra_minus
type=algebra
......@@ -10,7 +11,7 @@ then
plugindir=$path/../algebra_by-activity/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/../algebra_by-activity/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /math/algebramenu/algebra_group/$activity $*
../../../boards/skins/
\ No newline at end of file
#!/bin/sh
path=`dirname $0`
resources=$path/../algebra_by-activity/resources
activity=algebra_plus
type=algebra
......@@ -10,7 +11,7 @@ then
plugindir=$path/../algebra_by-activity/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/../algebra_by-activity/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /math/algebramenu/algebra_group/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=algorithm
......@@ -9,7 +10,7 @@ then
plugindir=$path/../boards/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /discovery/miscelaneous/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=anim
......@@ -9,7 +10,7 @@ then
plugindir=$path/../boards/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /fun/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=awele
......@@ -9,7 +10,7 @@ then
plugindir=$path/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /strategy/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=babymatch
type=shapegame
......@@ -10,7 +11,7 @@ then
plugindir=$path/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /discovery/miscelaneous/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=babyshapes
type=shapegame
......@@ -10,7 +11,7 @@ then
plugindir=$path/../babymatch-activity/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /discovery/miscelaneous/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=ballcatch
......@@ -9,7 +10,7 @@ then
plugindir=$path/../boards/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /computer/keyboard/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=bargame
......@@ -9,7 +10,7 @@ then
plugindir=$path/../boards/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /strategy/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=billard
......@@ -9,7 +10,7 @@ then
plugindir=$path/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /fun/$activity $*
......@@ -28,7 +28,7 @@ activity_name=`basename $1 -activity`
activity_dir=${activity_name}.activity
if [ -d $activity_dir ]
then
echo "The temporary directory already exists, delete it first"
echo "The temporary directory '$activity_dir' already exists, delete it first"
exit 1
fi
......@@ -54,18 +54,40 @@ else
echo "WARNING: No translation found in ../po/$lang.gmo"
fi
# Added the mandatory sounds of this activity
mandatory_sound_file=`grep mandatory_sound_file $activity_dir/*.xml.in | cut -d= -f2 | sed s/\"//g`
echo $mandatory_sound_file
if test -n $mandatory_sound_file
# Add the mandatory sounds of this activity
mandatory_sound_dir=`grep mandatory_sound_dir $activity_dir/*.xml.in | cut -d= -f2 | sed s/\"//g`
if test -n "$mandatory_sound_dir"
then
mandatory_sound_file=`echo "$mandatory_sound_file" | sed 's/\$LOCALE/'$lang/`
mandatory_sound_file=`dirname $mandatory_sound_file`
mandatory_sound_file_up=`dirname $mandatory_sound_file`
echo "Adding mandatory sound file directory: $mandatory_sound_file"
mkdir -p $activity_dir/resources/$mandatory_sound_file_up
dotdot=`echo $mandatory_sound_file_up | sed s/[^/]*/../g`
ln -s $dotdot/../../../boards/$mandatory_sound_file -t $activity_dir/resources/$mandatory_sound_file_up
echo "This activity defines a mandatory_sound_dir in $mandatory_sound_dir"
mandatory_sound_dir=`echo "$mandatory_sound_dir" | sed 's/\$LOCALE/'$lang/`
echo "Adding mandatory sound dir directory: $mandatory_sound_dir"
up=`dirname $mandatory_sound_dir`
mkdir -p $activity_dir/resources/$up
dotdot=`echo $up | sed s/[^/]*/../g`
ln -s $dotdot/../../../boards/$mandatory_sound_dir -t $activity_dir/resources/$up
fi
# Add the reources if they are in another activity
path=.
eval `grep "^resources=" $activity_dir/runit.sh`
if test "$resources" != "./resources"
then
echo "This activity has it's resources in $resources"
if [ -d $activity_dir/resources ]
then
echo "ERROR: This activity points to another's resources but also have one"
exit 1
fi
ln -s $resources -t $activity_dir
fi
# Add the plugins if they are in another activity
path=.
eval `egrep "^[ ]+plugindir=" $activity_dir/runit.sh`
if test "$plugindir" != "./.libs"
then
echo "This activity has it's plugindir in $plugindir"
cp $activity_dir/$plugindir/*.so $activity_dir
fi
# Add the python plugin if needed
......
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=canal_lock
......@@ -9,7 +10,7 @@ then
plugindir=$path/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /experience/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=chat
......@@ -9,7 +10,7 @@ then
plugindir=$path/../boards/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /fun/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=chess_computer
type=chess
......@@ -10,7 +11,7 @@ then
plugindir=$path/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /strategy/chess/$activity $*
../../../boards/skins/
\ No newline at end of file
#!/bin/sh
path=`dirname $0`
resources=$path/../chess_computer-activity/resources
activity=chess_movelearn
type=chess
......@@ -10,7 +11,7 @@ then
plugindir=$path/../chess_computer-activity/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/../chess_computer-activity/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /strategy/chess/$activity $*
../../../boards/skins/
\ No newline at end of file
#!/bin/sh
path=`dirname $0`
resources=$path/../chess_computer-activity/resources
activity=chess_partyend
type=chess
......@@ -10,7 +11,7 @@ then
plugindir=$path/../chess_computer-activity/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/../chess_computer-activity/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /strategy/chess/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=chronos
type=shapegame
......@@ -10,7 +11,7 @@ then
plugindir=$path/../babymatch-activity/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /discovery/miscelaneous/$activity $*
......@@ -5,6 +5,7 @@
type="click_on_letter"
section="/reading"
icon="click_on_letter.svg"
mandatory_sound_dir="voices/$LOCALE/alphabet"
mandatory_sound_file="voices/$LOCALE/misc/click_on_letter.ogg"
difficulty="1"
author="Pascal Georges (pascal.georges1@free.fr)"
......
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=click_on_letter
......@@ -9,7 +10,7 @@ then
plugindir=$path/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /reading/$activity $*
../../../boards/skins/
\ No newline at end of file
#!/bin/sh
path=`dirname $0`
resources=$path/../drawnumber-activity/resources
activity=clickanddraw
......@@ -10,7 +11,7 @@ then
fi
$path/gcompris.bin -L $plugindir -P $path./drawnumber-activity \
-A $path/../drawnumber-activity/resources \
-A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /computer/mouse/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=clickgame
......@@ -9,7 +10,7 @@ then
plugindir=$path/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /computer/mouse/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=clockgame
......@@ -9,7 +10,7 @@ then
plugindir=$path/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /discovery/miscelaneous/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=colors
......@@ -9,7 +10,7 @@ then
plugindir=$path/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /discovery/colors_group/$activity $*
../../../boards/skins/
\ No newline at end of file
#!/bin/sh
path=`dirname $0`
resources=$path/$resources
activity=connect4-2players
......@@ -17,7 +18,7 @@ then
resources=../connect4-activity/resources
fi
$path/gcompris.bin -L $plugindir -P $pathpythonplugindir -A $path/$resources \
$path/gcompris.bin -L $plugindir -P $pathpythonplugindir -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /strategy/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=connect4
......@@ -9,7 +10,7 @@ then
plugindir=$path/../boards/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /strategy/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=crane
......@@ -9,7 +10,7 @@ then
plugindir=$path/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /puzzle/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=doubleentry
type=shapegame
......@@ -10,7 +11,7 @@ then
plugindir=$path/../babymatch-activity/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /discovery/miscelaneous/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=draw
......@@ -9,7 +10,7 @@ then
plugindir=$path/../boards/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /math/geometry/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=drawnumber
......@@ -9,7 +10,7 @@ then
plugindir=$path/../boards/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /math/numeration/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=electric
......@@ -9,7 +10,7 @@ then
plugindir=$path/../boards/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /experience/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=enumerate
......@@ -9,7 +10,7 @@ then
plugindir=$path/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /math/numeration/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=erase
......@@ -9,7 +10,7 @@ then
plugindir=$path/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /computer/mouse/$activity $*
../../../boards/skins/
\ No newline at end of file
#!/bin/sh
path=`dirname $0`
resources=$path/../erase-activity/resources
activity=erase_clic
type=erase
......@@ -10,7 +11,7 @@ then
plugindir=$path/../erase-activity/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/../erase-activity/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /computer/mouse/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=fifteen
......@@ -9,7 +10,7 @@ then
plugindir=$path/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /puzzle/$activity $*
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=followline
......@@ -9,7 +10,7 @@ then
plugindir=$path/../boards/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \
$path/gcompris.bin -L $plugindir -P $path -A $resources \
--config-dir=. -M $path \
--locale_dir=$path/locale -l /computer/mouse/$activity $*
......@@ -5,6 +5,7 @@
type="shapegame"
section="/discovery/miscelaneous"
icon="globe.svg"
mandatory_sound_dir="voices/$LOCALE/geography"
mandatory_sound_file="voices/$LOCALE/geography/peru.ogg"
difficulty="2"
author="Jean-Philippe Ayanides (jp.ayanides@free.fr)"
......
#!/bin/sh
path=`dirname $0`
resources=$path/resources
activity=geography
type=shapegame
......@@ -10,7 +11,7 @@ then
plugindir=$path/../babymatch-activity/.libs
fi
$path/gcompris.bin -L $plugindir -P $path -A $path/resources \