gcompris r3339 - in branches/gcomprixogoo/src: . administration-activity/resources advanced_colors-activity/resources algebra_by-activity/resources algebra_guesscount-activity/resources algorithm-activity/resources anim-activity/resources awele-activity/resources babymatch-activity/resources babyshapes-activity/resources ballcatch-activity/resources bargame-activity/resources billard-activity/resources canal_lock-activity/resources chat-activity/resources chess_computer-activity/resources chronos-activity/resources click_on_letter-activity/resources clickgame-activity/resources clockgame-activity/resources colors-activity/resources connect4-activity/resources crane-activity/resources doubleentry-activity/resources draw-activity/resources drawnumber-activity/resources electric-activity/resources enumerate-activity/resources erase-activity/resources fifteen-activity/resources followline-activity/resources gcompris geo_country-activity/resources geography-activity/resou rces gletters-activity/resources gnumch-equality-activity/resources guessnumber-activity/resources hanoi-activity/resources hanoi_real-activity/resources hexagon-activity/resources imageid-activity/resources imagename-activity/resources leftright-activity/resources login-activity/resources magic_hat_minus-activity/resources maze-activity/resources melody-activity/resources memory-activity/resources missing_letter-activity/resources money-activity/resources mosaic-activity/resources paintings-activity/resources paratrooper-activity/resources planegame-activity/resources pythontemplate-activity/resources pythontest-activity/resources railroad-activity/resources read_colors-activity/resources readingh-activity/resources redraw-activity/resources redraw_symmetrical-activity/resources reversecount-activity/resources scalesboard-activity/resources searace-activity/resources smallnumbers-activity/resources submarine-activity/resources sudoku-activity/resources superbrain-activity/r esources tangram-activity/resources target-activity/resources traffic-activity/resources tuxpaint-activity/resources watercycle-activity/resources wordprocessor-activity/resources
- From: bcoudoin svn gnome org
- To: svn-commits-list gnome org
- Subject: gcompris r3339 - in branches/gcomprixogoo/src: . administration-activity/resources advanced_colors-activity/resources algebra_by-activity/resources algebra_guesscount-activity/resources algorithm-activity/resources anim-activity/resources awele-activity/resources babymatch-activity/resources babyshapes-activity/resources ballcatch-activity/resources bargame-activity/resources billard-activity/resources canal_lock-activity/resources chat-activity/resources chess_computer-activity/resources chronos-activity/resources click_on_letter-activity/resources clickgame-activity/resources clockgame-activity/resources colors-activity/resources connect4-activity/resources crane-activity/resources doubleentry-activity/resources draw-activity/resources drawnumber-activity/resources electric-activity/resources enumerate-activity/resources erase-activity/resources fifteen-activity/resources followline-activity/resources gcompris geo_country-activity/resources geography-activity/resou rces gletters-activity/resources gnumch-equality-activity/resources guessnumber-activity/resources hanoi-activity/resources hanoi_real-activity/resources hexagon-activity/resources imageid-activity/resources imagename-activity/resources leftright-activity/resources login-activity/resources magic_hat_minus-activity/resources maze-activity/resources melody-activity/resources memory-activity/resources missing_letter-activity/resources money-activity/resources mosaic-activity/resources paintings-activity/resources paratrooper-activity/resources planegame-activity/resources pythontemplate-activity/resources pythontest-activity/resources railroad-activity/resources read_colors-activity/resources readingh-activity/resources redraw-activity/resources redraw_symmetrical-activity/resources reversecount-activity/resources scalesboard-activity/resources searace-activity/resources smallnumbers-activity/resources submarine-activity/resources sudoku-activity/resources superbrain-activity/r esources tangram-activity/resources target-activity/resources traffic-activity/resources tuxpaint-activity/resources watercycle-activity/resources wordprocessor-activity/resources
- Date: Sun, 23 Mar 2008 15:12:26 +0000 (GMT)
Author: bcoudoin
Date: Sun Mar 23 15:12:26 2008
New Revision: 3339
URL: http://svn.gnome.org/viewvc/gcompris?rev=3339&view=rev
Log:
Added support for the --package_skin_dir, -S option to GCompris.
There is no more need for the skin link in each activity resource dir.
the runit and bundleit scripts have been updated to use this option.
Removed:
branches/gcomprixogoo/src/administration-activity/resources/skins
branches/gcomprixogoo/src/advanced_colors-activity/resources/skins
branches/gcomprixogoo/src/algebra_by-activity/resources/skins
branches/gcomprixogoo/src/algebra_guesscount-activity/resources/skins
branches/gcomprixogoo/src/algorithm-activity/resources/skins
branches/gcomprixogoo/src/anim-activity/resources/skins
branches/gcomprixogoo/src/awele-activity/resources/skins
branches/gcomprixogoo/src/babymatch-activity/resources/skins
branches/gcomprixogoo/src/babyshapes-activity/resources/skins
branches/gcomprixogoo/src/ballcatch-activity/resources/skins
branches/gcomprixogoo/src/bargame-activity/resources/skins
branches/gcomprixogoo/src/billard-activity/resources/skins
branches/gcomprixogoo/src/canal_lock-activity/resources/skins
branches/gcomprixogoo/src/chat-activity/resources/skins
branches/gcomprixogoo/src/chess_computer-activity/resources/skins
branches/gcomprixogoo/src/chronos-activity/resources/skins
branches/gcomprixogoo/src/click_on_letter-activity/resources/skins
branches/gcomprixogoo/src/clickgame-activity/resources/skins
branches/gcomprixogoo/src/clockgame-activity/resources/skins
branches/gcomprixogoo/src/colors-activity/resources/skins
branches/gcomprixogoo/src/connect4-activity/resources/skins
branches/gcomprixogoo/src/crane-activity/resources/skins
branches/gcomprixogoo/src/doubleentry-activity/resources/skins
branches/gcomprixogoo/src/draw-activity/resources/skins
branches/gcomprixogoo/src/drawnumber-activity/resources/skins
branches/gcomprixogoo/src/electric-activity/resources/skins
branches/gcomprixogoo/src/enumerate-activity/resources/skins
branches/gcomprixogoo/src/erase-activity/resources/skins
branches/gcomprixogoo/src/fifteen-activity/resources/skins
branches/gcomprixogoo/src/followline-activity/resources/skins
branches/gcomprixogoo/src/geo_country-activity/resources/skins
branches/gcomprixogoo/src/geography-activity/resources/skins
branches/gcomprixogoo/src/gletters-activity/resources/skins
branches/gcomprixogoo/src/gnumch-equality-activity/resources/skins
branches/gcomprixogoo/src/guessnumber-activity/resources/skins
branches/gcomprixogoo/src/hanoi-activity/resources/skins
branches/gcomprixogoo/src/hanoi_real-activity/resources/skins
branches/gcomprixogoo/src/hexagon-activity/resources/skins
branches/gcomprixogoo/src/imageid-activity/resources/skins
branches/gcomprixogoo/src/imagename-activity/resources/skins
branches/gcomprixogoo/src/leftright-activity/resources/skins
branches/gcomprixogoo/src/login-activity/resources/skins
branches/gcomprixogoo/src/magic_hat_minus-activity/resources/skins
branches/gcomprixogoo/src/maze-activity/resources/skins
branches/gcomprixogoo/src/melody-activity/resources/skins
branches/gcomprixogoo/src/memory-activity/resources/skins
branches/gcomprixogoo/src/missing_letter-activity/resources/skins
branches/gcomprixogoo/src/money-activity/resources/skins
branches/gcomprixogoo/src/mosaic-activity/resources/skins
branches/gcomprixogoo/src/paintings-activity/resources/skins
branches/gcomprixogoo/src/paratrooper-activity/resources/skins
branches/gcomprixogoo/src/planegame-activity/resources/skins
branches/gcomprixogoo/src/pythontemplate-activity/resources/skins
branches/gcomprixogoo/src/pythontest-activity/resources/skins
branches/gcomprixogoo/src/railroad-activity/resources/skins
branches/gcomprixogoo/src/read_colors-activity/resources/skins
branches/gcomprixogoo/src/readingh-activity/resources/skins
branches/gcomprixogoo/src/redraw-activity/resources/skins
branches/gcomprixogoo/src/redraw_symmetrical-activity/resources/skins
branches/gcomprixogoo/src/reversecount-activity/resources/skins
branches/gcomprixogoo/src/scalesboard-activity/resources/skins
branches/gcomprixogoo/src/searace-activity/resources/skins
branches/gcomprixogoo/src/smallnumbers-activity/resources/skins
branches/gcomprixogoo/src/submarine-activity/resources/skins
branches/gcomprixogoo/src/sudoku-activity/resources/skins
branches/gcomprixogoo/src/superbrain-activity/resources/skins
branches/gcomprixogoo/src/tangram-activity/resources/skins
branches/gcomprixogoo/src/target-activity/resources/skins
branches/gcomprixogoo/src/traffic-activity/resources/skins
branches/gcomprixogoo/src/tuxpaint-activity/resources/skins
branches/gcomprixogoo/src/watercycle-activity/resources/skins
branches/gcomprixogoo/src/wordprocessor-activity/resources/skins
Modified:
branches/gcomprixogoo/src/bundleit.sh
branches/gcomprixogoo/src/gcompris/gameutil.c
branches/gcomprixogoo/src/gcompris/gcompris.c
branches/gcomprixogoo/src/gcompris/properties.c
branches/gcomprixogoo/src/gcompris/properties.h
branches/gcomprixogoo/src/gcompris/skin.c
branches/gcomprixogoo/src/runit.sh
Modified: branches/gcomprixogoo/src/bundleit.sh
==============================================================================
--- branches/gcomprixogoo/src/bundleit.sh (original)
+++ branches/gcomprixogoo/src/bundleit.sh Sun Mar 23 15:12:26 2008
@@ -92,6 +92,9 @@
cp $extra_bin $activity_dir/bin
fi
+# Add the skin directory
+ln -s ../../../boards/skins -t $activity_dir/resources/
+
# Add the locale translation file
dir=$activity_dir/locale/$lang/LC_MESSAGES
mkdir -p $dir
Modified: branches/gcomprixogoo/src/gcompris/gameutil.c
==============================================================================
--- branches/gcomprixogoo/src/gcompris/gameutil.c (original)
+++ branches/gcomprixogoo/src/gcompris/gameutil.c Sun Mar 23 15:12:26 2008
@@ -559,6 +559,7 @@
*/
dir_to_search[i++] = properties->package_data_dir;
+ dir_to_search[i++] = properties->package_skin_dir;
dir_to_search[i++] = NULL;
absolute_filename = g_strdup(filename);
Modified: branches/gcomprixogoo/src/gcompris/gcompris.c
==============================================================================
--- branches/gcomprixogoo/src/gcompris/gcompris.c (original)
+++ branches/gcomprixogoo/src/gcompris/gcompris.c Sun Mar 23 15:12:26 2008
@@ -121,6 +121,7 @@
static gint popt_nolockcheck = FALSE;
static gchar *popt_root_menu = NULL;
static gchar *popt_package_data_dir = NULL;
+static gchar *popt_package_skin_dir = NULL;
static gchar *popt_plugin_dir = NULL;
static gchar *popt_python_plugin_dir = NULL;
static gchar *popt_locale_dir = NULL;
@@ -176,6 +177,9 @@
{"package_data_dir", 'A', 0, G_OPTION_ARG_STRING, &popt_package_data_dir,
N_("GCompris will find the data dir in this directory"), NULL},
+ {"package_skin_dir", 'S', 0, G_OPTION_ARG_STRING, &popt_package_skin_dir,
+ N_("GCompris will find the skins in this directory"), NULL},
+
{"plugin_dir", 'L', 0, G_OPTION_ARG_STRING, &popt_plugin_dir,
N_("GCompris will find the activity plugins in this directory"), NULL},
@@ -1086,6 +1090,7 @@
gchar *pkg_clib_dir = gbr_find_lib_dir(PACKAGE_CLIB_DIR);
properties->package_data_dir = g_strconcat(pkg_data_dir, "/gcompris/boards", NULL);
+ properties->package_skin_dir = g_strconcat(pkg_data_dir, "/gcompris/boards/skins", NULL);
properties->package_locale_dir = gbr_find_locale_dir(PACKAGE_LOCALE_DIR);
properties->package_plugin_dir = g_strconcat(pkg_clib_dir, "/gcompris", NULL);
properties->package_python_plugin_dir = g_strconcat(pkg_data_dir, "/gcompris/python",
@@ -1098,6 +1103,7 @@
/* Display the directory value we have */
printf("package_data_dir = %s\n", properties->package_data_dir);
+ printf("package_skin_dir = %s\n", properties->package_skin_dir);
printf("package_menu_dir = %s\n", properties->menu_dir);
printf("package_locale_dir = %s\n", properties->package_locale_dir);
printf("package_plugin_dir = %s\n", properties->package_plugin_dir);
@@ -1443,6 +1449,12 @@
properties->package_data_dir = g_strdup(popt_package_data_dir);
}
+ if (popt_package_skin_dir) {
+ printf("Overloaded package_skin_dir = %s\n", popt_package_skin_dir);
+ g_free(properties->package_skin_dir);
+ properties->package_skin_dir = g_strdup(popt_package_skin_dir);
+ }
+
if (popt_menu_dir) {
printf("Overloaded menu_dir = %s\n", popt_menu_dir);
g_free(properties->menu_dir);
Modified: branches/gcomprixogoo/src/gcompris/properties.c
==============================================================================
--- branches/gcomprixogoo/src/gcompris/properties.c (original)
+++ branches/gcomprixogoo/src/gcompris/properties.c Sun Mar 23 15:12:26 2008
@@ -169,6 +169,7 @@
tmp->server = NULL;
tmp->package_data_dir = NULL;
+ tmp->package_skin_dir = NULL;
tmp->package_locale_dir = NULL;
tmp->package_plugin_dir = NULL;
tmp->package_python_plugin_dir = NULL;
@@ -517,6 +518,7 @@
if(!props)
return;
g_free(props->package_data_dir);
+ g_free(props->package_skin_dir);
g_free(props->package_locale_dir);
g_free(props->package_plugin_dir);
g_free(props->package_python_plugin_dir);
Modified: branches/gcomprixogoo/src/gcompris/properties.h
==============================================================================
--- branches/gcomprixogoo/src/gcompris/properties.h (original)
+++ branches/gcomprixogoo/src/gcompris/properties.h Sun Mar 23 15:12:26 2008
@@ -42,6 +42,7 @@
gint display_resource;
gchar *root_menu;
gchar *package_data_dir;
+ gchar *package_skin_dir;
gchar *package_locale_dir;
gchar *package_plugin_dir;
gchar *package_python_plugin_dir;
Modified: branches/gcomprixogoo/src/gcompris/skin.c
==============================================================================
--- branches/gcomprixogoo/src/gcompris/skin.c (original)
+++ branches/gcomprixogoo/src/gcompris/skin.c Sun Mar 23 15:12:26 2008
@@ -62,9 +62,10 @@
gchar *filename;
/* First, test if pixmapfile is in the current skin dir */
- filename = g_strdup_printf("%s/skins/%s/%s",
+ filename = g_strdup_printf("%s/%s/%s",
properties->package_data_dir,
- properties->skin, pixmapfile);
+ properties->skin,
+ pixmapfile);
if (g_file_test ((filename), G_FILE_TEST_EXISTS)) {
g_free(filename);
Modified: branches/gcomprixogoo/src/runit.sh
==============================================================================
--- branches/gcomprixogoo/src/runit.sh (original)
+++ branches/gcomprixogoo/src/runit.sh Sun Mar 23 15:12:26 2008
@@ -30,6 +30,7 @@
$gcompris -L $plugindir \
-P $pythonplugindir \
-A $resourcedir \
+ -S $menudir/../../boards/skins \
-M $menudir \
--locale_dir=$path/locale \
-l $section/$activity $*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]