blob: fbe36f97e14c919e0abf8151310002f309a49b4f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
# Makefile.mingw
#
# Author: Bruno Coudoin (from GAIM example)
# Description: Top Makefile for win32 (mingw) port of GCompris
#
VERSION = "@VERSION@"
pkgdatadir = gcompris
GCOMPRIS_SRC = ./src/gcompris
GCOMPRIS_BOARDS = ./src/boards
GCOMPRIS_INSTALL_DIR = ./win32-install-dir
include global_win32.mak
# These will be copied in the win32-install-dir ready to be packaged.
NEEDED_DLLS = $(GNUCHESS_TOP)/bin/pthreadGC2.dll \
$(GNUCHESS_TOP)/bin/libreadline.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 \
$(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/libexpat.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/libpangocairo-1.0-0.dll \
$(GTK_TOP)/bin/libpangoft2-1.0-0.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 \
$(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
NEEDED_FILES = README \
README.mingw \
COPYING \
ChangeLog
##
##
all: Makefile.mingw config.h
$(MAKE) -C ./src/libart_lgpl -f Makefile.mingw
$(MAKE) -C ./src/libgnomecanvas -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 Makefile.mingw
mkdir -p $(GCOMPRIS_INSTALL_DIR)/share
$(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*
rm -f $(GCOMPRIS_INSTALL_DIR)/share/gcompris/python/gcompris/Makefile*
rm -f $(GCOMPRIS_INSTALL_DIR)/share/gcompris/python/admin/Makefile*
cp -r $(GCOMPRIS_BOARDS)/python $(GCOMPRIS_INSTALL_DIR)/share/gcompris
rm -f $(GCOMPRIS_INSTALL_DIR)/share/gcompris/python/Makefile*
rm -f $(GCOMPRIS_INSTALL_DIR)/share/gcompris/python/gcompris/Makefile*
rm -f $(GCOMPRIS_INSTALL_DIR)/share/gcompris/python/admin/Makefile*
# Copy mandratory files for the package in the package directory
prepack: Makefile.mingw
mkdir -p $(GCOMPRIS_INSTALL_DIR)/GTK
cp $(NEEDED_DLLS) $(GCOMPRIS_INSTALL_DIR)
cp $(NEEDED_FILES) $(GCOMPRIS_INSTALL_DIR)
cp -r $(GTK_TOP)/etc $(GCOMPRIS_INSTALL_DIR)
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)/share/locale $(GCOMPRIS_INSTALL_DIR)/lib
cp -r $(GTK_TOP)/lib/gtk-2.0 $(GCOMPRIS_INSTALL_DIR)/lib
@echo Adding svg image loader to GTK
cp -r $(LOCAL_PREFIX)/svg_loader/* $(GCOMPRIS_INSTALL_DIR)
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: Makefile.mingw gcompris-installer.nsi
$(MAKENSIS) gcompris-installer.nsi
clean: Makefile.mingw
$(MAKE) -C ./src/libart_lgpl -f Makefile.mingw clean
$(MAKE) -C ./src/libgnomecanvas -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: Makefile.mingw
mkdir -p $(GCOMPRIS_INSTALL_DIR)
mkdir -p $(GCOMPRIS_INSTALL_DIR)/share/$(pkgdatadir)/boards
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 "-------------------------------------------------------------------------------"
mkdir -p $(GCOMPRIS_INSTALL_DIR)/share/locale
cp -r /usr/local/share/locale/* $(GCOMPRIS_INSTALL_DIR)/share/locale/
@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 -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
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 {} \;
svg2png:
sed -i "s:\(/[a-zA-Z_-]\+\\.\)svg:\1png:g" boards/*.xml.in
sed -i "s:\(/[a-zA-Z_-]\+\\.\)svg:\1png:g" src/*/*.c
sed -i "s:\(/[a-zA-Z_-]\+\\.\)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
|