Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Coudoin <bcoudoin@src.gnome.org>2006-11-12 11:12:15 (GMT)
committer Bruno Coudoin <bcoudoin@src.gnome.org>2006-11-12 11:12:15 (GMT)
commit5555979c9cbe700c42446d76835e515c9ba1ec2a (patch)
tree8a6f9c17c8f6d5c336e703808969e7a903b5851e
parent0985b20beab740b5712d4e995aff898fac1887a5 (diff)
- Added support for sqlite compilation under windows
* Makefile.mingw.in: * src/boards/Makefile.mingw: * src/boards/python/melody.py: removed printout * src/gcompris/Makefile.mingw: * tools/py2exe/gcompris.py: * src/boards/erase.c: (erase_create_item): fixed out of bounds image
-rw-r--r--ChangeLog16
-rw-r--r--Makefile.mingw.in15
-rw-r--r--src/boards/Makefile.mingw6
-rw-r--r--src/boards/erase.c2
-rw-r--r--src/boards/python/melody.py38
-rw-r--r--src/gcompris/Makefile.mingw8
-rwxr-xr-xtools/py2exe/gcompris.py5
7 files changed, 60 insertions, 30 deletions
diff --git a/ChangeLog b/ChangeLog
index 0dcf523..c649dbb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2006-11-12 Bruno coudoin <bruno.coudoin@free.fr>
+
+ - Added support for sqlite compilation under windows
+
+ * Makefile.mingw.in:
+ * src/boards/Makefile.mingw:
+ * src/boards/python/melody.py: removed printout
+ * src/gcompris/Makefile.mingw:
+ * tools/py2exe/gcompris.py:
+
+2006-11-12 Bruno coudoin <bruno.coudoin@free.fr>
+
+ * src/boards/erase.c: (erase_create_item): fixed out of bounds image
+
2006-11-10 Bruno coudoin <bruno.coudoin@free.fr>
- Removed Ofset Logo. GCompris is no more an Ofset project.
@@ -150,7 +164,7 @@
* src/boards/py-mod-anim.c: (AnimCanvas_free): Fixed a Major bug in anim bindings.
quiting the gnumch activity crash GCompris 1 times on 10 in my case.
This seems to fix it and we should consider patching 8.2.1 with this.
- * src/boards/python/gnumch.py: fixed a string to allow paramter swapping
+ * src/boards/python/gnumch.py: fixed a string to allow parameter swapping
for translations.
* src/gcompris/config.c: added japanese.
diff --git a/Makefile.mingw.in b/Makefile.mingw.in
index 5ee2f10..b3787fd 100644
--- a/Makefile.mingw.in
+++ b/Makefile.mingw.in
@@ -18,15 +18,17 @@ LIBXML2_TOP := /libxml2
SDL_TOP := /sdl
CANVAS_TOP := /gnomecanvas
GNUCHESS_TOP := /gnuchess
-PYTHON_TOP := /c/WINDOWS/system32
+PYTHON_DLL := /c/WINDOWS/system32/python24.dll
+PYTHON_TOP := /c/Python24
GNUCAP_TOP := /gnucap
+SQLITE_TOP := /sqlite
MAKENSIS := "/c/Program Files/NSIS/makensis.exe"
# These will be copied in the win32-install-dir ready to be packaged.
NEEDED_DLLS = $(GNUCHESS_TOP)/bin/pthreadGC.dll \
$(GNUCHESS_TOP)/bin/libreadline.dll \
- $(PYTHON_TOP)/python24.dll \
+ $(PYTHON_DLL) \
$(GNUCAP_TOP)/src/MSW/gnucap.exe \
$(GTK_TOP)/bin/gspawn-win32-helper.exe \
$(GNUCHESS_TOP)/bin/gnuchess.exe \
@@ -62,7 +64,8 @@ NEEDED_DLLS = $(GNUCHESS_TOP)/bin/pthreadGC.dll \
$(GTK_TOP)/bin/iconv.dll \
$(GTK_TOP)/bin/intl.dll \
$(GTK_TOP)/bin/libpng13.dll \
- $(GTK_TOP)/bin/jpeg62.dll
+ $(GTK_TOP)/bin/jpeg62.dll \
+ $(SQLITE_TOP)/sqlite3.dll
NEEDED_FILES = README \
COPYING \
@@ -106,9 +109,13 @@ prepack:
cp -r $(GTK_TOP)/lib/pango $(GCOMPRIS_INSTALL_DIR)/lib
python:
+ cp $(PYTHON_TOP)/DLLs/tcl84.dll $(GCOMPRIS_INSTALL_DIR)
+ cp $(PYTHON_TOP)/DLLs/tk84.dll $(GCOMPRIS_INSTALL_DIR)
cp tools/py2exe/gcompris.py $(GCOMPRIS_INSTALL_DIR)
cp tools/py2exe/setup.py $(GCOMPRIS_INSTALL_DIR)
- cd $(GCOMPRIS_INSTALL_DIR);/c/Python24/python.exe setup.py py2exe;cp dist/library.zip python24.zip;cp dist/*.pyd .;rm -rf dist build;rm -f gcompris.py*;cd ..
+ cd $(GCOMPRIS_INSTALL_DIR);$(PYTHON_TOP)/python.exe setup.py py2exe;cp dist/library.zip python24.zip;cp dist/*.pyd .;rm -rf dist build;rm -f gcompris.py*;cd ..
+ rm -f $(GCOMPRIS_INSTALL_DIR)/tcl84.dll
+ rm -f $(GCOMPRIS_INSTALL_DIR)/tk84.dll
installer:
$(MAKENSIS) gcompris-installer.nsi
diff --git a/src/boards/Makefile.mingw b/src/boards/Makefile.mingw
index 1bf88e2..3255bcc 100644
--- a/src/boards/Makefile.mingw
+++ b/src/boards/Makefile.mingw
@@ -19,6 +19,7 @@ CANVAS_TOP := /gnomecanvas
PYTHON_TOP := /c/Python24
CAIRO_TOP := /cairo
GCOMPRIS_INSTALL_DIR := $(GCOMPRIS_TOP)/win32-install-dir
+SQLITE_TOP := /sqlite
##
## VARIABLE DEFINITIONS
@@ -26,7 +27,7 @@ GCOMPRIS_INSTALL_DIR := $(GCOMPRIS_TOP)/win32-install-dir
# Compiler Options
-CFLAGS = -DSTATIC_MODULE
+CFLAGS =
DEFINES =
@@ -61,7 +62,8 @@ INCLUDE_PATHS += -I$(GCOMPRIS_PLUGINS) \
-I$(GCOMPRIS_TOP)/src \
-I$(CAIRO_TOP)/include/cairo \
-I$(PYTHON_TOP)/include \
- -I$(PYTHON_TOP)/include/pygtk-2.0
+ -I$(PYTHON_TOP)/include/pygtk-2.0 \
+ -I$(SQLITE_TOP)
diff --git a/src/boards/erase.c b/src/boards/erase.c
index b3c89d1..d6c25dd 100644
--- a/src/boards/erase.c
+++ b/src/boards/erase.c
@@ -271,7 +271,7 @@ static void erase_next_level()
gc_set_background(gnome_canvas_root(gcomprisBoard->canvas),
imageList[current_image++]);
- if(current_image>NUMBER_OF_IMAGES)
+ if(current_image>=NUMBER_OF_IMAGES)
current_image=0;
gc_bar_set_level(gcomprisBoard);
diff --git a/src/boards/python/melody.py b/src/boards/python/melody.py
index 5b1c978..d43586a 100644
--- a/src/boards/python/melody.py
+++ b/src/boards/python/melody.py
@@ -39,7 +39,7 @@ class Gcompris_melody:
self.gcomprisBoard.disable_im_context = True
- print("Gcompris_melody __init__.")
+ #print("Gcompris_melody __init__.")
# These are used to let us restart only after the bonux is displayed.
# When the bonus is displayed, it call us first with pause(1) and then with pause(0)
@@ -56,7 +56,7 @@ class Gcompris_melody:
self.gcomprisBoard.number_of_sublevel=1
# pause the bg music
- print "pause sound"
+ #print "pause sound"
gcompris.sound.pause()
self.timers = []
@@ -119,14 +119,14 @@ class Gcompris_melody:
def end(self):
self.cleanup()
- print("Gcompris_melody end.")
+ #print("Gcompris_melody end.")
gcompris.sound.policy_set(self.saved_policy)
gcompris.sound.resume()
def ok(self):
- print("Gcompris_melody ok.")
-
+ #print("Gcompris_melody ok.")
+ pass
def cleanup(self):
@@ -240,12 +240,12 @@ class Gcompris_melody:
def repeat(self):
- print("Gcompris_melody repeat.")
+ #print("Gcompris_melody repeat.")
# Important to use a timer here to keep self.timers up todate
self.timers.append(gtk.timeout_add(50, self.repeat_it))
def repeat_it(self):
- print("Gcompris_melody repeat it.")
+ #print("Gcompris_melody repeat it.")
if self.in_repeat:
return
@@ -268,11 +268,12 @@ class Gcompris_melody:
def config(self):
- print("Gcompris_melody config.")
+ #print("Gcompris_melody config.")
+ pass
#randomize the sequence and plays it one first time
def populate(self, sound_struct):
- print("Gcompris_melody populate.")
+ #print("Gcompris_melody populate.")
self.solution = []
for i in range(self.gcomprisBoard.level+2):
@@ -281,22 +282,22 @@ class Gcompris_melody:
self.timers.append(gtk.timeout_add(1300, self.repeat_it))
def key_press(self, keyval, commit_str, preedit_str):
- print("got key %i" % keyval)
+ #print("got key %i" % keyval)
# Play sounds with the keys
if ((keyval == gtk.keysyms.KP_1) or (keyval == gtk.keysyms._1)):
- print "son1"
+ #print "son1"
self.sound_play(self.melodylist[self.theme][1][0])
return True
if ((keyval == gtk.keysyms.KP_2) or (keyval == gtk.keysyms._2)):
- print "son2"
+ #print "son2"
self.sound_play(self.melodylist[self.theme][1][1])
return True
if ((keyval == gtk.keysyms.KP_3) or (keyval == gtk.keysyms._3)):
- print "son3"
+ #print "son3"
self.sound_play(self.melodylist[self.theme][1][2])
return True
if ((keyval == gtk.keysyms.KP_4) or (keyval == gtk.keysyms._4)):
- print "son4"
+ #print "son4"
self.sound_play(self.melodylist[self.theme][1][3])
return True
@@ -317,7 +318,7 @@ class Gcompris_melody:
def set_level(self, level):
- print("Gcompris_melody set level. %i" % level)
+ #print("Gcompris_melody set level. %i" % level)
self.gcomprisBoard.level=level;
self.gcomprisBoard.sublevel=1;
self.cleanup()
@@ -371,7 +372,7 @@ class Gcompris_melody:
else:
self.theme = 0
- print("New melody theme : " + self.melodylist[self.theme][0]['theme'] + ".")
+ #print("New melody theme : " + self.melodylist[self.theme][0]['theme'] + ".")
# Apply the changes
self.cleanup()
self.display_current_level()
@@ -380,10 +381,11 @@ class Gcompris_melody:
return False
def sound_played(self, file):
- print "python sound played :", file
+ #print "python sound played :", file
+ pass
def intro_cb(self, file):
- print "intro passed. go play"
+ #print "intro passed. go play"
self.pause(0)
self.populate(self.sound_list)
diff --git a/src/gcompris/Makefile.mingw b/src/gcompris/Makefile.mingw
index 6493872..693d213 100644
--- a/src/gcompris/Makefile.mingw
+++ b/src/gcompris/Makefile.mingw
@@ -20,6 +20,7 @@ CAIRO_TOP := /cairo
GCOMPRIS_TOP := ../..
GCOMPRIS_SRC := .
GCOMPRIS_INSTALL_DIR := $(GCOMPRIS_TOP)/win32-install-dir
+SQLITE_TOP := /sqlite
##
## VARIABLE DEFINITIONS
@@ -29,7 +30,7 @@ TARGET = gcompris
# Compiler and Linker Options
-CFLAGS = -DSTATIC_MODULE
+CFLAGS =
DEFINES =
@@ -64,6 +65,7 @@ INCLUDE_PATHS += -I$(INCLUDE_DIR) \
-I$(LIBXML2_TOP)/include \
-I$(GNUWIN32_TOP)/include \
-I$(CAIRO_TOP)/include/cairo \
+ -I$(SQLITE_TOP) \
-I$(GCOMPRIS_TOP) \
-I$(GCOMPRIS_TOP)/src/boards
@@ -75,6 +77,7 @@ LIB_PATHS = -L$(GTK_TOP)/lib \
-L$(SDL_TOP)/lib \
-L$(CANVAS_TOP)/lib \
-L$(PYTHON_TOP)/libs \
+ -L$(SQLITE_TOP) \
-L$(GCOMPRIS_TOP)/src/gcompris
@@ -144,7 +147,8 @@ EXE_LIBS = ../boards/libboards.a \
-lart_lgpl_2 \
-lpangoft2-1.0 \
-liconv \
- -lpython24
+ -lpython24 \
+ -lsqlite3
diff --git a/tools/py2exe/gcompris.py b/tools/py2exe/gcompris.py
index e133ae0..8bda213 100755
--- a/tools/py2exe/gcompris.py
+++ b/tools/py2exe/gcompris.py
@@ -21,8 +21,9 @@ import cairo
import pangocairo
import atk
import gobject
+import pysqlite2
+from pysqlite2 import dbapi2 as sqlite
# For tuxpaint launcher
#import _winreg
-# For admin module
-#import pysqlite2
+
print "Hello gcompris world now"