Commit 233dc9b8 authored by Bruno Coudoin's avatar Bruno Coudoin

MacOSX port on its way. We now have the python part working in the bundle.

parent 93dd0828
......@@ -82,7 +82,6 @@ CONFIG_CLEAN_FILES = gcompris.desktop gcompris-edit.desktop config.h.mingw
clean-local:
rm -f intltool-extract intltool-merge intltool-update
-rm -fr $(BUNDLE_APPDIR)
update-voices:
@if test -d $(PACKAGE_DATA_DIR)/voices; then \
......
......@@ -122,13 +122,6 @@ fi
_AM_DEPENDENCIES([OBJC])
bundlename=GCompris
nsbundledir=$(pwd)"/$bundlename.app"
BUNDLE_APPDIR="$nsbundledir"
BUNDLE_NAME="$bundlename"
AC_SUBST(BUNDLE_APPDIR)
AC_SUBST(BUNDLE_NAME)
### --------------------------------------------------------------------------
### Check to see if GDK uses the quartz backend and if we can use
### MacOSX integration
......
......@@ -71,10 +71,25 @@
${prefix}/lib/libvorbisfile.dylib
</binary>
<!-- Python
<binary>
${prefix}/../local/lib/libpython2.6.dylib
</binary>
<binary>
${prefix}/../local/lib/libpyglib-2.0-python.dylib
</binary>
<binary>
${prefix}/../local/lib/python2.6
</binary>
-->
<!-- GCompris plugins -->
<binary>
${prefix}/lib/gcompris/*.so
</binary>
<binary>
${prefix}/lib/gcompris/*.dylib
</binary>
<!-- Copy in GTK+ theme engines. Dunno why this is a dupe of
modules, but that's why it's commented out. >
......@@ -105,6 +120,10 @@
${prefix}/share/gcompris
</data>
<data>
${prefix}/lib/python2.6
</data>
<!-- Copy in the themes data. You may want to trim this to save space
in your bundle. -->
<data>
......
......@@ -83,6 +83,9 @@ struct _GcomprisBoard
/* IM_context control */
gboolean disable_im_context;
/* This activity is available only in the demo version */
gboolean demo_only;
};
......
......@@ -1224,7 +1224,10 @@ static void load_properties ()
g_message("Binary relocation enabled");
else
{
g_message("Binary relocation disabled code = %d", error->code);
if (error->code == GBR_INIT_ERROR_DISABLED)
g_message("Binary relocation disabled");
else
g_message("Binary relocation start failed with error %d", error->code);
g_error_free (error);
}
......
......@@ -50,7 +50,7 @@ static sqlite3 *gcompris_db=NULL;
#define CREATE_TABLE_BOARDS_PROFILES_CONF \
"CREATE TABLE board_profile_conf (profile_id INT, board_id INT, conf_key TEXT, conf_value TEXT ); "
#define CREATE_TABLE_BOARDS \
"CREATE TABLE boards (board_id INT UNIQUE, name TEXT, section_id INT, section TEXT, author TEXT, type TEXT, mode TEXT, difficulty INT, icon TEXT, boarddir TEXT, mandatory_sound_file TEXT, mandatory_sound_dataset TEXT, filename TEXT, title TEXT, description TEXT, prerequisite TEXT, goal TEXT, manual TEXT, credit TEXT);"
"CREATE TABLE boards (board_id INT UNIQUE, name TEXT, section_id INT, section TEXT, author TEXT, type TEXT, mode TEXT, difficulty INT, icon TEXT, boarddir TEXT, mandatory_sound_file TEXT, mandatory_sound_dataset TEXT, filename TEXT, title TEXT, description TEXT, prerequisite TEXT, goal TEXT, manual TEXT, credit TEXT, demo_only INT);"
#define CREATE_TABLE_LOGS \
"CREATE TABLE logs (date TEXT, duration INT, user_id INT, board_id INT, level INT, sublevel INT, status INT, comment TEXT);"
......@@ -383,6 +383,14 @@ gboolean gc_db_init(gboolean disable_database_)
g_error("SQL error: %s\n", zErrMsg);
}
}
if(version <= 17)
{
g_message("Upgrading from <17 schema version\n");
rc = sqlite3_exec(gcompris_db,CREATE_TABLE_BOARDS, NULL, 0, &zErrMsg);
if( rc!=SQLITE_OK ) {
g_error("SQL error: %s\n", zErrMsg);
}
}
}
return TRUE;
......@@ -540,7 +548,8 @@ gc_db_board_update(guint *board_id,
gchar *prerequisite,
gchar *goal,
gchar *manual,
gchar *credit
gchar *credit,
int demo_only
)
{
SUPPORT_OR_RETURN(FALSE);
......@@ -670,7 +679,8 @@ gc_db_board_update(guint *board_id,
prerequisite,
goal,
manual,
credit
credit,
demo_only
);
rc = sqlite3_get_table(gcompris_db,
......@@ -695,7 +705,7 @@ gc_db_board_update(guint *board_id,
#define BOARDS_READ \
"SELECT board_id ,name, section_id, section, author, type, mode, difficulty, icon, boarddir, mandatory_sound_file, mandatory_sound_dataset, filename, title, description, prerequisite, goal, manual, credit FROM boards;"
"SELECT board_id ,name, section_id, section, author, type, mode, difficulty, icon, boarddir, mandatory_sound_file, mandatory_sound_dataset, filename, title, description, prerequisite, goal, manual, credit, demo_only FROM boards;"
GList *gc_menu_load_db(GList *boards_list)
{
......@@ -764,6 +774,7 @@ GList *gc_menu_load_db(GList *boards_list)
gcomprisBoard->goal = reactivate_newline(gettext(result[i++]));
gcomprisBoard->manual = reactivate_newline(gettext(result[i++]));
gcomprisBoard->credit = reactivate_newline(gettext(result[i++]));
gcomprisBoard->demo_only = atoi(result[i++]);
boards = g_list_append(boards, gcomprisBoard);
}
......@@ -1813,6 +1824,7 @@ GcomprisBoard *gc_db_get_board_from_id(int board_id)
gcomprisBoard->goal = reactivate_newline(gettext(result[i++]));
gcomprisBoard->manual = reactivate_newline(gettext(result[i++]));
gcomprisBoard->credit = reactivate_newline(gettext(result[i++]));
gcomprisBoard->demo_only = atoi(result[i++]);
sqlite3_free_table(result);
......
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