Commit 22ee93d0 authored by Bruno Coudoin's avatar Bruno Coudoin

resynced XO bundling with gcomprixxo branch

svn path=/branches/gcomprixogoo/; revision=3552
parent d6d7a97c
[Activity]
name = @ACTIVITY_NAME@
activity_version = 6
activity_version = 10
host_version = 1
service_name = net.gcompris.@ACTIVITY_NAME@Activity
bundle_id = net.gcompris.@ACTIVITY_NAME@Activity
icon = activity-gcompris
exec = gcompris-activity
show_launcher = yes
license = GPLv3+
......@@ -28,10 +28,13 @@ else
fi
if test "$activitysrc" = "administration-activity" || \
test "$activitysrc" = "chat-activity" || \
test "$activitysrc" = "tuxpaint-activity" || \
test "$activitysrc" = "melody-activity" || \
test "$activitysrc" = "gcompris-activity" ; then
echo "Skipping $activitysrc"
test "$activitysrc" = "login-activity" || \
test "$activitysrc" = "gcompris-activity" || \
test "$activitysrc" = "old-gcompris-activity" ; then
echo " Skipping it, not relevant for xo or not ready for it."
exit 0
fi
......@@ -53,14 +56,10 @@ else
exit 1
fi
with_clock="--exclude resources/skins/gartoon/timers"
for act in `grep timers/clock */*.c | cut -d/ -f1 | sort -u | xargs`
do
if test "$activitysrc" = $act; then
echo "Adding timers/clock files"
with_clock=""
fi
done
# Bundle names must be formated without underscores
# This translate chess_computer in chessComputer
bundle_id=`echo $activity | sed 's/_\([a-z]\)/\U\1/g'`
echo $bundle_id
# Create the Sugar specific startup scripts
activity_dir=${activity}.activity
......@@ -75,7 +74,7 @@ mkdir -p $activity_dir/activity
mkdir -p $activity_dir/bin
mv $activity_dir/*.svg $activity_dir/activity/activity-gcompris.svg
cp activity.info $activity_dir/activity
sed -i s/@ACTIVITY_NAME@/$activity/g $activity_dir/activity/activity.info
sed -i s/@ACTIVITY_NAME@/$bundle_id/g $activity_dir/activity/activity.info
cp old-gcompris-instance $activity_dir/
cp old-gcompris-factory $activity_dir/
cp old-gcompris-activity $activity_dir/
......@@ -137,6 +136,16 @@ if [ -f $pythonplugindir/*.py ]; then
ln -s ../boards/python/gcompris -t $activity_dir
fi
# Add the timers skin if needed (python activity don't use it)
with_clock="--exclude resources/skins/gartoon/timers"
if [ "$haspyfile" = "" ]; then
has_timer=`egrep "gc_timer_display|timers/clock" $plugindir/../*.c`
if test "$has_timer" != ""; then
echo " Adding timers/clock files"
with_clock=""
fi
fi
# Add the runit.sh script
cp $activity_dir/../runit.sh $activity_dir
......@@ -161,4 +170,4 @@ tar -tjf $activity_dir.tar.bz2 | zip $activity_dir.xo -@
# Sugar cleanup
rm -rf $activity_dir
rm $activity_dir.tar.bz2
\ No newline at end of file
rm $activity_dir.tar.bz2
#!/bin/sh
# Run it in the topp level GCompris directory
set -x
if test ! -f gcompris.png; then
echo "You must run this script in the top level GCompris directory"
exit 1
fi
# To create a full GCompris bundle on the OLPC xo:
mkdir /tmp/gcompris.activity
sh autogen.sh --enable-dbus --disable-sqlite --prefix=/tmp/gcompris.activity
make
make install
tar -C /tmp/gcompris.activity -xzf tools/full-xo-bundle-add-on.tzf
# The full bundle follow the release found in src/activity.info
release=`grep activity_version src/activity.info | cut -d= -f2 | sed "s/ //"`
sed -i "s/@RELEASE@/$release/" /tmp/gcompris.activity/activity/activity.info
# Keep only some locale voices relevant to XO targets
cd /tmp/gcompris.activity/share/gcompris/boards/voices
rm -rf ar bg br cs da de el eu fi fr he hi HOWTO_ENCODE hu id it mr nb nl nn ru so sr sv tr ur
# Copy extra binaries
extra_bin=`which gnuchess`
if [ "$extra_bin" = "" ]; then
extra_bin=`which gnome-gnuchess`
if [ "$extra_bin" = "" ]; then
ERROR " ERROR: Cannot find gnuchess or gnome-gnuchess"
fi
fi
cp $extra_bin /tmp/gcompris.activity/bin
extra_bin=`which gnucap`
if [ "$extra_bin" = "" ]; then
ERROR " ERROR: Cannot find gnucap"
fi
cp $extra_bin /tmp/gcompris.activity/bin
cd /tmp
rm gcompris.activity.xo
zip -r gcompris.activity.xo gcompris.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