Code

CxxTest unit tests can now be built on Windows, also adds CxxTest versions of most...
[inkscape.git] / build.xml
1 <!--
2  * Inkscape build file.
3  *
4  * See buildtool.cpp for use.
5  *
6  * Authors:
7  *   Bob Jamison
8  *   Others 
9  *
10  * Copyright (C) 2006-2008 Inkscape.org
11  *
12  *  This library is free software; you can redistribute it and/or
13  *  modify it under the terms of the GNU Lesser General Public
14  *  License as published by the Free Software Foundation; either
15  *  version 2.1 of the License, or (at your option) any later version.
16  *
17  *  This library is distributed in the hope that it will be useful,
18  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20  *  Lesser General Public License for more details.
21  *
22  *  You should have received a copy of the GNU Lesser General Public
23  *  License along with this library; if not, write to the Free Software
24  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
25 -->
29 <!--
30 ########################################################################
31 ## P R O J E C T   :   I N K S C A P E
32 ########################################################################
33 -->
34 <project name="Inkscape" default="dist" basedir=".">
35     <description>
36         Build file for the Inkscape SVG editor.  This file
37         was written for GTK-2.10 on Win32, but it should work
38         well for other types of builds with only minor adjustments.
39         Note that the default target is 'dist'.  You can execute other
40         targets instead, by "btool {target}",  like  "btool compile", if
41         you want to save time.
42     </description>
44   <!-- set global properties for this build -->
45   <property name="version"       value="0.46+devel"/>
46   <property name="src"           location="src"/>
47   <property name="lib"           location="lib"/>
48   <property name="build"         location="build"/>
49   <property name="dist"          location="inkscape"/>
51   <!-- Use these settings for the native compiler -->  
52   <!-- -->
53   <property name="arch"          value="mingw32-"/>
54   <property name="archutil"      value=""/>
55   <property name="devlibs"       location="c:/devlibs"/>
56   <property name="cxxtest"       location="cxxtest"/>
57   <!-- -->
59   <!-- Use these settings for the cross compiler -->  
60   <!--
61   <property name="arch"          value="i686-pc-mingw32-"/>
62   <property name="archutil"      value="${arch}"/>
63   <property name="devlibs"       location="/target"/>
64   -->
66   <!-- Extra properties -->  
67   <property name="refresh"       value="false"/>
69   <!--
70     This is for package-config.  With these two settings, pkg-config
71     queries can be as simple as ${pcc.packageName} for cflags, and
72     ${pcl.packageName} for libs.  Dependencies are calculated automatically.
73   -->
74   <property name="pkg-config-path"   location="${devlibs}/lib/pkgconfig"/>
75   <property name="pkg-config-prefix" location="${devlibs}"/>
78   <!--
79   ########################################################################
80   ## T A R G E T    :    I N I T
81   ########################################################################
82   -->
83   <target name="init"
84       description=
85       "Do all preparatory tasks, like make directories and copy files">
88     <mkdir dir="${build}"/>
89     <mkdir dir="${build}/java"/>
90     <mkdir dir="${build}/java/classes"/>
91     <mkdir dir="${build}/java/lib"/>
93     <mkdir dir="${build}"/>
94     <mkdir dir="${dist}"/>
95     <copy file="${src}/helper/sp-marshal.h.mingw"
96           tofile="${src}/helper/sp-marshal.h"/>
97     <copy file="${src}/helper/sp-marshal.cpp.mingw"
98           tofile="${src}/helper/sp-marshal.cpp"/>
99     <makefile file="inkscape_version.h">
100         #define INKSCAPE_VERSION "${version}"
101     </makefile>
102     <makefile file="config.h">
103         #ifndef _CONFIG_H_
104         #define _CONFIG_H_
106         #ifndef WIN32
107         #define WIN32
108         #endif
110         /*######################################
111         ## This is for require-config.h, whose
112         ## purpose I cannot fathom.
113         ######################################*/
114         
115         #define PACKAGE_TARNAME
117         /*######################################
118         #### RESOURCE DIRECTORIES
119         ######################################*/
121         #define INKSCAPE_DATADIR       "."
122         #define PACKAGE_LOCALE_DIR     "locale"
125         /*######################################
126         #### OTHER DEFINITIONS
127         ######################################*/
129         #define GETTEXT_PACKAGE "inkscape"
131         #define PACKAGE_STRING                VERSION
133         #define HAVE_GETOPT_H                 1
134         #define HAVE_STRING_H                 1
135         #define HAVE_LIBINTL_H                1
136         #define HAVE_MALLOC_H                 1
137         #define HAVE_STDLIB_H                 1
138         #define HAVE_SYS_STAT_H               1
139         #define HAVE_INTTYPES_H               1
141         #define ENABLE_LCMS                   1
143         #define ENABLE_NLS                    1
144         #define HAVE_BIND_TEXTDOMAIN_CODESET  1
146         /* keep binreloc off */
147         #define BR_PTHREADS 0
148         #undef ENABLE_BINRELOC
150         /* CairoPDF options */
151         #define HAVE_CAIRO_PDF                1
152         #define PANGO_ENABLE_ENGINE           1
153         #define RENDER_WITH_PANGO_CAIRO       1
155         #define HAVE_GTK_WINDOW_FULLSCREEN    1
156         
157         /* internal interpreter */
158         #define WITH_PYTHON                   1
160         /* shared whiteboard */
161         #define WITH_INKBOARD                 1
162         #define HAVE_SSL                      1
163         
164         /* use poppler for pdf import? */
165         #define HAVE_POPPLER                  1
166         #define HAVE_POPPLER_CAIRO            1
168         /* do we want bitmap manipulation? */
169         #define WITH_IMAGE_MAGICK             1
171         /* Allow reading WordPerfect? */
172         #define WITH_LIBWPG                   1
174         #endif /* _CONFIG_H_ */
175     </makefile>
176   </target>
180   <!--
181   ########################################################################
182   ## T A R G E T    :    T O U C H A B O U T
183   ########################################################################
184   -->
185   <target name="touchabout"
186       description="update the modification time of aboutdialog.cpp">
187     <!-- not good <touch file="${src}/ui/dialog/aboutdialog.cpp"/> -->
188     <!-- better -->
189     <delete file="${build}/obj/ui/dialog/aboutdialog.o"/>
190   </target>
193   <!--
194   ########################################################################
195   ## T A R G E T    :    C X X T E S T
196   ########################################################################
197   -->
198   <target name="cxxtest" depends="init"
199         description="generate test files" >
201     <!-- Generate CxxTest files -->
202     <cxxtestpart command="python ${cxxtest}/cxxtestgen.py"
203                  out="${src}/test-src.cpp">
204         <fileset dir="${src}">
205             <include name="attributes-test.h"/>
206             <include name="color-profile-test.h"/>
207             <include name="dir-util-test.h"/>
208             <include name="extract-uri-test.h"/>
209             <include name="mod360-test.h"/>
210             <include name="round-test.h"/>
211             <include name="sp-gradient-test.h"/>
212             <include name="sp-style-elem-test.h"/>
213             <include name="syle-test.h"/>
214             <include name="test-helpers.h"/>
215             <include name="verbs-test.h"/>
216         </fileset>
217     </cxxtestpart>
218     <cxxtestpart command="python ${cxxtest}/cxxtestgen.py" 
219                  out="${src}/display/test-display.cpp">
220         <fileset dir="${src}/display">
221             <include name="bezier-utils-test.h"/>
222         </fileset>
223     </cxxtestpart>
224     <cxxtestpart command="python ${cxxtest}/cxxtestgen.py" 
225                  out="${src}/helper/test-helper.cpp">
226         <fileset dir="${src}/helper">
227             <include name="units-test.h"/>
228         </fileset>
229     </cxxtestpart>
230     <cxxtestpart command="python ${cxxtest}/cxxtestgen.py" 
231                  out="${src}/libnr/test-nr.cpp">
232         <fileset dir="${src}/libnr">
233             <include name="nr-types-test.h"/>
234             <include name="nr-translate-test.h"/>
235             <include name="nr-rotate-test.h"/>
236             <include name="nr-scale-test.h"/>
237             <include name="nr-point-fns-test.h"/>
238             <include name="nr-rotate-fns-test.h"/>
239             <include name="in-svg-plane-test.h"/>
240             <include name="nr-matrix-test.h"/>
241         </fileset>
242     </cxxtestpart>
243     <cxxtestpart command="python ${cxxtest}/cxxtestgen.py" 
244                  out="${src}/svg/test-svg.cpp">
245         <fileset dir="${src}/svg">
246             <include name="css-ostringstream-test.h"/>
247             <include name="stringstream-test.h"/>
248             <include name="svg-color-test.h"/>
249             <include name="svg-path-test.h"/>
250         </fileset>
251     </cxxtestpart>
252     <cxxtestpart command="python ${cxxtest}/cxxtestgen.py" 
253                  out="${src}/xml/test-xml.cpp">
254         <fileset dir="${src}/xml">
255             <include name="repr-action-test.h"/>
256             <include name="quote-test.h"/>
257         </fileset>
258     </cxxtestpart>
259     <cxxtestroot command="python ${cxxtest}/cxxtestgen.py" 
260                  out="${src}/test-main.cpp"
261                  template="${src}/selfname.tpl">
262         <fileset dir="${src}">
263             <include name="MultiPrinter.h"/>
264             <include name="PylogFormatter.h"/>
265             <include name="TRPIFormatter.h"/>
266         </fileset>
267     </cxxtestroot>
268   </target>
271   <!--
272   ########################################################################
273   ## T A R G E T    :    C O M P I L E
274   ########################################################################
275   -->
276   <target name="compile" depends="cxxtest"
277         description="compile the source to .o" >
279     <!-- Compile from source to build -->
280     <cc cc="${arch}gcc" cxx="${arch}g++"
281              destdir="${build}/obj"
282                          continueOnError="true"
283                          refreshCache="${refresh}">
284         <fileset dir="${src}">
285             <!-- THINGS TO EXCLUDE -->
286             <exclude name="2geom/chebyshev.cpp"/>
287             <exclude name="ast/.*"/>
288             <exclude name="bonobo/.*"/>
289             <exclude name="deptool.cpp"/>
290             <!--<exclude name="test-main.cpp"/>-->
291             <!--<exclude name="test-src.cpp"/>-->
292             <exclude name="display/testnr.cpp"/>
293             <exclude name="display/bezier-utils-test.cpp"/>
294             <exclude name="dom/work/.*"/>
295             <exclude name="dom/odf/SvgOdg.cpp"/>
296             <exclude name="extension/api.cpp"/>
297             <exclude name="extension/dxf2svg/.*"/>
298             <exclude name="extension/implementation/plugin.cpp"/>
299             <exclude name="extension/script/bindtest.cpp"/>
300             <exclude name="extension/script/cpptest.cpp"/>
301             <exclude name="extension/plugin/.*"/>
302             <exclude name="extract-uri-test.cpp"/>
303             <exclude name="helper/units-test.cpp"/>
304             <!-- exclude name="inkview.cpp"/-->
305             <!--<exclude name="libnr/test-nr.cpp"/>-->
306             <exclude name="libnr/test-nr-main.cpp"/>
307             <exclude name="libnr/testnr.cpp"/>
308             <exclude name="libnr/in-svg-plane-test.cpp"/>
309             <exclude name="libnr/nr-compose-reference.cpp"/>
310             <exclude name="libnr/nr-compose-test.cpp"/>
311             <exclude name="libnr/nr-matrix-test.cpp"/>
312             <exclude name="libnr/nr-point-fns-test.cpp"/>
313             <exclude name="libnr/nr-rotate-fns-test.cpp"/>
314             <exclude name="libnr/nr-rotate-test.cpp"/>
315             <exclude name="libnr/nr-scale-test.cpp"/>
316             <exclude name="libnr/nr-translate-test.cpp"/>
317             <exclude name="libnr/nr-types-test.cpp"/>
318             <exclude name="livarot/Path-test.cpp"/>
319             <exclude name="mod360-test.cpp"/>
320             <exclude name="trace/potrace/potest.cpp"/>
321             <exclude name="round-test.cpp"/>
322             <exclude name="sp-gradient-test.cpp"/>
323             <exclude name="style-test.cpp"/>
324             <exclude name="svg/ftos.cpp"/>
325             <!--<exclude name="svg/test-svg.cpp"/>-->
326             <exclude name="svg/test-svg-main.cpp"/>
327             <exclude name="svg/test-stubs.cpp"/>
328             <exclude name="utest/.*"/>
329             <exclude name="util/list-container-test.cpp"/>
330             <exclude name="widgets/test-widgets.cpp"/>
331             <exclude name="xml/quote-test.cpp"/>
332             <exclude name="xml/repr-action-test.cpp"/>
333             <!--<exclude name="xml/test-xml.cpp"/>-->
334             <exclude name="xml/test-xml-main.cpp"/>
335             <exclude name="io/streamtest.cpp"/>
336             <!--JABBER-->
337             <exclude name="pedro/pedrogui.cpp"/>
338             <exclude name="pedro/pedrogui.h"/>
339             <exclude name="pedro/work/.*"/>
340             <!--WHITEBOARD-->
341             <exclude name="ui/dialog/session-player.cpp"/>
342             <exclude name="ui/dialog/whiteboard-connect.cpp"/>
343             <exclude name="ui/dialog/whiteboard-sharewithchat.cpp"/>
344             <exclude name="ui/dialog/whiteboard-sharewithuser.cpp"/>
345             <exclude name="dialogs/whiteboard-connect-dialog.cpp"/>
346             <exclude name="dialogs/whiteboard-common-dialog.cpp"/>
347             <exclude name="dialogs/whiteboard-sharewithchat-dialog.cpp"/>
348             <exclude name="dialogs/whiteboard-sharewithuser-dialog.cpp"/>
349             <exclude name="jabber_whiteboard/node-tracker.cpp"/>
350             <exclude name="jabber_whiteboard/node-utilities.cpp"/>
351             <!--OVERLAP-->
352             <exclude name="removeoverlap/placement_SolveVPSC.cpp"/>
353             <exclude name="removeoverlap/placement_SolveVPSC.h"/>
354             <exclude name="removeoverlap/test.cpp"/>
355             <exclude name="removeoverlap/remove_rectangle_overlap-test.cpp"/>
356             <exclude name="removeoverlap/remove_rectangle_overlap-test.h"/>
357         </fileset>
358         <excludeinc dir="${src}">
359             <file name="extension/param"/>
360         </excludeinc>
361         <flags>
362             -Wall -Wformat -Werror=format-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch
363             -O2
364             -mms-bitfields
365         </flags>
366         <defines>
367             -DVERSION=\"${version}\"
368             -DHAVE_CONFIG_H
369             -D_INTL_REDIRECT_INLINE
370             -DHAVE_SSL
371             -DRELAYTOOL_SSL="static const int libssl_is_present=1; static int __attribute__((unused)) libssl_symbol_is_present(char *s){ return 1; }" <!-- inkboard -->
372             -DPOPPLER_NEW_GFXFONT <!-- poppler changed the api for 0.8.3 -->
373         </defines>
374         <includes>
375             -I${devlibs}/include
376             <!-- GTK / GTKMM -->
377             ${pcc.gtkmm-2.4}
378             <!-- OTHER -->
379             -I${devlibs}/include/libxml2 
380             ${pcc.freetype2}
381             ${pcc.cairo}
382             ${pcc.poppler}
383             -I${devlibs}/include/gc
384             ${pcc.libwpg-0.1} ${pcc.libwpg-stream-0.1}
385             -I${cxxtest}
386             <!-- PERL -->
387             <!-- -Wno-comment -I${devlibs}/perl/lib/CORE -->
388             <!-- PYTHON -->
389             -I${devlibs}/python/include
390             <!-- JAVA -->
391             -I${src}/bind/javainc -I${src}/bind/javainc/win32
392         </includes>
393     </cc>
394   </target>
395   
397   <!--
398   ########################################################################
399   ## T A R G E T    :    L I B
400   ########################################################################
401   -->
402   <target name="lib" depends="compile"
403       description="create a static library">
404     <staticlib command="${archutil}ar crsv"
405            file="${build}/libinkscape.a">
406        <fileset dir="${build}/obj">
407            <exclude name="main.o"/>
408            <exclude name="winmain.o"/>
409            <exclude name="inkview.o"/>
410            <!-- CxxTest -->
411            <exclude name="obj/test-main.o"/>
412            <exclude name="obj/test-src.o"/>
413            <exclude name="obj/display/test-display.o"/>
414            <exclude name="obj/helper/test-helper.o"/>
415            <exclude name="obj/libnr/test-nr.o"/>
416            <exclude name="obj/svg/test-svg.o"/>
417            <exclude name="obj/xml/test-xml.o"/>
418        </fileset>
419     </staticlib>
420   </target>
424   <!--
425   ########################################################################
426   ## T A R G E T    :    I 1 8 N
427   ########################################################################
428   -->
429   <target name="i18n" depends="compile"
430       description="compile gettext .po files to .mo">
432     <msgfmt todir="${build}/locale" owndir="true"
433          out="LC_MESSAGES/inkscape.mo">
434        <fileset dir="po">
435        </fileset>
436     </msgfmt>
437   </target>
443   <!--
444   ########################################################################
445   ## T A R G E T    :    L I N K
446   ########################################################################
447   -->
448   <target name="link" depends="lib"
449       description="link objects and library to create executable">
451     <rc command="${archutil}windres" 
452         file="${src}/inkscape.rc"
453         out="${build}/inkres.o">
454         <flags>
455         --include-dir=${src}
456         </flags>
457     </rc>
458     <link command="${arch}g++" out="${build}/inkscape.exe"
459               strip="true" symfile="${build}/inkscape.dbg"
460               stripcommand="${archutil}strip"
461               objcopycommand="${archutil}objcopy">
462        <flags>
463            -mwindows
464        </flags>
465        <fileset dir="${build}">
466            <include name="inkres.o"/>
467            <include name="obj/main.o"/>
468            <include name="obj/winmain.o"/>
469            <include name="libinkscape.a"/>
470        </fileset>
471        <libs>
472            -L${devlibs}/lib
473            ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler} 
474            ${pcl.gtkmm-2.4}  ${pcl.pangoft2} ${pcl.gthread-2.0}
475            ${devlibs}/bin/libxml2.dll
476            ${devlibs}/bin/libxslt.dll
477            ${pcl.cairo} ${pcl.cairomm-1.0}
478            ${pcl.libwpg-0.1} ${pcl.libwpg-stream-0.1}
479            ${devlibs}/lib/iconv.lib
480            ${pcl.ImageMagick++}
481            ${pcl.fontconfig} ${pcl.freetype2}
482            -lssl -lcrypto
483            ${pcl.lcms}
484            ${pcl.gsl}
485            -lpng -ljpeg.dll -ltiff.dll -lpopt ${devlibs}/lib/zdll.lib
486            -lgc
487            -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
488        </libs>
489     </link>
490   </target>
491   
496   <!--
497   ########################################################################
498   ## T A R G E T    :    L I N K I N K V I E W
499   ########################################################################
500   -->
501   <target name="linkinkview" depends="lib"
502         description="link objects and library to create Inkview executable">
504     <rc command="${archutil}windres" 
505         file="${src}/inkview.rc"
506         out="${build}/inkviewres.o">
507         <flags>
508         --include-dir=${src}
509         </flags>
510     </rc>
511     <link command="${arch}g++" out="${build}/inkview.exe"
512               strip="true" symfile="${build}/inkview.dbg"
513               stripcommand="${archutil}strip"
514               objcopycommand="${archutil}objcopy">
515        <flags>
516        </flags>
517        <fileset dir="${build}">
518            <include name="inkviewres.o"/>
519            <include name="obj/inkview.o"/>
520            <include name="libinkscape.a"/>
521        </fileset>
522        <libs>
523            -L${devlibs}/lib
524            -lpoppler-cairo -lpoppler-glib -lpoppler.dll 
525            ${pcl.gtkmm-2.4}
526            <!-- PERL -->
527            -L${devlibs}/perl/lib/CORE -lperl58
528            <!-- PYTHON -->
529            -L${devlibs}/python/libs -lpython25
530            ${devlibs}/bin/libxml2.dll
531            ${devlibs}/bin/libxslt.dll
532            ${devlibs}/lib/iconv.lib
533            -lcairo.dll -lcairomm-1.0.dll
534            -lwpg-0.1.dll -lwpg-stream-0.1.dll
535            -lMagick++ -lWand -lMagick
536            -lfreetype.dll -lfontconfig.dll
537            -llcms.dll
538            -lssl -lcrypto
539            -lpng -ljpeg.dll -ltiff.dll -lpopt ${devlibs}/lib/zdll.lib
540            -lgc -mwindows
541            -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
542        </libs>
543     </link>
544   </target>
548   <!--
549   ########################################################################
550   ## T A R G E T    :    L I N K C X X T E S T S
551   ########################################################################
552   -->
553   <target name="linkcxxtests" depends="lib"
554       description="link objects and library to create executable">
556     <link command="${arch}g++" out="${build}/cxxtests.exe"
557               strip="true" symfile="${build}/cxxtests.dbg"
558               stripcommand="${archutil}strip"
559               objcopycommand="${archutil}objcopy">
560        <flags>
561        </flags>
562        <fileset dir="${build}">
563            <include name="obj/test-main.o"/>
564            <include name="obj/test-src.o"/>
565            <include name="obj/display/test-display.o"/>
566            <include name="obj/helper/test-helper.o"/>
567            <include name="obj/libnr/test-nr.o"/>
568            <include name="obj/svg/test-svg.o"/>
569            <include name="obj/xml/test-xml.o"/>
570            <include name="libinkscape.a"/>
571        </fileset>
572        <libs>
573            -L${devlibs}/lib
574            ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler} 
575            ${pcl.gtkmm-2.4}  ${pcl.pangoft2} ${pcl.gthread-2.0}
576            ${devlibs}/bin/libxml2.dll
577            ${devlibs}/bin/libxslt.dll
578            ${pcl.cairo} ${pcl.cairomm-1.0}
579            ${pcl.libwpg-0.1} ${pcl.libwpg-stream-0.1}
580            ${devlibs}/lib/iconv.lib
581            ${pcl.ImageMagick++}
582            ${pcl.fontconfig} ${pcl.freetype2}
583            -lssl -lcrypto
584            ${pcl.lcms}
585            ${pcl.gsl}
586            -lpng -ljpeg.dll -ltiff.dll -lpopt ${devlibs}/lib/zdll.lib
587            -lgc
588            -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
589        </libs>
590     </link>
591   </target>
594   <!--
595   ########################################################################
596   ## T A R G E T    :    D I S T
597   ########################################################################
598   -->
599   <target name="dist" depends="link,i18n"
600       description="generate the distribution directory with all needed files">
602     <!-- Create the distribution directory -->
603     <copy todir="${dist}" file="${build}/inkscape.exe"/>
604     <copy todir="${dist}" file="${build}/inkscape.dbg"/>
605     <copy todir="${dist}" file="AUTHORS"/>
606     <copy todir="${dist}" file="COPYING"/>
607     <copy todir="${dist}" file="COPYING.LIB"/>
608     <copy todir="${dist}" file="NEWS"/>
609     <copy todir="${dist}" file="README"/>
610     <copy todir="${dist}" file="TRANSLATORS"/>
611     <copy todir="${dist}" file="${devlibs}/bin/libatkmm-1.6-1.dll"/>
612     <copy todir="${dist}" file="${devlibs}/bin/libglibmm-2.4-1.dll"/>
613     <copy todir="${dist}" file="${devlibs}/bin/libgtkmm-2.4-1.dll"/>
614     <copy todir="${dist}" file="${devlibs}/bin/libgdkmm-2.4-1.dll"/>
615     <copy todir="${dist}" file="${devlibs}/bin/libpangomm-1.4-1.dll"/>
616     <copy todir="${dist}" file="${devlibs}/bin/libcairomm-1.0-1.dll"/>
617     <copy todir="${dist}" file="${devlibs}/bin/libsigc-2.0-0.dll"/>
618     <copy todir="${dist}" file="${devlibs}/bin/freetype6.dll"/>
619     <copy todir="${dist}" file="${devlibs}/bin/libatk-1.0-0.dll"/>
620     <copy todir="${dist}" file="${devlibs}/bin/libgdk-win32-2.0-0.dll"/>
621     <copy todir="${dist}" file="${devlibs}/bin/libgdk_pixbuf-2.0-0.dll"/>
622     <copy todir="${dist}" file="${devlibs}/bin/libglib-2.0-0.dll"/>
623     <copy todir="${dist}" file="${devlibs}/bin/libgmodule-2.0-0.dll"/>
624     <copy todir="${dist}" file="${devlibs}/bin/libgobject-2.0-0.dll"/>
625     <copy todir="${dist}" file="${devlibs}/bin/libgtk-win32-2.0-0.dll"/>
626     <copy todir="${dist}" file="${devlibs}/bin/libgthread-2.0-0.dll"/>
627     <copy todir="${dist}" file="${devlibs}/bin/libcairo-2.dll"/>
628     <copy todir="${dist}" file="${devlibs}/bin/libpoppler-3.dll"/>
629     <copy todir="${dist}" file="${devlibs}/bin/libpangocairo-1.0-0.dll"/>
630     <copy todir="${dist}" file="${devlibs}/bin/libpango-1.0-0.dll"/>
631     <copy todir="${dist}" file="${devlibs}/bin/libpangoft2-1.0-0.dll"/>
632     <copy todir="${dist}" file="${devlibs}/bin/libpangowin32-1.0-0.dll"/>
633     <copy todir="${dist}" file="${devlibs}/bin/freetype6.dll"/>
634     <copy todir="${dist}" file="${devlibs}/bin/libfontconfig-1.dll"/>
635     <copy todir="${dist}" file="${devlibs}/bin/libxml2.dll"/>
636     <copy todir="${dist}" file="${devlibs}/bin/libxslt.dll"/>
637     <copy todir="${dist}" file="${devlibs}/bin/libexpat.dll"/>
638     <!--<copy file="${devlibs}/bin/libexpat.dll" tofile="${dist}/xmlparse.dll"/>-->
639     <copy todir="${dist}" file="${devlibs}/bin/libwpg-0.1.dll"/>
640     <copy todir="${dist}" file="${devlibs}/bin/libwpg-stream-0.1.dll"/>
641     <copy todir="${dist}" file="${devlibs}/bin/libwpd-0.8.dll"/>
642     <copy todir="${dist}" file="${devlibs}/bin/libwpd-stream-0.8.dll"/>
643     <copy todir="${dist}" file="${devlibs}/bin/jpeg62.dll"/>
644     <copy todir="${dist}" file="${devlibs}/bin/libpng13.dll"/>
645     <!-- GTK changed their dep file name for PNG!   :-(  -->
646     <copy todir="${dist}" file="${devlibs}/bin/libpng12-0.dll"/>
647     <copy todir="${dist}" file="${devlibs}/bin/libtiff3.dll"/>
648     <copy todir="${dist}" file="${devlibs}/bin/msvcr70.dll"/>
649     <copy todir="${dist}" file="${devlibs}/bin/msvcr71.dll"/>
650     <copy todir="${dist}" file="${devlibs}/bin/zlib1.dll"/>
651     <copy todir="${dist}" file="${devlibs}/bin/iconv.dll"/>
652     <copy todir="${dist}" file="${devlibs}/bin/libpopt-0.dll"/>
653     <copy todir="${dist}" file="${devlibs}/bin/liblcms-1.dll"/>
654     <copy todir="${dist}" file="${devlibs}/bin/intl.dll"/>
655     <copy file="${devlibs}/bin/intl.dll" tofile="${dist}/libintl-2.dll"/>
657     <!-- MSGFMT files -->
658     <copy todir="${dist}">
659         <fileset dir="${build}/locale">
660           <exclude name=".*\.am"/>
661         </fileset>
662     </copy>
664     <mkdir dir="${dist}/data"/>
665     <mkdir dir="${dist}/locale"/>
666     <mkdir dir="${dist}/modules"/>
667     <mkdir dir="${dist}/plugins"/>
669     <!-- GTK -->
670     <copy todir="${dist}">     <fileset dir="${devlibs}/etc"/> </copy>
671     <copy todir="${dist}/lib"> <fileset dir="${devlibs}/lib/gtk-2.0"/> </copy>
672     <copy todir="${dist}/lib"> <fileset dir="${devlibs}/lib/glib-2.0"/> </copy>
673     <copy todir="${dist}">
674         <fileset dir="share">
675           <exclude name=".*\.am"/>
676         </fileset>
677     </copy>
678     <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/locale"/> </copy>
679     <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/themes"/> </copy>
680     <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/poppler"/> </copy>
681     <copy todir="${dist}" file="${devlibs}/bin/gdb.exe"/>
683     <!-- Necessary to run extensions on windows if it is not in the path -->
684     <copy todir="${dist}" file="${devlibs}/bin/gspawn-win32-helper.exe"/>
685     <copy todir="${dist}" file="${devlibs}/bin/gspawn-win32-helper-console.exe"/>
687     <!-- PERL -->
688     <copy todir="${dist}" file="${devlibs}/perl/bin/perl58.dll"/>
690     <!-- PYTHON -->
691     <copy todir="${dist}" file="${devlibs}/python/python25.dll"/>
692     <copy todir="${dist}/python" file="${devlibs}/python/python.exe" />
693     <copy todir="${dist}/python" file="${devlibs}/python/pythonw.exe"/>
694     <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/Lib"/> </copy>
695     <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/DLLs"/> </copy>
696     <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/Scripts"/> </copy>
698     <!--<copy file="${devlibs}/share/themes/MS-Windows/gtk-2.0/gtkrc" todir="${dist}/etc/gtk-2.0"/>-->
699     <makefile file="${dist}/etc/gtk-2.0/gtkrc">
700     gtk-icon-sizes = "gtk-menu=16,16:gtk-small-toolbar=16,16:gtk-large-toolbar=24,24:gtk-dnd=32,32:inkscape-decoration=16,16"
701     gtk-toolbar-icon-size = small-toolbar
703     # disable images in buttons. i've only seen ugly delphi apps use this feature.
704     gtk-button-images = 0
706     # enable/disable images in menus. most "stock" microsoft apps don't use these, except sparingly.
707     # the office apps use them heavily, though.
708     gtk-menu-images = 1
710     # use the win32 button ordering instead of the GNOME HIG one, where applicable
711     gtk-alternative-button-order = 1
713     style "msw-default"
714     {
715       GtkWidget::interior-focus = 1
716       GtkOptionMenu::indicator-size = { 9, 5 }
717       GtkOptionMenu::indicator-spacing = { 7, 5, 2, 2 }
718       GtkSpinButton::shadow-type = in
720       # Owen and I disagree that these should be themable
721       #GtkUIManager::add-tearoffs = 0
722       #GtkComboBox::add-tearoffs = 0
724       GtkComboBox::appears-as-list = 1
725       GtkComboBox::focus-on-click = 0
727       GOComboBox::add_tearoffs = 0
729       GtkTreeView::allow-rules = 0
730       GtkTreeView::expander-size = 12
732       GtkExpander::expander-size = 12
734       GtkScrolledWindow::scrollbar_spacing = 1
736       GtkSeparatorMenuItem::horizontal-padding = 2
738       engine "wimp"
739       {
740       }
741     }
742     class "*" style "msw-default"
743     </makefile>
745   </target>
748   <!--
749   ########################################################################
750   ## T A R G E T    :    JAVAC
751   ########################################################################
752   -->
753   <target name="javac" depends="init"
754       description="compile java binding classes">
755     <javac srcdir="${src}/bind/java" destdir="${build}/java/classes"/>
756   </target>
759   <!--
760   ########################################################################
761   ## T A R G E T    :    JAR
762   ########################################################################
763   -->
764   <target name="jar" depends="javac"
765       description="pack java classes and resources into a jar file">
766     <copy todir="${build}/java/classes"> <fileset dir="${devlibs}/bind/data"/> </copy>
767     <jar basedir="${build}/java/classes" destfile="${build}/java/lib/inkscape.jar"/>
768   </target>
770   <!--
771   ########################################################################
772   ## T A R G E T    :    BINDDIST
773   ########################################################################
774   -->
775   <target name="binddist" depends="jar"
776       description="pack java classes and resources into a jar file">
777     <copy todir="${dist}/share/bind"> <fileset dir="${devlibs}/bind/java"/> </copy>
778     <copy todir="${dist}/share/bind/java"> <fileset dir="${build}/java/lib"/> </copy>
780   </target>
782   <!--
783   ########################################################################
784   ## T A R G E T    :    BINDCLEAN
785   ########################################################################
786   -->
787   <target name="bindclean" depends=""
788       description="clean up java binding classes">
789         <delete dir="${build}/java"/>
790   </target>
795   <!--
796   ########################################################################
797   ## T A R G E T    :    D I S T - A L L
798   ########################################################################
799   -->
800   <target name="dist-all" depends="dist"
801         description="generate the distribution, along with inkview" >
803     <copy file="${build}/inkview.exe" todir="${dist}"/>
804     <copy file="${build}/inkview.dbg" todir="${dist}"/>
805   </target>
811   <!--
812   ########################################################################
813   ## T A R G E T    :    C L E A N
814   ########################################################################
815   -->
816   <target name="clean" depends="bindclean"
817         description="clean up.  deleting build and distro dirs" >
819     <delete dir="${build}"/>
820     <delete dir="${dist}"/>
821     <delete file="build.dep"/>
822     <delete file="config.h"/>
824     <delete file="${src}/test-main.cpp"/>
825     <delete file="${src}/test-src.cpp"/>
826     <delete file="${src}/display/test-display.cpp"/>
827     <delete file="${src}/helper/test-helper.cpp"/>
828     <delete file="${src}/libnr/test-nr.cpp"/>
829     <delete file="${src}/svg/test-svg.cpp"/>
830     <delete file="${src}/xml/test-xml.cpp"/>
832   </target>
836 </project>
837 <!--
838 ########################################################################
839 ## E N D
840 ########################################################################
841 -->