1 <project name="Inkscape" default="dist" basedir=".">
2 <description>
3 Build file for the Inkscape SVG editor. This file
4 was written for GTK-2.10 on Win32, but it should work
5 well for other types of builds with only minor adjustments.
6 </description>
8 <!-- set global properties for this build -->
9 <property name="version" value="0.45"/>
10 <property name="arch" value="i686-pc-mingw32-"/>
11 <!--<property name="archutil" value="${arch}"/>-->
12 <property name="archutil" value=""/>
13 <property name="src" location="src"/>
14 <property name="gtk" location="c:/gtk210"/>
15 <property name="lib" location="lib"/>
16 <property name="build" location="build"/>
17 <property name="dist" location="inkscape"/>
19 <target name="init">
20 <!-- Create the build directory structure used by compile -->
21 <mkdir dir="${build}"/>
22 <mkdir dir="${dist}"/>
23 <copy file="${src}/helper/sp-marshal.h.mingw"
24 tofile="${src}/helper/sp-marshal.h"/>
25 <copy file="${src}/helper/sp-marshal.cpp.mingw"
26 tofile="${src}/helper/sp-marshal.cpp"/>
27 <makefile file="inkscape_version.h">
28 #define INKSCAPE_VERSION "${version}+devel"
29 </makefile>
30 <makefile file="config.h">
31 #ifndef _CONFIG_H_
32 #define _CONFIG_H_
34 #ifndef WIN32
35 #define WIN32
36 #endif
38 /*######################################
39 ## This is for require-config.h, whose
40 ## purpose I cannot fathom.
41 ######################################*/
43 #define PACKAGE_TARNAME
45 /*######################################
46 #### RESOURCE DIRECTORIES
47 ######################################*/
49 #define INKSCAPE_DATADIR "."
50 #define PACKAGE_LOCALE_DIR "locale"
53 /*######################################
54 #### OTHER DEFINITIONS
55 ######################################*/
57 #define GETTEXT_PACKAGE "inkscape"
59 #define PACKAGE_STRING VERSION
61 #define HAVE_GETOPT_H 1
62 #define HAVE_STRING_H 1
63 #define HAVE_LIBINTL_H 1
64 #define HAVE_MALLOC_H 1
65 #define HAVE_STDLIB_H 1
66 #define HAVE_SYS_STAT_H 1
68 #define ENABLE_LCMS 1
70 #define ENABLE_NLS 1
71 #define HAVE_BIND_TEXTDOMAIN_CODESET 1
73 /* keep binreloc off */
74 #define BR_PTHREADS 0
75 #undef ENABLE_BINRELOC
77 /* CairoPDF options */
78 #define HAVE_CAIRO_PDF 1
79 #define PANGO_ENABLE_ENGINE 1
80 #define RENDER_WITH_PANGO_CAIRO 1
82 #define HAVE_GTK_WINDOW_FULLSCREEN 1
84 #define g_ascii_strtod fixed_g_ascii_strtod
86 #endif /* _CONFIG_H_ */
87 </makefile>
88 </target>
90 <target name="compile" depends="init"
91 description="compile the source " >
92 <!-- Compile from source to build -->
93 <cc cc="${arch}gcc" cxx="${arch}g++"
94 destdir="${build}/obj">
95 <fileset dir="${src}">
96 <!-- THINGS TO EXCLUDE -->
97 <exclude name="ast/.*"/>
98 <exclude name="bonobo/.*"/>
99 <exclude name="deptool.cpp"/>
100 <exclude name="dialogs/filedialog-win32.cpp"/>
101 <exclude name="display/testnr.cpp"/>
102 <exclude name="display/bezier-utils-test.cpp"/>
103 <exclude name="dom/jsdombind.cpp"/>
104 <exclude name="dom/work/.*"/>
105 <exclude name="dom/odf/SvgOdg.cpp"/>
106 <exclude name="extension/api.cpp"/>
107 <exclude name="extension/dxf2svg/.*"/>
108 <exclude name="extension/internal/gnome.cpp"/>
109 <exclude name="extension/script/bindtest.cpp"/>
110 <exclude name="extension/script/cpptest.cpp"/>
111 <exclude name="extension/plugin/.*"/>
112 <exclude name="extract-uri-test.cpp"/>
113 <exclude name="helper/units-test.cpp"/>
114 <exclude name="inkview.cpp"/>
115 <exclude name="libnr/in-svg-plane-test.cpp"/>
116 <exclude name="libnr/nr-compose-reference.cpp"/>
117 <exclude name="libnr/nr-compose-test.cpp"/>
118 <exclude name="libnr/nr-matrix-test.cpp"/>
119 <exclude name="libnr/nr-point-fns-test.cpp"/>
120 <exclude name="libnr/nr-rotate-fns-test.cpp"/>
121 <exclude name="libnr/nr-rotate-test.cpp"/>
122 <exclude name="libnr/nr-scale-test.cpp"/>
123 <exclude name="libnr/nr-translate-test.cpp"/>
124 <exclude name="libnr/nr-types-test.cpp"/>
125 <exclude name="livarot/Path-test.cpp"/>
126 <exclude name="mod360-test.cpp"/>
127 <exclude name="trace/potrace/potest.cpp"/>
128 <exclude name="round-test.cpp"/>
129 <exclude name="sp-gradient-test.cpp"/>
130 <exclude name="svg/ftos.cpp"/>
131 <exclude name="utest/.*"/>
132 <exclude name="widgets/test-widgets.cpp"/>
133 <exclude name="xml/quote-test.cpp"/>
134 <exclude name="xml/repr-action-test.cpp"/>
135 <exclude name="io/streamtest.cpp"/>
136 <!--JABBER-->
137 <exclude name="pedro/pedrogui.cpp"/>
138 <exclude name="pedro/pedrogui.h"/>
139 <exclude name="pedro/work/.*"/>
140 <!--WHITEBOARD-->
141 <exclude name="ui/dialog/session-player.cpp"/>
142 <exclude name="ui/dialog/whiteboard-connect.cpp"/>
143 <exclude name="ui/dialog/whiteboard-sharewithchat.cpp"/>
144 <exclude name="ui/dialog/whiteboard-sharewithuser.cpp"/>
145 <exclude name="dialogs/whiteboard-connect-dialog.cpp"/>
146 <exclude name="dialogs/whiteboard-common-dialog.cpp"/>
147 <exclude name="dialogs/whiteboard-sharewithchat-dialog.cpp"/>
148 <exclude name="dialogs/whiteboard-sharewithuser-dialog.cpp"/>
149 <exclude name="jabber_whiteboard/node-tracker.cpp"/>
150 <exclude name="jabber_whiteboard/node-utilities.cpp"/>
151 <!--WHITEBOARD-->
152 <exclude name="removeoverlap/placement_SolveVPSC.cpp"/>
153 <exclude name="removeoverlap/placement_SolveVPSC.h"/>
154 <exclude name="removeoverlap/test.cpp"/>
155 <exclude name="removeoverlap/remove_rectangle_overlap-test.cpp"/>
156 <exclude name="removeoverlap/remove_rectangle_overlap-test.h"/>
157 </fileset>
158 <flags>
159 -Wall -O3
160 -mms-bitfields
161 </flags>
162 <defines>
163 -DVERSION=\"${version}\"
164 -DHAVE_CONFIG_H
165 -DXP_WIN <!-- for JS -->
166 -D_INTL_REDIRECT_INLINE
167 -DWITH_INKBOARD -DHAVE_SSL <!-- inkboard -->
168 </defines>
169 <includes>
170 -I${gtk}/include
171 <!-- GTK / GTKMM -->
172 -I${gtk}/include/glibmm-2.4
173 -I${gtk}/lib/glibmm-2.4/include
174 -I${gtk}/include/gtkmm-2.4
175 -I${gtk}/lib/gtkmm-2.4/include
176 -I${gtk}/include/gdkmm-2.4
177 -I${gtk}/lib/gdkmm-2.4/include
178 -I${gtk}/include/pangomm-1.4
179 -I${gtk}/include/atkmm-1.6
180 -I${gtk}/include/cairomm-1.0
181 -I${gtk}/include/sigc++-2.0
182 -I${gtk}/lib/sigc++-2.0/include
183 -I${gtk}/include/gtk-2.0
184 -I${gtk}/lib/gtk-2.0/include
185 -I${gtk}/include/atk-1.0
186 -I${gtk}/include/pango-1.0
187 -I${gtk}/include/glib-2.0
188 -I${gtk}/lib/glib-2.0/include
189 <!-- OTHER -->
190 -I${gtk}/include/libxml2
191 -I${gtk}/include/freetype2
192 -I${gtk}/include/cairo
193 <!-- PERL -->
194 -Wno-comment -I${gtk}/perl/lib/CORE
195 <!-- PYTHON -->
196 -I${gtk}/python/include
197 </includes>
198 </cc>
199 </target>
201 <target name="lib" depends="compile">
202 <staticlib command="${archutil}ar crsv"
203 file="${build}/libinkscape.a">
204 <fileset dir="${build}/obj">
205 <exclude name="main,o"/>
206 <exclude name="winmain,o"/>
207 </fileset>
208 </staticlib>
209 </target>
211 <target name="i18n" depends="compile">
212 <msgfmt todir="${build}/locale" owndir="true">
213 <fileset dir="po">
214 </fileset>
215 </msgfmt>
216 </target>
218 <target name="link" depends="lib">
219 <rc command="${archutil}windres"
220 file="${src}/inkscape.rc"
221 out="${build}/inkres.o">
222 <flags>
223 --include-dir=${src}
224 </flags>
225 </rc>
226 <link command="${arch}g++" out="${build}/inkscape.exe"
227 strip="true" symfile="${build}/inkscape.dbg"
228 stripcommand="${archutil}strip"
229 objcopycommand="${archutil}objcopy"
230 >
231 <flags>
232 </flags>
233 <fileset dir="${build}">
234 <include name="inkres.o"/>
235 <include name="obj/main.o"/>
236 <include name="obj/winmain.o"/>
237 <include name="libinkscape.a"/>
238 </fileset>
239 <libs>
240 -L${gtk}/lib
241 -lgtkmm-2.4 -lgdkmm-2.4 -lglibmm-2.4
242 -latkmm-1.6 -lpangomm-1.4 -lsigc-2.0
243 -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0
244 -lgdk_pixbuf-2.0
245 -lpangocairo-1.0 -lpangoft2-1.0 -lpangowin32-1.0 -lpango-1.0
246 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lcairo
247 <!-- PERL -->
248 -L${gtk}/perl/lib/CORE -lperl58
249 <!-- PYTHON -->
250 -L${gtk}/python/libs -lpython24
251 ${gtk}/bin/libxml2.dll
252 ${gtk}/lib/iconv.lib
253 -lfreetype.dll -lfontconfig.dll
254 -llcms.dll
255 -lssl -lcrypto
256 -lpng -lpopt ${gtk}/lib/zdll.lib
257 -lgc -mwindows -lws2_32 -lintl -lm
258 </libs>
259 </link>
260 </target>
262 <target name="dist" depends="link,i18n"
263 description="generate the distribution" >
264 <!-- Create the distribution directory -->
265 <copy file="${build}/inkscape.exe" todir="${dist}"/>
266 <copy file="${build}/inkscape.dbg" todir="${dist}"/>
267 <copy file="AUTHORS" todir="${dist}"/>
268 <copy file="COPYING" todir="${dist}"/>
269 <copy file="COPYING.LIB" todir="${dist}"/>
270 <copy file="NEWS" todir="${dist}"/>
271 <copy file="README" todir="${dist}"/>
272 <copy file="TRANSLATORS" todir="${dist}"/>
273 <copy file="${gtk}/bin/libatkmm-1.6-1.dll" todir="${dist}"/>
274 <copy file="${gtk}/bin/libglibmm-2.4-1.dll" todir="${dist}"/>
275 <copy file="${gtk}/bin/libgtkmm-2.4-1.dll" todir="${dist}"/>
276 <copy file="${gtk}/bin/libgdkmm-2.4-1.dll" todir="${dist}"/>
277 <copy file="${gtk}/bin/libpangomm-1.4-1.dll" todir="${dist}"/>
278 <copy file="${gtk}/bin/libcairomm-1.0-1.dll" todir="${dist}"/>
279 <copy file="${gtk}/bin/libsigc-2.0-0.dll" todir="${dist}"/>
280 <copy file="${gtk}/bin/freetype6.dll" todir="${dist}"/>
281 <copy file="${gtk}/bin/libatk-1.0-0.dll" todir="${dist}"/>
282 <copy file="${gtk}/bin/libgdk-win32-2.0-0.dll" todir="${dist}"/>
283 <copy file="${gtk}/bin/libgdk_pixbuf-2.0-0.dll" todir="${dist}"/>
284 <copy file="${gtk}/bin/libglib-2.0-0.dll" todir="${dist}"/>
285 <copy file="${gtk}/bin/libgmodule-2.0-0.dll" todir="${dist}"/>
286 <copy file="${gtk}/bin/libgobject-2.0-0.dll" todir="${dist}"/>
287 <copy file="${gtk}/bin/libgtk-win32-2.0-0.dll" todir="${dist}"/>
288 <copy file="${gtk}/bin/libgthread-2.0-0.dll" todir="${dist}"/>
289 <copy file="${gtk}/bin/libcairo-2.dll" todir="${dist}"/>
290 <copy file="${gtk}/bin/libpangocairo-1.0-0.dll" todir="${dist}"/>
291 <copy file="${gtk}/bin/libpango-1.0-0.dll" todir="${dist}"/>
292 <copy file="${gtk}/bin/libpangoft2-1.0-0.dll" todir="${dist}"/>
293 <copy file="${gtk}/bin/libpangowin32-1.0-0.dll" todir="${dist}"/>
294 <copy file="${gtk}/bin/freetype6.dll" todir="${dist}"/>
295 <copy file="${gtk}/bin/libfontconfig-1.dll" todir="${dist}"/>
296 <copy file="${gtk}/bin/libxml2.dll" todir="${dist}"/>
297 <copy file="${gtk}/bin/xmlparse.dll" todir="${dist}"/>
298 <copy file="${gtk}/bin/jpeg62.dll" todir="${dist}"/>
299 <copy file="${gtk}/bin/libpng13.dll" todir="${dist}"/>
300 <copy file="${gtk}/bin/msvcr70.dll" todir="${dist}"/>
301 <copy file="${gtk}/bin/msvcr71.dll" todir="${dist}"/>
302 <copy file="${gtk}/bin/zlib1.dll" todir="${dist}"/>
303 <copy file="${gtk}/bin/iconv.dll" todir="${dist}"/>
304 <copy file="${gtk}/bin/popt1.dll" todir="${dist}"/>
305 <copy file="${gtk}/bin/liblcms-1.dll" todir="${dist}"/>
306 <copy file="${gtk}/bin/intl.dll" todir="${dist}"/>
307 <copy file="${gtk}/bin/intl.dll" tofile="${dist}/libintl-2.dll"/>
309 <!-- MSGFMT files -->
310 <copy todir="${dist}">
311 <fileset dir="${build}/locale">
312 <exclude name=".*\.am"/>
313 </fileset>
314 </copy>
316 <!-- GTK -->
317 <copy todir="${dist}"> <fileset dir="${gtk}/etc"/> </copy>
318 <copy file="${gtk}/share/themes/MS-Windows/gtk-2.0/gtkrc" todir="${dist}/etc/gtk-2.0"/>
319 <copy todir="${dist}/lib"> <fileset dir="${gtk}/lib/gtk-2.0"/> </copy>
320 <copy todir="${dist}/lib"> <fileset dir="${gtk}/lib/glib-2.0"/> </copy>
321 <copy todir="${dist}/lib"> <fileset dir="${gtk}/lib/locale"/> </copy>
322 <copy todir="${dist}">
323 <fileset dir="share">
324 <exclude name=".*\.am"/>
325 </fileset>
326 </copy>
327 <copy todir="${dist}/share"> <fileset dir="${gtk}/share/themes"/> </copy>
328 <mkdir dir="${dist}/data"/>
329 <mkdir dir="${dist}/locale"/>
330 <mkdir dir="${dist}/modules"/>
331 <mkdir dir="${dist}/plugins"/>
332 <copy file="${gtk}/bin/gdb.exe" todir="${dist}"/>
334 <!-- PERL -->
335 <copy file="${gtk}/perl/bin/perl58.dll" todir="${dist}"/>
337 <!-- PYTHON -->
338 <copy file="${gtk}/python/python24.dll" todir="${dist}"/>
339 <copy file="${gtk}/python/python.exe" todir="${dist}/python"/>
340 <copy todir="${dist}/python"> <fileset dir="${gtk}/python/Lib"/> </copy>
341 <copy todir="${dist}/python"> <fileset dir="${gtk}/python/DLLs"/> </copy>
342 <copy todir="${dist}/python"> <fileset dir="${gtk}/python/Scripts"/> </copy>
345 </target>
347 <target name="clean"
348 description="clean up" >
349 <!-- Delete the ${build} and ${dist} directory trees -->
350 <delete dir="${build}"/>
351 <delete dir="${dist}"/>
352 </target>
353 </project>