Commit c4625a66 authored by Bruno Coudoin's avatar Bruno Coudoin

Added support for demo version on mac.

parent 5ce7ff69
......@@ -208,6 +208,13 @@ else
CFLAGS="$CFLAGS $OSX_CFLAGS -Wall -Werror"
fi
dnl disable activation code
AC_ARG_ENABLE(disable-activation-code,
AC_HELP_STRING(
[--disable-activation-code],
[For Windows or MacOSX version, disable the activation code]),
disable_activation_code="$enableval", disable_activation_code="no")
dnl WIN32 Specifics
AC_MSG_CHECKING([for Win32 platform in general])
case "$host" in
......@@ -293,10 +300,14 @@ if test "x$platform_win32" = "xyes" ; then
dnl Test for gnuchess
AC_DEFINE_UNQUOTED(GNUCHESS, "gnuchess.exe", Defines where GNU Chess resides on the system)
if test x$disable_activation_code = xno; then
AC_DEFINE([ACTIVATION_CODE], 1,[Activation code is enabled])
fi
elif test "x$nsbundle" = "xyes" ; then
DATADIRNAME="share"
dnl Set PACKAGE_LOCALE_DIR in config.h for WINDOWS
dnl Set PACKAGE_LOCALE_DIR in config.h for MacOSX
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "../Resources/${DATADIRNAME}/locale", [GCompris locale directory])
dnl Set PACKAGE_DATA_DIR
......@@ -319,6 +330,9 @@ elif test "x$nsbundle" = "xyes" ; then
dnl Test for gnuchess
AC_DEFINE_UNQUOTED(GNUCHESS, "../Resources/bin/gnuchess", Defines where GNU Chess resides on the system)
if test x$disable_activation_code = xno; then
AC_DEFINE([ACTIVATION_CODE], 1,[Activation code is enabled])
fi
else
dnl Set PACKAGE_LOCALE_DIR in config.h.
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${myprefix}/${DATADIRNAME}/locale", [GCompris locale directory])
......@@ -537,17 +551,6 @@ dnl define __GW32__ and WIN32
AC_SUBST(CFLAGS)
AC_SUBST(LIBS)
dnl disable activation code
AC_ARG_ENABLE(activation-code,
AC_HELP_STRING(
[--disable-activation-code],
[For Windows or MacOSX version, disable the activation code]),
activation_code="$enableval", activation_code="yes")
if test x$activation_code = xno; then
AC_DEFINE([DISABLE_ACTIVATION_CODE], 1,[Activation code is disabled])
fi
dnl Autoconf output
AC_OUTPUT([
Makefile.mingw
......
......@@ -7,7 +7,8 @@
difficulty="2"
icon="awele.svg"
author="Frédéric Mazzarol"
boarddir="awele">
boarddir="awele"
demo="1">
<_title>Oware</_title>
<_description>Play the Oware strategy game against Tux</_description>
<_prerequisite></_prerequisite>
......
......@@ -7,7 +7,8 @@
icon="ballcatch.svg"
difficulty="1"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="">
boarddir=""
demo="1">
<_title>Make the ball go to Tux</_title>
<_description>Press the two shift keys at the same time, to make the ball go in a straight line.</_description>
<_prerequisite></_prerequisite>
......
......@@ -8,6 +8,7 @@
difficulty="2"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="">
demo="1">
<_title>Operate a canal lock</_title>
<_description>Tux is in trouble, and needs to take his boat through a lock. Help Tux and find out how a canal lock works.</_description>
<_manual>You are in charge of the canal lock. Open the gates and the locks in the right order, so Tux can travel through the gates in both directions.</_manual>
......
......@@ -9,7 +9,8 @@
mandatory_sound_file="voices/$LOCALE/misc/click_on_letter.ogg"
difficulty="1"
author="Pascal Georges (pascal.georges1@free.fr)"
boarddir="click_on_letter">
boarddir="click_on_letter"
demo="1">
<_title>Click on a letter</_title>
<_description>Listen to a letter and click on the right one</_description>
<_prerequisite>Visual letter-recognition. Can move the mouse.</_prerequisite>
......
......@@ -7,7 +7,8 @@
icon="clickgame.svg"
difficulty="1"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="fishes">
boarddir="fishes"
demo="1">
<_title>Click On Me</_title>
<_description>Left-Click with the mouse on all the swimming fish before they leave the fishtank</_description>
<_prerequisite>Mouse-manipulation</_prerequisite>
......
......@@ -7,7 +7,8 @@
icon="clockgame.svg"
difficulty="2"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="">
boarddir=""
demo="1">
<_title>Learning Clock</_title>
<_description>Learn how to tell the time</_description>
<_prerequisite>The concept of time. Reading the time.</_prerequisite>
......
......@@ -8,7 +8,8 @@
difficulty="1"
icon="colors.svg"
author="Pascal Georges (pascal.georges1@free.fr)"
boarddir="colors">
boarddir="colors"
demo="1">
<_title>Colors</_title>
<_description>Click on the right color</_description>
<_prerequisite>Can move the mouse.</_prerequisite>
......
......@@ -8,7 +8,8 @@
difficulty="2"
mode="normal"
author="Marc BRUN"
boarddir="">
boarddir=""
demo="1">
<_title>Build the same model</_title>
<_description>Drive the crane and copy the model</_description>
<_prerequisite>Mouse manipulation</_prerequisite>
......
......@@ -6,7 +6,8 @@
section="/math/numeration"
icon="enumerate.svg"
difficulty="1"
author="Bruno Coudoin (bruno.coudoin@free.fr)">
author="Bruno Coudoin (bruno.coudoin@free.fr)"
demo="1">
<_title>Count the items</_title>
<_description>Place the items in the best way to count them</_description>
<_goal>Numeration training</_goal>
......
......@@ -8,7 +8,8 @@
difficulty="1"
mode="normal"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="">
boarddir=""
demo="1">
<_title>Move the mouse</_title>
<_description>Move the mouse to erase the area and discover the background</_description>
<_prerequisite>Mouse-manipulation</_prerequisite>
......
......@@ -8,7 +8,8 @@
difficulty="2"
mode="doubleclic"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="">
boarddir=""
demo="1">
<_title>Double click the mouse</_title>
<_description>Double click the mouse to erase the area and discover the background</_description>
<_prerequisite>Mouse-manipulation</_prerequisite>
......
......@@ -8,7 +8,8 @@
difficulty="1"
mode="clic"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="">
boarddir=""
demo="1">
<_title>Click the mouse</_title>
<_description>Click the mouse to erase the area and discover the background</_description>
<_prerequisite>Mouse-manipulation</_prerequisite>
......
......@@ -7,7 +7,8 @@
icon="followline.svg"
difficulty="1"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="">
boarddir=""
demo="1">
<_title>Control the hose-pipe</_title>
<_description>Tux needs to water the flowers, but the hose is blocked.</_description>
<_prerequisite></_prerequisite>
......
......@@ -27,8 +27,11 @@ static struct BoardPluginData *bp_data;
static gboolean get_board_playing(void);
#ifdef STATIC_MODULE
#ifdef ACTIVATION_CODE
int gc_activation_check(char *code);
#endif
#ifdef STATIC_MODULE
extern BoardPlugin * get_advanced_colors_bplugin_info();
extern BoardPlugin * get_algebra_bplugin_info();
extern BoardPlugin * get_algebra_guesscount_bplugin_info();
......@@ -302,6 +305,11 @@ gc_board_check_file(GcomprisBoard *gcomprisBoard)
g_assert(gcomprisBoard!=NULL);
#ifdef ACTIVATION_CODE
if ( !gcomprisBoard->demo && gc_activation_check(properties->key) <= 0 )
return FALSE;
#endif
/* Check Already loaded */
if(gcomprisBoard->plugin!=NULL) {
return TRUE;
......
......@@ -81,7 +81,7 @@ static void single_instance_release();
/*
* For the Activation dialog
*/
#ifdef STATIC_MODULE
#ifdef ACTIVATION_CODE
int gc_activation_check(const char *code);
static void activation_enter_callback(GtkWidget *widget,
GtkWidget *entry );
......@@ -840,7 +840,7 @@ static void setup_window ()
}
#ifdef STATIC_MODULE
#ifdef ACTIVATION_CODE
/** Display the activation dialog for the windows version
*
* return TRUE is the dialog is display, FALSE instead.
......@@ -871,8 +871,7 @@ display_activation_dialog()
strncmp(board->section, "/experimental", 13) != 0)
{
board_count++;
gc_board_check_file(board);
if(board->plugin)
if(board->demo)
gc_board_number_in_demo++;
}
}
......
......@@ -102,7 +102,9 @@ _add_xml_to_data(xmlDocPtr doc, xmlNodePtr xmlnode, GNode * child,
gcomprisBoard->demo = FALSE;
char *demo = (char *)xmlGetProp(xmlnode, BAD_CAST "demo");
if(demo && strcmp(demo, "1"))
// All menus are in the demo anyway
if( (demo && strcmp(demo, "1") == 0) ||
(strcmp(gcomprisBoard->type, "menu") == 0) )
gcomprisBoard->demo = TRUE;
/* Update the difficulty max */
......
......@@ -7,7 +7,8 @@
icon="gletters.svg"
difficulty="1"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="">
boarddir=""
demo="1">
<_title>Simple Letters</_title>
<_description>Type the falling letters before they reach the ground</_description>
<_goal>Letter association between the screen and the keyboard</_goal>
......
......@@ -7,7 +7,8 @@
icon="guessnumber.svg"
difficulty="3"
author="Clement Coudoin (clement.coudoin@free.fr)"
boarddir="">
boarddir=""
demo="1">
<_title>Guess a number</_title>
<_description>Help Tux escape the cave. Tux hides a number for you to find.</_description>
<_prerequisite>Numbers from 1 to 1000 for the last level.</_prerequisite>
......
......@@ -7,7 +7,8 @@
icon="hanoi.svg"
difficulty="2"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="">
boarddir=""
demo="1">
<_title>Simplified Tower of Hanoi</_title>
<_description>Reproduce the given tower</_description>
<_prerequisite>Mouse-manipulation</_prerequisite>
......
......@@ -7,7 +7,8 @@
icon="hanoi_real.svg"
difficulty="3"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="">
boarddir=""
demo="1">
<_title>The Tower of Hanoi</_title>
<_description>Reproduce the tower on the right side</_description>
<_prerequisite>Mouse manipulation</_prerequisite>
......
......@@ -7,7 +7,8 @@
difficulty="1"
icon="leftright.svg"
author="Pascal Georges (pascal.georges1@free.fr)"
boarddir="leftright">
boarddir="leftright"
demo="1">
<_title>Find your left and right hands</_title>
<_description>Determine if a hand is a right or a left hand</_description>
<_goal>Distinguish right and left hands from different points of view. Spatial representation</_goal>
......
......@@ -8,7 +8,8 @@
difficulty="2"
mode="minus"
author="Marc BRUN"
boarddir="">
boarddir=""
demo="1">
<_title>The magician hat</_title>
<_description>Count how many items are under the magic hat after some have got away</_description>
<_prerequisite>Subtraction</_prerequisite>
......
......@@ -8,7 +8,8 @@
difficulty="2"
mode="plus"
author="Marc BRUN"
boarddir="">
boarddir=""
demo="1">
<_title>The magician hat</_title>
<_description>Count how many items are under the magic hat</_description>
<_prerequisite>Addition</_prerequisite>
......
......@@ -7,7 +7,8 @@
icon="money.svg"
difficulty="2"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="">
boarddir=""
demo="1">
<_title>Money</_title>
<_description>Practice money usage</_description>
<_prerequisite>Can count</_prerequisite>
......
......@@ -8,7 +8,8 @@
mode="WITH_CENTS"
difficulty="3"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="">
boarddir=""
demo="1">
<_title>Money</_title>
<_description>Practice money usage including cents</_description>
<_prerequisite>Can count</_prerequisite>
......
......@@ -7,7 +7,8 @@
icon="mosaic.svg"
difficulty="1"
author="Clement Coudoin (clement.coudoin@free.fr)"
boarddir="">
boarddir=""
demo="1">
<_title>Rebuild the mosaic</_title>
<_description >Rebuild the mosaic</_description>
<_prerequisite></_prerequisite>
......
......@@ -7,7 +7,8 @@
icon="photohunter.svg"
difficulty="2"
author="Marc Le Douarain (http://membres.lycos.fr/mavati)"
boarddir="photohunter">
boarddir="photohunter"
demo="1">
<_title>Photo hunter</_title>
<_description>Find the differences between two pictures</_description>
<_goal>Visual discrimination.</_goal>
......
......@@ -7,7 +7,8 @@
icon="python.svg"
difficulty="1"
author="Bruno coudoin"
boarddir="">
boarddir=""
demo="1">
<_title>Python Template</_title>
<_description>An empty python activity to use as a starting point</_description>
<_prerequisite>Advanced Python Programmer :)</_prerequisite>
......
......@@ -7,7 +7,8 @@
icon="python.svg"
difficulty="1"
author="Olivier Samyn (osamyn@ulb.ac.be)"
boarddir="">
boarddir=""
demo="1">
<_title>Python Test</_title>
<_description>Test board for the python plugin</_description>
<_prerequisite>Advanced Python Programmer :)</_prerequisite>
......
......@@ -8,7 +8,8 @@
icon="readingh.svg"
difficulty="2"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="fishes">
boarddir="fishes"
demo="1">
<_title>Horizontal reading practice</_title>
<_description>Read a list of words and work out if a given word is in it</_description>
<_goal>Reading training in a limited time</_goal>
......
......@@ -8,7 +8,8 @@
icon="reading.svg"
difficulty="2"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="fishes">
boarddir="fishes"
demo="1">
<_title>Vertical-reading practice</_title>
<_description>Read a vertical list of words and work out if a given word is in it</_description>
<_goal>Read training in a limited time</_goal>
......
......@@ -8,7 +8,8 @@
difficulty="3"
icon="redraw.svg"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="">
boarddir=""
demo="1">
<_title>Redraw the given item</_title>
<_description>Copy a drawing from the box on the right into the box on the left.</_description>
<_prerequisite></_prerequisite>
......
......@@ -8,7 +8,8 @@
difficulty="4"
icon="redraw_symmetry.svg"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="">
boarddir=""
demo="1">
<_title>Mirror the given item</_title>
<_description>Copy the mirror image of an object from the box on the right into the box on the left.</_description>
<_prerequisite></_prerequisite>
......
......@@ -8,7 +8,8 @@
mode="count"
difficulty="2"
author="miguel DE IZARRA (miguel2i@free.fr)"
boarddir="scales">
boarddir="scales"
demo="1">
<_title>Balance the scales properly</_title>
<_description>Drag and Drop masses to balance the scales</_description>
<_goal>Mental calculation, arithmetic equality</_goal>
......
......@@ -8,7 +8,8 @@
mode="weight"
difficulty="4"
author="Wolfram Sang (wolfram@iswi.org)"
boarddir="scales">
boarddir="scales"
demo="1">
<_title>Balance the scales properly</_title>
<_description>Drag and Drop masses to balance the scales and calculate the weight</_description>
<_goal>Mental calculation, arithmetic equality, unit conversion</_goal>
......
......@@ -7,7 +7,8 @@
difficulty="6"
icon="searace.svg"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="searace">
boarddir="searace"
demo="1">
<_title>Sea race (2 Players)</_title>
<_description>Direct your boat accurately to win the race.</_description>
<_prerequisite></_prerequisite>
......
......@@ -8,7 +8,8 @@
difficulty="6"
icon="searace1player.svg"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="searace">
boarddir="searace"
demo="1">
<_title>Sea race (Single Player)</_title>
<_description>Give good instructions to your ship in order to be first in the race.</_description>
<_prerequisite></_prerequisite>
......
......@@ -7,7 +7,8 @@
difficulty="5"
icon="submarine.svg"
author="Pascal Georges (pascal.georges1@free.fr)"
boarddir="submarine">
boarddir="submarine"
demo="1">
<_title>Pilot a submarine</_title>
<_description>Pilot a submarine using air tanks and dive rudders</_description>
<_prerequisite>Physics basics</_prerequisite>
......
......@@ -7,7 +7,8 @@
icon="sudoku.svg"
difficulty="4"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="">
boarddir=""
demo="1">
<_title>Sudoku, place unique symbols in a square.</_title>
<_description>Symbols must be unique in a row, in a column, and (if defined) each region.</_description>
<_prerequisite>Completing the puzzle requires patience and logical ability</_prerequisite>
......
......@@ -7,7 +7,8 @@
icon="superbrain.svg"
difficulty="2"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="">
boarddir=""
demo="1">
<_title>Super Brain</_title>
<_description>Tux has hidden several items. Find them again in the correct order</_description>
<_prerequisite></_prerequisite>
......
......@@ -8,7 +8,8 @@
difficulty="2"
icon="target.svg"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="target">
boarddir="target"
demo="1">
<_title>Practice addition with a target game</_title>
<_description>Hit the target and count your points</_description>
<_prerequisite>Can move the mouse, can read numbers and count up to 15 for the first level</_prerequisite>
......
......@@ -7,7 +7,8 @@
difficulty="3"
icon="watercycle.svg"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="watercycle">
boarddir="watercycle"
demo="1">
<_title>Learn about the water cycle</_title>
<_description>Tux has come back from a long fishing party on his boat. Bring the water system back up so he can take a shower.</_description>
<_prerequisite></_prerequisite>
......
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