[gcompris/gcomprixogoo] In progress, port to windows.
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gcompris/gcomprixogoo] In progress, port to windows.
- Date: Sun, 10 Jan 2010 00:26:28 +0000 (UTC)
commit 5cb0e38b92e10c15cb34ca650c2d0f1d1cb5f4e9
Author: Bruno Coudoin <bruno coudoin free fr>
Date: Sun Jan 10 01:25:12 2010 +0100
In progress, port to windows.
Makefile.mingw.in | 124 ++++++++++++++++++---------------
README.mingw | 36 ++++------
config.h.mingw.in | 8 ++-
global_win32.mak | 47 ++++++++++++-
src/boards/Makefile.mingw | 80 +++++-----------------
src/boards/goocanvasmodule.c | 15 +++--
src/gcompris/Makefile.mingw | 55 ++++++++-------
src/gcompris/gcompris.c | 12 +++-
src/goocanvas/src/goocanvasmarshal.c | 17 ++---
src/goocanvas/src/goocanvasmarshal.h | 16 ++--
10 files changed, 214 insertions(+), 196 deletions(-)
---
diff --git a/Makefile.mingw.in b/Makefile.mingw.in
index b9a12fc..16576ee 100644
--- a/Makefile.mingw.in
+++ b/Makefile.mingw.in
@@ -12,78 +12,74 @@ GCOMPRIS_SRC = ./src/gcompris
GCOMPRIS_BOARDS = ./src/boards
GCOMPRIS_INSTALL_DIR = ./win32-install-dir
-GTK_TOP := /gtk
-GNUWIN32_TOP := /gnuwin32
-LIBXML2_TOP := /libxml2
-SDL_TOP := /sdl
-CANVAS_TOP := /gnomecanvas
-GNUCHESS_TOP := /gnuchess
-PYTHON_DLL := /c/WINDOWS/system32/python24.dll
-PYTHON_TOP := /c/Python24
-GNUCAP_TOP := /gnucap
-SQLITE_TOP := /sqlite
-
-MAKENSIS := "/c/Program Files/NSIS/makensis.exe"
+include global_win32.mak
# These will be copied in the win32-install-dir ready to be packaged.
-NEEDED_DLLS = $(GNUCHESS_TOP)/bin/pthreadGC.dll \
+NEEDED_DLLS = $(GNUCHESS_TOP)/bin/pthreadGC2.dll \
$(GNUCHESS_TOP)/bin/libreadline.dll \
- $(PYTHON_DLL) \
+ $(GNUCHESS_TOP)/bin/gnuchess.exe \
+ $(FONTCONFIG_TOP)/bin/libfontconfig-1.dll \
+ $(FREETYPE_TOP)/bin/freetype6.dll \
$(GNUCAP_TOP)/src/MSW/gnucap.exe \
$(GTK_TOP)/bin/gspawn-win32-helper.exe \
- $(GNUCHESS_TOP)/bin/gnuchess.exe \
- $(GNUWIN32_TOP)/bin/libintl-2.dll \
- $(GNUWIN32_TOP)/bin/libiconv-2.dll \
- $(CANVAS_TOP)/bin/libgnomecanvas-2-0.dll \
- $(SDL_TOP)/bin/SDL.dll \
- $(SDL_TOP)/bin/SDL_mixer.dll \
- $(LIBXML2_TOP)/bin/libxml2.dll \
- $(GTK_TOP)/bin/freetype6.dll \
$(GTK_TOP)/bin/intl.dll \
+ $(GTK_TOP)/bin/jpeg62.dll \
+ $(GTK_TOP)/bin/libatk-1.0-0.dll \
$(GTK_TOP)/bin/libcairo-2.dll \
- $(GTK_TOP)/bin/libpangocairo-1.0-0.dll \
- $(GTK_TOP)/bin/libart_lgpl_2-2.dll \
- $(GTK_TOP)/bin/freetype6.dll \
- $(GTK_TOP)/bin/libart_lgpl_2-2.dll \
$(GTK_TOP)/bin/libgdk-win32-2.0-0.dll \
$(GTK_TOP)/bin/libgdk_pixbuf-2.0-0.dll \
$(GTK_TOP)/bin/libglib-2.0-0.dll \
$(GTK_TOP)/bin/libgmodule-2.0-0.dll \
$(GTK_TOP)/bin/libgobject-2.0-0.dll \
+ $(GTK_TOP)/bin/libgthread-2.0-0.dll \
+ $(GTK_TOP)/bin/libgtk-win32-2.0-0.dll \
$(GTK_TOP)/bin/libpango-1.0-0.dll \
- $(GTK_TOP)/bin/libpangowin32-1.0-0.dll \
+ $(GTK_TOP)/bin/libpangocairo-1.0-0.dll \
$(GTK_TOP)/bin/libpangoft2-1.0-0.dll \
- $(GTK_TOP)/bin/libgtk-win32-2.0-0.dll \
- $(GTK_TOP)/bin/libatk-1.0-0.dll \
- $(GTK_TOP)/bin/libfontconfig-1.dll \
+ $(GTK_TOP)/bin/libpangowin32-1.0-0.dll \
+ $(GTK_TOP)/bin/libgio-2.0-0.dll \
+ $(GTK_TOP)/bin/libpng12-0.dll \
$(GTK_TOP)/bin/zlib1.dll \
- $(GTK_TOP)/bin/libgthread-2.0-0.dll \
- $(GTK_TOP)/expat/bin/xmlparse.dll \
- $(GTK_TOP)/expat/bin/xmltok.dll \
- $(GTK_TOP)/bin/iconv.dll \
- $(GTK_TOP)/bin/intl.dll \
- $(GTK_TOP)/bin/libpng13.dll \
- $(GTK_TOP)/bin/jpeg62.dll \
+ $(ICONV_TOP)/bin/iconv.dll \
+ $(LIBXML2_TOP)/bin/libxml2.dll \
+ $(MSVCR71_DLL) \
+ $(SDL_TOP)/bin/SDL.dll \
+ $(SDL_TOP)/bin/SDL_mixer.dll \
+ $(SDL_TOP)/bin/libogg-0.dll \
+ $(SDL_TOP)/bin/libvorbis-0.dll \
+ $(SDL_TOP)/bin/libvorbisfile-3.dll \
$(SQLITE_TOP)/sqlite3.dll \
- /c/WINDOWS/system32/msvcr71.dll
+ $(RSVG_TOP)/bin/librsvg-2-2.dll
NEEDED_FILES = README \
README.mingw \
COPYING \
- Changelog
+ ChangeLog
##
##
-all:
- cp config.h.mingw config.h
+all: Makefile.mingw config.h
+ $(MAKE) -C ./src/goocanvas/src -f Makefile.mingw
$(MAKE) -C $(GCOMPRIS_BOARDS) -f Makefile.mingw
$(MAKE) -C $(GCOMPRIS_SRC) -f Makefile.mingw
+Makefile.mingw: Makefile.mingw.in
+ ./config.status Makefile.mingw
+
+config.h: config.h.mingw.in
+ ./config.status config.h.mingw
+ cp config.h.mingw config.h
+
+gcompris-installer.nsi: gcompris-installer.nsi.in nsis_translations.desktop
+ ./config.status gcompris-installer.nsi
+ ./tools/create_nsis_translations.pl nsis_translations.desktop gcompris-installer.nsi nsis/translations
+
+nsis_translations.desktop: nsis_translations.desktop.in
+ LC_ALL=C /usr/bin/intltool-merge -d -u -c ./po/.intltool-merge-cache ./po nsis_translations.desktop.in nsis_translations.desktop
-install: all
+install: all Makefile.mingw
mkdir -p $(GCOMPRIS_INSTALL_DIR)/share
- $(MAKE) -C $(GCOMPRIS_BOARDS) -f Makefile.mingw install
$(MAKE) -C $(GCOMPRIS_SRC) -f Makefile.mingw install
cp -r $(GCOMPRIS_BOARDS)/python $(GCOMPRIS_INSTALL_DIR)/share/gcompris
rm -f $(GCOMPRIS_INSTALL_DIR)/share/gcompris/python/Makefile*
@@ -96,7 +92,7 @@ install: all
# Copy mandratory files for the package in the package directory
-prepack:
+prepack: Makefile.mingw
mkdir -p $(GCOMPRIS_INSTALL_DIR)/GTK
cp $(NEEDED_DLLS) $(GCOMPRIS_INSTALL_DIR)
cp $(NEEDED_FILES) $(GCOMPRIS_INSTALL_DIR)
@@ -104,36 +100,38 @@ prepack:
mkdir -p $(GCOMPRIS_INSTALL_DIR)/GTK/share
cp -r $(GTK_TOP)/share/themes $(GCOMPRIS_INSTALL_DIR)/share
mkdir -p $(GCOMPRIS_INSTALL_DIR)/lib
- cp -r $(GTK_TOP)/lib/locale $(GCOMPRIS_INSTALL_DIR)/lib
+ cp -r $(GTK_TOP)/share/locale $(GCOMPRIS_INSTALL_DIR)/lib
cp -r $(GTK_TOP)/lib/gtk-2.0 $(GCOMPRIS_INSTALL_DIR)/lib
- cp -r $(GTK_TOP)/lib/pango $(GCOMPRIS_INSTALL_DIR)/lib
-python:
+python: Makefile.mingw
cp $(PYTHON_TOP)/DLLs/tcl84.dll $(GCOMPRIS_INSTALL_DIR)
cp $(PYTHON_TOP)/DLLs/tk84.dll $(GCOMPRIS_INSTALL_DIR)
+ cp $(PYTHON_TOP)/python24.dll $(GCOMPRIS_INSTALL_DIR)
cp tools/py2exe/gcompris.py $(GCOMPRIS_INSTALL_DIR)
cp tools/py2exe/setup.py $(GCOMPRIS_INSTALL_DIR)
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:
+installer: Makefile.mingw gcompris-installer.nsi
$(MAKENSIS) gcompris-installer.nsi
-clean:
+clean: Makefile.mingw
+ $(MAKE) -C ./src/goocanvas/src -f Makefile.mingw clean
$(MAKE) -C $(GCOMPRIS_SRC) -f Makefile.mingw clean
$(MAKE) -C $(GCOMPRIS_BOARDS) -f Makefile.mingw clean
rm -rf config.h
rm -rf gcompris*.exe
+ rm -f gcompris-installer.nsi
+ rm -f nsis_translations.desktop
#
# Run this on Linux to prepare datadir for windows
#
-prep:
- mkdir $(GCOMPRIS_INSTALL_DIR)
-
+prep: Makefile.mingw
+ mkdir -p $(GCOMPRIS_INSTALL_DIR)
mkdir -p $(GCOMPRIS_INSTALL_DIR)/share/$(pkgdatadir)/boards
- cd boards ; tar cf - --exclude "Makefile.in" --exclude "*.in" --exclude "*~" --exclude "Makefile" --exclude "Makefile.am" --exclude .svn --exclude .xvpics * | ( cd ../$(GCOMPRIS_INSTALL_DIR)/share/$(pkgdatadir)/boards ; tar xf -) ; cd .. ;
+ cd boards ; tar cf - -h --exclude "*.in" --exclude ".*" * | ( cd ../$(GCOMPRIS_INSTALL_DIR)/share/$(pkgdatadir)/boards ; tar xf -) ; cd .. ;
@echo "-------------------------------------------------------------------------------"
@echo " WARNING: MAKE SURE TO HAVE RUN A MAKE INSTALL OF GCOMPRIS IN /USR/LOCAL FIRST"
@echo "-------------------------------------------------------------------------------"
@@ -142,9 +140,23 @@ prep:
@echo "Remove other .mo file not from gcompris"
find ./win32-install-dir/share/locale/ -name \*.mo | grep -v gcompris.mo | xargs rm -f
@echo "Copy pixmap"
- mkdir $(GCOMPRIS_INSTALL_DIR)/share/pixmaps
+ mkdir -p $(GCOMPRIS_INSTALL_DIR)/share/pixmaps
cp gcompris.png $(GCOMPRIS_INSTALL_DIR)/share/pixmaps
@echo remove tuxpaint activity
rm -f $(GCOMPRIS_INSTALL_DIR)/share/$(pkgdatadir)/boards/tuxpaint.xml
- @echo "Create the file gcompris-win-prepack.tar.gz"
- tar --exclude "Makefile.in" --exclude "*.in" --exclude "*~" --exclude "Makefile" --exclude "Makefile.am" --exclude .svn --exclude .xvpics -czf gcompris-win-prepack.tar.gz win32-install-dir nsis tools Makefile.mingw config.h.mingw
+ rm -f $(GCOMPRIS_INSTALL_DIR)/share/gcompris/python/tuxpaint.py
+ find $(GCOMPRIS_INSTALL_DIR) -name "Makefile*" -exec rm -f {} \;
+ find $(GCOMPRIS_INSTALL_DIR) -name "*.in" -exec rm -f {} \;
+ find $(GCOMPRIS_INSTALL_DIR) -name "*~" -exec rm -f {} \;
+ @echo Remove svg files
+ find $(GCOMPRIS_INSTALL_DIR) -name "*.svg" -exec rm -f {} \;
+
+svg2png:
+ sed -i "s:\(/[a-zA-Z0-9_-]\+\\.\)svg:\1png:g" boards/*.xml.in
+ sed -i "s:\(/[a-zA-Z0-9_-]\+\\.\)svg:\1png:g" src/*/*.c
+ sed -i "s:\(/[a-zA-Z0-9_-]\+\\.\)svg:\1png:g" src/*/*/*.py
+ for f in `find boards -name '*.svg'`; \
+ do e=`echo $$f | sed s/.svg/.png/`; \
+ inkscape -z -f $$f -e $$e; \
+ done
+ cd boards && make && cd ..
diff --git a/README.mingw b/README.mingw
index 24eef25..7a38b08 100644
--- a/README.mingw
+++ b/README.mingw
@@ -55,35 +55,29 @@ Look at the NEEDED_DLLS section in the Makefile.mingw and make sure you have all
2.6 PREREQUISITE SUMMARY
========================
-* At this point, you must have the following subdirectories:
-GTK_TOP := /gtk
-GNUWIN32_TOP := /gnuwin32
-LIBXML2_TOP := /libxml2
-SDL_TOP := /sdl
-CANVAS_TOP := /gnomecanvas
-GNUCHESS_TOP := /gnuchess
-
+Check the file global_win32.mak to know which dependancies must
+be provided and where.
3: BUILDING GCOMPRIS.EXE
========================
-* On a GNU/Linux system, create gcompris-win-prepack.tar.gz with:
- make -f Makefile.mingw prep
+* On GNU/Linux run make install to install the translations then:
+ make -f Makefile.mingw svg2png - Until we have svg support on Windows
+ make -f Makefile.mingw prep - create the win32-install-dir
+ make -f Makefile.mingw - compilation step
+ make -f Makefile.mingw prepack - include all necessary libraries in the installer directory
+ make -f Makefile.mingw install - include the generated code in the installer directory
+
* Now on the windows system:
-* Get a tarball or CVS snapshot of gcompris.
-* untar the gcompris-win-prepack.tar.gz in it
-* Manual fix, replace chess.c by chess.c.windows
-* run: make -f Makefile.mingw from gcompris's top-level directory. This will take a long time.
-* run: make -f Makefile.mingw prepack to include all necessary libraries in the installer directory
-* run: make -f Makefile.mingw install to include the generated code in the installer directory
-* run: make -f Makefile.mingw python to created an embedded python interpreter
+ make -f Makefile.mingw python - create an embedded python interpreter
-the win32-install-dir should contain anything needed to run and package GCompris.
+* the win32-install-dir contains anything needed to run and package GCompris.
+ Back to GNU/Linux, create the installer:
+ make -f Makefile.mingw installer
-* run make -f Makefile.make installer to create the installer
The installer used is NSIS get it there:
http://nsis.sourceforge.net/Main_Page
- And install it in it's default /c/Program Files/NSIS/makensis.exe
-The GCompris package is created, double click on it from your file manager to test it.
+The GCompris package is created, double click on it from your file manager
+to test it.
diff --git a/config.h.mingw.in b/config.h.mingw.in
index c8251f3..6c647e6 100644
--- a/config.h.mingw.in
+++ b/config.h.mingw.in
@@ -7,9 +7,6 @@
/* Supported languages */
#define ALL_LINGUAS "am ar az bg ca cs da de el en_CA en_GB es et fi fr ga gu he hi hr hu it lt mk ml ms nl nb nn pa pl pt pt_BR ro ru sk sl sq sr sr Latn sv tr wa zh_CN"
-/* Global assetml directory */
-#define ASSETML_DIR "share/assetml"
-
/* "Enable debug messages." */
/* #undef DEBUG */
@@ -139,3 +136,8 @@
/* Activation code is disabled */
/* #define DISABLE_ACTIVATION_CODE 1 */
+/* sdl mixer is enabled */
+#define USE_SDLMIXER
+
+/* Use binary relocation */
+#define ENABLE_BINRELOC 0
diff --git a/global_win32.mak b/global_win32.mak
index e89b263..c844f9d 100644
--- a/global_win32.mak
+++ b/global_win32.mak
@@ -5,7 +5,24 @@
# wide definitions.
#
-CC = gcc.exe
+OS:=$(OS)
+
+ifeq ($(OS),)
+ CROSSCOMPILER=i586-mingw32msvc-
+else
+ CROSSCOMPILER=
+endif
+
+CC = $(CROSSCOMPILER)gcc
+AR = $(CROSSCOMPILER)ar
+RANLIB = $(CROSSCOMPILER)ranlib
+WINDRES = $(CROSSCOMPILER)windres
+
+ifneq ($(CROSSCOMPILER),)
+ GLIB_GENMARSHAL := glib-genmarshal
+else
+ GLIB_GENMARSHAL := $(GTK_TOP)/bin/glib-genmarshal.exe
+endif
# Use -g flag when building debug version of Gcompris (including plugins).
# Use -fnative-struct instead of -mms-bitfields when using mingw 1.1
@@ -15,9 +32,35 @@ CFLAGS += -g -Wall -mno-cygwin -mms-bitfields
# If not specified, dlls are built with the default base address of 0x10000000.
# When loaded into a process address space a dll will be rebased if its base
-# address colides with the base address of an existing dll. To avoid rebasing
+# address colides with the base address of an existing dll. To avoid rebasing
# we do the following. Rebasing can slow down the load time of dlls and it
# also renders debug info useless.
DLL_LD_FLAGS += -Wl,--enable-auto-image-base
DEFINES += -DHAVE_CONFIG_H
+
+ifneq ($(CROSSCOMPILER),)
+ # CROSS COMPILATION
+ LOCAL_PREFIX:=/home/bruno/Projets/gcompris/windows
+ MSVCR71_DLL:=$(LOCAL_PREFIX)/msvcr71.dll
+ MAKENSIS:=makensis
+else
+ # MSYS CASE
+ LOCAL_PREFIX:=
+ MSVCR71_DLL:=/c/WINDOWS/system32/msvcr71.dll
+ MAKENSIS:="/c/Program Files/NSIS/makensis.exe"
+endif
+
+GTK_TOP := $(LOCAL_PREFIX)/gtk
+GLIB_TOP := $(LOCAL_PREFIX)/gtk
+CAIRO_TOP := $(LOCAL_PREFIX)/gtk
+RSVG_TOP := $(LOCAL_PREFIX)/rsvg
+LIBXML2_TOP := $(LOCAL_PREFIX)/libxml2
+SDL_TOP := $(LOCAL_PREFIX)/sdl
+GNUCHESS_TOP := $(LOCAL_PREFIX)/gnuchess
+PYTHON_TOP := $(LOCAL_PREFIX)/Python26
+GNUCAP_TOP := $(LOCAL_PREFIX)/gnucap
+SQLITE_TOP := $(LOCAL_PREFIX)/sqlite
+FONTCONFIG_TOP := $(LOCAL_PREFIX)/fontconfig
+ICONV_TOP := $(LOCAL_PREFIX)/iconv
+FREETYPE_TOP := $(LOCAL_PREFIX)/freetype
diff --git a/src/boards/Makefile.mingw b/src/boards/Makefile.mingw
index 459c0f3..64c3c5c 100644
--- a/src/boards/Makefile.mingw
+++ b/src/boards/Makefile.mingw
@@ -10,16 +10,9 @@
GCOMPRIS_PLUGINS := .
GCOMPRIS_TOP := ../..
-GTK_TOP := /gtk
-GLIB_TOP := /glib
-GNUWIN32_TOP := /gnuwin32
-LIBXML2_TOP := /libxml2
-SDL_TOP := /sdl
-CANVAS_TOP := /gnomecanvas
-PYTHON_TOP := /c/Python24
-CAIRO_TOP := /cairo
+CANVAS_TOP := $(GCOMPRIS_TOP)/src/goocanvas/src
+LIBART_TOP := $(GCOMPRIS_TOP)/src/libart_lgpl
GCOMPRIS_INSTALL_DIR := $(GCOMPRIS_TOP)/win32-install-dir
-SQLITE_TOP := /sqlite
##
## VARIABLE DEFINITIONS
@@ -29,7 +22,11 @@ SQLITE_TOP := /sqlite
CFLAGS =
-DEFINES =
+DEFINES = \
+ -DPYGOOCANVAS_MAJOR_VERSION=0 \
+ -DPYGOOCANVAS_MINOR_VERSION=0 \
+ -DPYGOOCANVAS_MICRO_VERSION=0
+
.SUFFIXES:
.SUFFIXES: .c .a
@@ -49,27 +46,25 @@ INCLUDE_PATHS += -I$(GCOMPRIS_PLUGINS) \
-I$(GTK_TOP)/include/gtk-2.0 \
-I$(GLIB_TOP)/include/glib-2.0 \
-I$(GTK_TOP)/include/pango-1.0 \
- -I$(GTK_TOP)/include/atk-1.0 \
-I$(GLIB_TOP)/lib/glib-2.0/include \
-I$(GTK_TOP)/lib/gtk-2.0/include \
- -I$(CANVAS_TOP)/include/libgnomecanvas-2.0 \
-I$(GTK_TOP)/include/atk-1.0 \
- -I$(GTK_TOP)/include/libart-2.0 \
-I$(GTK_TOP)/include/freetype2 \
-I$(LIBXML2_TOP)/include \
- -I$(GNUWIN32_TOP)/include \
-I$(GCOMPRIS_TOP) \
-I$(GCOMPRIS_TOP)/src \
+ -I$(CANVAS_TOP) \
-I$(CAIRO_TOP)/include/cairo \
-I$(PYTHON_TOP)/include \
-I$(PYTHON_TOP)/include/pygtk-2.0 \
- -I$(SQLITE_TOP)
-
+ -I$(PYTHON_TOP)/include/pycairo \
+ -I$(SQLITE_TOP) \
+ -I$(ICONV_TOP)/include \
+ -I$(RSVG_TOP)/include/librsvg-2
LIB_PATHS = -L$(GTK_TOP)/lib \
-L$(LIBXML2_TOP)/lib \
- -L$(GNUWIN32_TOP)/lib \
-L$(SDL_TOP)/lib \
-L$(GCOMPRIS_TOP)/src/gcompris \
-L$(PYTHON_TOP)/lib
@@ -94,7 +89,7 @@ LIBS = -lgtk-win32-2.0 \
-lgdi32 -lgthread-2.0 \
-lintl \
-lws2_32 \
- -lpython24 \
+ -lpython26 \
-lpython \
libgcompris-1.la
@@ -117,9 +112,10 @@ install:
##
PYTHON_C_SRC = \
python.c \
- canvas.c \
- canvasmodule.c \
+ goocanvas.c \
+ goocanvasmodule.c \
py-gcompris-board.c \
+ py-gcompris-boardconfig.c \
py-gcompris-properties.c \
py-gcompris-profile.c \
py-gcompris-wordlist.c \
@@ -137,49 +133,7 @@ PYTHON_C_SRC = \
py-mod-anim.c
BOARDS_C_SRC = \
- advanced_colors.c \
- algebra.c \
- algebra_guesscount.c \
- awele.c awele_utils.c awele_alphaBeta.c \
- canal_lock.c \
- chess.c chess_position.c chess_notation.c \
- click_on_letter.c \
- clickgame.c \
- clockgame.c \
- colors.c \
- crane.c \
- enumerate.c \
- erase.c \
- fifteen.c \
- gletters.c \
- gtans.c gtans_callbacks.c gtans_support.c gtans_interface.c \
- hanoi.c \
- hanoi_real.c \
- imageid.c \
- leftright.c \
- machpuzzle.c \
- magic_hat.c \
- maze.c \
- memory.c \
menu2.c \
- missingletter.c \
- money.c \
- money_widget.c \
- paratrooper.c \
- planegame.c \
- railroad.c \
- read_colors.c \
- reading.c \
- reversecount.c \
- scale.c \
- shapegame.c \
- smallnumbers.c \
- submarine.c \
- superbrain.c \
- target.c \
- traffic.c \
- wordsgame.c \
- wordprocessor.c \
$(PYTHON_C_SRC)
@@ -206,7 +160,7 @@ libboards: \
libboards.a: $(BOARDS_OBJECTS)
-rm -f libboards.a
$(AR) cru libboards.a $(BOARDS_OBJECTS)
- ranlib libboards.a
+ $(RANLIB) libboards.a
##
## CLEAN RULES
diff --git a/src/boards/goocanvasmodule.c b/src/boards/goocanvasmodule.c
index bf19f2b..4e68ce1 100644
--- a/src/boards/goocanvasmodule.c
+++ b/src/boards/goocanvasmodule.c
@@ -11,11 +11,11 @@
Pycairo_CAPI_t *Pycairo_CAPI;
-void pygoocanvas_register_classes (PyObject *d);
+void pygoocanvas_register_classes (PyObject *d);
void pygoocanvas_add_constants(PyObject *module, const gchar *strip_prefix);
extern PyMethodDef pygoocanvas_functions[];
-
+
static PyObject *
_cairo_matrix_from_gvalue(const GValue *value)
{
@@ -35,7 +35,12 @@ _cairo_matrix_to_gvalue(GValue *value, PyObject *obj)
static PyObject *
_cairo_pattern_from_gvalue(const GValue *value)
{
+#if defined WIN32
+ // On windows we have the old cairo API for now
+ return PycairoPattern_FromPattern(cairo_pattern_reference((cairo_pattern_t *) g_value_get_boxed(value)));
+#else
return PycairoPattern_FromPattern(cairo_pattern_reference((cairo_pattern_t *) g_value_get_boxed(value)), NULL);
+#endif
}
static int
@@ -65,9 +70,9 @@ initgoocanvas (void)
m = Py_InitModule ("goocanvas", pygoocanvas_functions);
d = PyModule_GetDict (m);
-
+
init_pygobject ();
-
+
pygoocanvas_register_classes (d);
pygoocanvas_add_constants(m, "GOO_CANVAS_");
PyModule_AddObject(m, "TYPE_CAIRO_MATRIX", pyg_type_wrapper_new(GOO_TYPE_CAIRO_MATRIX));
@@ -84,7 +89,7 @@ initgoocanvas (void)
PYGOOCANVAS_MAJOR_VERSION,
PYGOOCANVAS_MINOR_VERSION,
PYGOOCANVAS_MICRO_VERSION));
-
+
if (PyErr_Occurred ())
Py_FatalError ("can't initialise module goocanvas");
}
diff --git a/src/gcompris/Makefile.mingw b/src/gcompris/Makefile.mingw
index d372b7f..796f27c 100644
--- a/src/gcompris/Makefile.mingw
+++ b/src/gcompris/Makefile.mingw
@@ -8,18 +8,11 @@
# PATHS
#
-INCLUDE_DIR := .
-GTK_TOP := /gtk
-GLIB_TOP := /glib
-GNUWIN32_TOP := /gnuwin32
-LIBXML2_TOP := /libxml2
-GSTREAMER_TOP := /gstreamer
-PYTHON_TOP := /c/Python24
-CAIRO_TOP := /cairo
GCOMPRIS_TOP := ../..
+INCLUDE_DIR := .
+CANVAS_TOP := $(GCOMPRIS_TOP)/src/goocanvas/src
GCOMPRIS_SRC := .
GCOMPRIS_INSTALL_DIR := $(GCOMPRIS_TOP)/win32-install-dir
-SQLITE_TOP := /sqlite
##
## VARIABLE DEFINITIONS
@@ -56,28 +49,28 @@ INCLUDE_PATHS += -I$(INCLUDE_DIR) \
-I$(GTK_TOP)/include/atk-1.0 \
-I$(GLIB_TOP)/lib/glib-2.0/include \
-I$(GTK_TOP)/lib/gtk-2.0/include \
- -I.. \
- -I$(GTK_TOP)/include/atk-1.0 \
- -I$(GTK_TOP)/src/libart_lgpl \
-I$(GTK_TOP)/include/freetype2 \
- -I$(GSTREAME_TOP)/include/gstreamer-0.10 \
+ -I$(SDL_TOP)/include/SDL \
-I$(LIBXML2_TOP)/include \
- -I$(GNUWIN32_TOP)/include \
-I$(CAIRO_TOP)/include/cairo \
+ -I$(RSVG_TOP)/include/librsvg-2 \
-I$(SQLITE_TOP) \
- -L$(GSTREAMER_TOP) \
-I$(GCOMPRIS_TOP) \
- -I$(GCOMPRIS_TOP)/src/boards
+ -I$(GCOMPRIS_TOP)/src/boards \
+ -I$(CANVAS_TOP) \
+ -I$(ICONV_TOP)/include
LIB_PATHS = -L$(GTK_TOP)/lib \
-L$(GLIB_TOP)/lib \
-L$(LIBXML2_TOP)/lib \
- -L$(GNUWIN32_TOP)/lib \
- -L$(GSTREAMER_TOP)/lib \
- -L$(CANVAS_TOP)/lib \
+ -L$(SDL_TOP)/lib \
+ -L$(CANVAS_TOP) \
-L$(PYTHON_TOP)/libs \
-L$(SQLITE_TOP) \
+ -L$(ICONV_TOP)/lib \
+ -L$(CAIRO_TOP)/lib \
+ -L$(RSVG_TOP)/lib \
-L$(GCOMPRIS_TOP)/src/gcompris
@@ -92,8 +85,12 @@ EXE_C_SRC = \
binreloc.c \
board.c \
board_config.c \
+ board_config_combo.c \
+ board_config_common.c \
+ board_config_radio.c \
+ board_config_textview.c \
+ board_config_wordlist.c \
bonus.c \
- cache.c \
config.c \
dialog.c \
drag.c \
@@ -115,6 +112,8 @@ EXE_C_SRC = \
score.c \
skin.c \
soundutil.c \
+ soundutil_sdl.c \
+ sdlplayer.c \
timer.c \
wordlist.c
@@ -126,13 +125,13 @@ EXE_OBJECTS = $(EXE_C_SRC:%.c=%.o) $(RC_SRC:%.rc=%.o)
## LIBRARIES
##
-EXE_LIBS = ../libgnomecanvas/libgnomecanvas.a \
- ../libart_lgpl/libart_lgpl.a \
- ../boards/libboards.a \
+EXE_LIBS = ../boards/libboards.a \
+ ../goocanvas/src/libgoocanvas.a \
-lgtk-win32-2.0 \
-latk-1.0 \
-lpango-1.0 \
-lglib-2.0 \
+ -lgthread-2.0 \
-lgdk-win32-2.0 \
-lgobject-2.0 \
-lintl \
@@ -140,11 +139,13 @@ EXE_LIBS = ../libgnomecanvas/libgnomecanvas.a \
-lgdk_pixbuf-2.0 \
-lws2_32 \
-lxml2 \
- -lgstreamer-0.10-0 \
+ -lSDLmain -lSDL -lSDL_mixer \
-lpangoft2-1.0 \
-liconv \
- -lpython24 \
- -lsqlite3
+ -lpython26 \
+ -lsqlite3 \
+ -lcairo \
+ -lrsvg-2
@@ -158,7 +159,7 @@ EXE_LIBS = ../libgnomecanvas/libgnomecanvas.a \
# How to make an RC file
%.o: %.rc
- windres -i $< -o $@
+ $(WINDRES) -i $< -o $@
##
## TARGET DEFINITIONS
diff --git a/src/gcompris/gcompris.c b/src/gcompris/gcompris.c
index e7d9563..ee3e94b 100644
--- a/src/gcompris/gcompris.c
+++ b/src/gcompris/gcompris.c
@@ -24,10 +24,12 @@
#include <time.h>
#include <string.h>
+#ifndef WIN32
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <gdk/gdkx.h>
+#endif
#include <glib/gstdio.h>
@@ -68,8 +70,10 @@ static gint _gc_configure_event_callback (GtkWidget *widget,
static gboolean _expose_background_callback (GtkWidget *widget,
GdkEventExpose *event,
gpointer data);
+#ifndef WIN32
static gboolean _realize_callback (GtkWidget *widget, GdkEventExpose *event,
gpointer data);
+#endif
static gint board_widget_key_press_callback (GtkWidget *widget,
GdkEventKey *event,
gpointer client_data);
@@ -638,6 +642,7 @@ _expose_background_callback (GtkWidget *widget,
/*
* Sugar requires properties to be set before the windows is realized
*/
+#ifndef WIN32
static gboolean
_realize_callback (GtkWidget *widget, GdkEventExpose *event, gpointer data)
{
@@ -661,6 +666,7 @@ _realize_callback (GtkWidget *widget, GdkEventExpose *event, gpointer data)
return FALSE;
}
+#endif
static void
init_background()
@@ -791,10 +797,10 @@ static void setup_window ()
gtk_window_set_default_size(GTK_WINDOW(window), BOARDWIDTH, BOARDHEIGHT);
gtk_window_set_wmclass(GTK_WINDOW(window), "gcompris", "GCompris");
-
+#ifndef WIN32
g_signal_connect (GTK_OBJECT (window), "realize",
G_CALLBACK (_realize_callback), NULL);
-
+#endif
gtk_widget_realize (window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
@@ -1820,8 +1826,10 @@ main (int argc, char *argv[])
gc_sound_play_ogg("voices/$LOCALE/misc/welcome.ogg", NULL);
}
+#ifndef WIN32
if (sugarActivityId)
gc_dbus_init(sugarActivityId);
+#endif
gtk_main ();
diff --git a/src/goocanvas/src/goocanvasmarshal.c b/src/goocanvas/src/goocanvasmarshal.c
index da2931f..88dc9e9 100644
--- a/src/goocanvas/src/goocanvasmarshal.c
+++ b/src/goocanvas/src/goocanvasmarshal.c
@@ -1,4 +1,3 @@
-#include "goocanvasmarshal.h"
#include <glib-object.h>
@@ -48,11 +47,11 @@
#endif /* !G_ENABLE_DEBUG */
-/* VOID:VOID (./goocanvasmarshal.list:1) */
+/* VOID:VOID (goocanvasmarshal.list:1) */
-/* VOID:INT (./goocanvasmarshal.list:2) */
+/* VOID:INT (goocanvasmarshal.list:2) */
-/* VOID:INT,INT (./goocanvasmarshal.list:3) */
+/* VOID:INT,INT (goocanvasmarshal.list:3) */
void
goo_canvas_marshal_VOID__INT_INT (GClosure *closure,
GValue *return_value G_GNUC_UNUSED,
@@ -89,9 +88,9 @@ goo_canvas_marshal_VOID__INT_INT (GClosure *closure,
data2);
}
-/* VOID:BOOLEAN (./goocanvasmarshal.list:4) */
+/* VOID:BOOLEAN (goocanvasmarshal.list:4) */
-/* VOID:OBJECT,OBJECT (./goocanvasmarshal.list:5) */
+/* VOID:OBJECT,OBJECT (goocanvasmarshal.list:5) */
void
goo_canvas_marshal_VOID__OBJECT_OBJECT (GClosure *closure,
GValue *return_value G_GNUC_UNUSED,
@@ -128,7 +127,7 @@ goo_canvas_marshal_VOID__OBJECT_OBJECT (GClosure *closure,
data2);
}
-/* BOOLEAN:BOXED (./goocanvasmarshal.list:6) */
+/* BOOLEAN:BOXED (goocanvasmarshal.list:6) */
void
goo_canvas_marshal_BOOLEAN__BOXED (GClosure *closure,
GValue *return_value G_GNUC_UNUSED,
@@ -167,7 +166,7 @@ goo_canvas_marshal_BOOLEAN__BOXED (GClosure *closure,
g_value_set_boolean (return_value, v_return);
}
-/* BOOLEAN:OBJECT,BOXED (./goocanvasmarshal.list:7) */
+/* BOOLEAN:OBJECT,BOXED (goocanvasmarshal.list:7) */
void
goo_canvas_marshal_BOOLEAN__OBJECT_BOXED (GClosure *closure,
GValue *return_value G_GNUC_UNUSED,
@@ -208,7 +207,7 @@ goo_canvas_marshal_BOOLEAN__OBJECT_BOXED (GClosure *closure,
g_value_set_boolean (return_value, v_return);
}
-/* BOOLEAN:DOUBLE,DOUBLE,BOOLEAN,OBJECT (./goocanvasmarshal.list:8) */
+/* BOOLEAN:DOUBLE,DOUBLE,BOOLEAN,OBJECT (goocanvasmarshal.list:8) */
void
goo_canvas_marshal_BOOLEAN__DOUBLE_DOUBLE_BOOLEAN_OBJECT (GClosure *closure,
GValue *return_value G_GNUC_UNUSED,
diff --git a/src/goocanvas/src/goocanvasmarshal.h b/src/goocanvas/src/goocanvasmarshal.h
index fe94ec6..390f12d 100644
--- a/src/goocanvas/src/goocanvasmarshal.h
+++ b/src/goocanvas/src/goocanvasmarshal.h
@@ -6,13 +6,13 @@
G_BEGIN_DECLS
-/* VOID:VOID (./goocanvasmarshal.list:1) */
+/* VOID:VOID (goocanvasmarshal.list:1) */
#define goo_canvas_marshal_VOID__VOID g_cclosure_marshal_VOID__VOID
-/* VOID:INT (./goocanvasmarshal.list:2) */
+/* VOID:INT (goocanvasmarshal.list:2) */
#define goo_canvas_marshal_VOID__INT g_cclosure_marshal_VOID__INT
-/* VOID:INT,INT (./goocanvasmarshal.list:3) */
+/* VOID:INT,INT (goocanvasmarshal.list:3) */
extern void goo_canvas_marshal_VOID__INT_INT (GClosure *closure,
GValue *return_value,
guint n_param_values,
@@ -20,10 +20,10 @@ extern void goo_canvas_marshal_VOID__INT_INT (GClosure *closure,
gpointer invocation_hint,
gpointer marshal_data);
-/* VOID:BOOLEAN (./goocanvasmarshal.list:4) */
+/* VOID:BOOLEAN (goocanvasmarshal.list:4) */
#define goo_canvas_marshal_VOID__BOOLEAN g_cclosure_marshal_VOID__BOOLEAN
-/* VOID:OBJECT,OBJECT (./goocanvasmarshal.list:5) */
+/* VOID:OBJECT,OBJECT (goocanvasmarshal.list:5) */
extern void goo_canvas_marshal_VOID__OBJECT_OBJECT (GClosure *closure,
GValue *return_value,
guint n_param_values,
@@ -31,7 +31,7 @@ extern void goo_canvas_marshal_VOID__OBJECT_OBJECT (GClosure *closure,
gpointer invocation_hint,
gpointer marshal_data);
-/* BOOLEAN:BOXED (./goocanvasmarshal.list:6) */
+/* BOOLEAN:BOXED (goocanvasmarshal.list:6) */
extern void goo_canvas_marshal_BOOLEAN__BOXED (GClosure *closure,
GValue *return_value,
guint n_param_values,
@@ -39,7 +39,7 @@ extern void goo_canvas_marshal_BOOLEAN__BOXED (GClosure *closure,
gpointer invocation_hint,
gpointer marshal_data);
-/* BOOLEAN:OBJECT,BOXED (./goocanvasmarshal.list:7) */
+/* BOOLEAN:OBJECT,BOXED (goocanvasmarshal.list:7) */
extern void goo_canvas_marshal_BOOLEAN__OBJECT_BOXED (GClosure *closure,
GValue *return_value,
guint n_param_values,
@@ -47,7 +47,7 @@ extern void goo_canvas_marshal_BOOLEAN__OBJECT_BOXED (GClosure *closure,
gpointer invocation_hint,
gpointer marshal_data);
-/* BOOLEAN:DOUBLE,DOUBLE,BOOLEAN,OBJECT (./goocanvasmarshal.list:8) */
+/* BOOLEAN:DOUBLE,DOUBLE,BOOLEAN,OBJECT (goocanvasmarshal.list:8) */
extern void goo_canvas_marshal_BOOLEAN__DOUBLE_DOUBLE_BOOLEAN_OBJECT (GClosure *closure,
GValue *return_value,
guint n_param_values,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]