[gcompris] core, now the python path separator is ; on windows
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris] core, now the python path separator is ; on windows
- Date: Sun, 11 May 2014 21:14:07 +0000 (UTC)
commit 00fe58acaa00b3ed47fdc4b663103e1b8c981321
Author: Bruno Coudoin <bruno coudoin free fr>
Date: Sun May 11 23:07:59 2014 +0200
core, now the python path separator is ; on windows
On windows because of the column in C: we take it as a separator.
As a consequence python activities do not run when GCompris is
installed on a drive other than C:
src/boards/python.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/boards/python.c b/src/boards/python.c
index 4f92684..44f3395 100644
--- a/src/boards/python.c
+++ b/src/boards/python.c
@@ -55,6 +55,11 @@ static void pythongc_board_config_stop (void);
static gboolean pythonboard_is_ready = FALSE;
+#ifdef WIN32
+static char *PATH_SEPARATOR = ";";
+#else
+static char *PATH_SEPARATOR = ":";
+#endif
/* Description of this plugin */
static BoardPlugin menu_bp =
@@ -123,6 +128,7 @@ static GList *config_boards= NULL;
* Create the import string to be added to the python path
* The plugin directory is passed in properties->package_python_plugin_dir
* It accepts several directory separated by a ":" character
+ * or ";" on Windows
*/
static gchar *get_pythonpath()
{
@@ -130,7 +136,8 @@ static gchar *get_pythonpath()
gchar *plugin_dir = NULL;
GcomprisProperties *properties = gc_prop_get();
/* Add the python plugins dir to the python's search path */
- gchar **plugin_dirs = g_strsplit( properties->package_python_plugin_dir , ":", -1 );
+ gchar **plugin_dirs = g_strsplit( properties->package_python_plugin_dir,
+ PATH_SEPARATOR, -1 );
int i;
for ( i = 0 ; i < g_strv_length( plugin_dirs ); i++ ) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]