gcompris r3223 - in branches/gcomprixogoo/src: . hexagon-activity/resources/hexagon
- From: bcoudoin svn gnome org
- To: svn-commits-list gnome org
- Subject: gcompris r3223 - in branches/gcomprixogoo/src: . hexagon-activity/resources/hexagon
- Date: Thu, 24 Jan 2008 22:40:07 +0000 (GMT)
Author: bcoudoin
Date: Thu Jan 24 22:40:07 2008
New Revision: 3223
URL: http://svn.gnome.org/viewvc/gcompris?rev=3223&view=rev
Log:
file from gcomprixo branch
Added:
branches/gcomprixogoo/src/gcompris-activity
Modified:
branches/gcomprixogoo/src/hexagon-activity/resources/hexagon/ (props changed)
Added: branches/gcomprixogoo/src/gcompris-activity
==============================================================================
--- (empty file)
+++ branches/gcomprixogoo/src/gcompris-activity Thu Jan 24 22:40:07 2008
@@ -0,0 +1,65 @@
+#!/bin/sh
+# Author: Bert Freudenberg. Adapted to GCompris by Bruno Coudoin.
+# Purpose: Run GCompris
+#
+# This version of gcompris-activity is called only under new Sugar
+# (Joyride/Update.1). There is another one in the bundle's root
+# directory called under old Sugar which was pre-installed on the
+# first mass-produced machines (Trial-3/Ship.1).
+
+echo "$0" "$@"
+echo
+
+# arguments are unordered, have to loop
+args=""
+while [ -n "$2" ] ; do
+ case "$1" in
+ -b | --bundle-id) bundle_id="$2" ; args="$args BUNDLE_ID $2" ;;
+ -a | --activity-id) activity_id="$2" ; args="$args ACTIVITY_ID $2";;
+ -o | --object-id) object_id="$2" ; args="$args OBJECT_ID $2";;
+ -u | --uri) uri="$2" ; args="$args URI $2";;
+ *) echo unknown argument $1 $2 ;;
+ esac
+ shift;shift
+done
+
+# really need bundle id and activity id
+if [ -z "$bundle_id" -o -z "$activity_id" ] ; then
+ echo ERROR: bundle-id and activity-id arguments required
+ echo Aborting
+ exit 1
+fi
+
+# some debug output
+echo launching $bundle_id instance $activity_id
+[ -n "$object_id" ] && echo with journal obj $object_id
+[ -n "$uri" ] && echo loading uri $uri
+echo
+
+# sanitize
+[ -z "$SUGAR_PROFILE" ] && SUGAR_PROFILE=default
+[ -z "$SUGAR_ACTIVITY_ROOT" ] && SUGAR_ACTIVITY_ROOT="$HOME/.sugar/$SUGAR_PROFILE/gcompris"
+
+echo SUGAR_ACTIVITY_ROOT=$SUGAR_ACTIVITY_ROOT
+echo
+
+# rainbow-enforced locations
+export GCOMPRIS_SECUREDIR="$SUGAR_ACTIVITY_ROOT/data/private"
+export GCOMPRIS_USERDIR="$SUGAR_ACTIVITY_ROOT/data/MyGcompris"
+
+# make group-writable for rainbow
+umask 0002
+[ ! -d "$GCOMPRIS_SECUREDIR" ] && mkdir -p "$GCOMPRIS_SECUREDIR" && chmod o-rwx "$GCOMPRIS_SECUREDIR"
+[ ! -d "$GCOMPRIS_USERDIR" ] && mkdir -p "$GCOMPRIS_USERDIR"
+
+# do not crash on dbus errors
+export DBUS_FATAL_WARNINGS=0
+
+# now run Gcompris
+exec $SUGAR_BUNDLE_PATH/runit.sh $SUGAR_BUNDLE_PATH \
+ --sugarBundleId $bundle_id \
+ --sugarActivityId $activity_id \
+ --nolockcheck \
+ --config-dir $GCOMPRIS_USERDIR \
+ --user-dir $GCOMPRIS_USERDIR \
+ $args
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]