Code

Merge from trunk
[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-inkscape" 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="${env.DEVLIBS_PATH}"/>
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"/>
92     <mkdir dir="${dist}"/>
93     
94     <copy file="${src}/helper/sp-marshal.h.mingw"
95           tofile="${src}/helper/sp-marshal.h"/>
96     <copy file="${src}/helper/sp-marshal.cpp.mingw"
97           tofile="${src}/helper/sp-marshal.cpp"/>
98           
99     <makefile file="inkscape_version.h">
100         #define INKSCAPE_VERSION "${version}, revision ${svn.revision}"
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         /* Do we support SVG Fonts? */
175         #define ENABLE_SVG_FONTS              1
177         #endif /* _CONFIG_H_ */
178     </makefile>
179   </target>
183   <!--
184   ########################################################################
185   ## T A R G E T    :    T O U C H A B O U T
186   ########################################################################
187   -->
188   <target name="touchabout"
189       description="update the modification time of aboutbox.cpp">
190     <!-- not good <touch file="${src}/ui/dialog/aboutbox.cpp"/> -->
191     <!-- better -->
192     <delete file="${build}/obj/ui/dialog/aboutbox.o"/>
193     <delete file="inkscape_version.h"/>
194   </target>
197   <!--
198   ########################################################################
199   ## T A R G E T    :    C X X T E S T
200   ########################################################################
201   -->
202   <target name="cxxtest" depends="init"
203         description="generate test files" >
205     <!-- Generate CxxTest files -->
206     <cxxtestpart command="python ${cxxtest}/cxxtestgen.py --have-eh"
207                  out="${src}/test-src.cpp">
208         <fileset dir="${src}">
209             <include name="attributes-test.h"/>
210             <include name="color-profile-test.h"/>
211             <include name="dir-util-test.h"/>
212             <include name="extract-uri-test.h"/>
213             <include name="mod360-test.h"/>
214             <include name="round-test.h"/>
215             <include name="sp-gradient-test.h"/>
216             <include name="sp-style-elem-test.h"/>
217             <include name="syle-test.h"/>
218             <include name="test-helpers.h"/>
219             <include name="verbs-test.h"/>
220         </fileset>
221     </cxxtestpart>
222     <cxxtestpart command="python ${cxxtest}/cxxtestgen.py --have-eh"
223                  out="${src}/display/test-display.cpp">
224         <fileset dir="${src}/display">
225             <include name="bezier-utils-test.h"/>
226             <include name="curve-test.h"/>
227         </fileset>
228     </cxxtestpart>
229     <cxxtestpart command="python ${cxxtest}/cxxtestgen.py --have-eh"
230                  out="${src}/helper/test-helper.cpp">
231         <fileset dir="${src}/helper">
232             <include name="units-test.h"/>
233         </fileset>
234     </cxxtestpart>
235     <cxxtestpart command="python ${cxxtest}/cxxtestgen.py --have-eh"
236                  out="${src}/libnr/test-nr.cpp">
237         <fileset dir="${src}/libnr">
238             <include name="nr-compose-test.h"/>
239             <include name="nr-types-test.h"/>
240             <include name="nr-translate-test.h"/>
241             <include name="nr-rotate-test.h"/>
242             <include name="nr-scale-test.h"/>
243             <include name="nr-point-fns-test.h"/>
244             <include name="nr-rotate-fns-test.h"/>
245             <include name="in-svg-plane-test.h"/>
246             <include name="nr-matrix-test.h"/>
247         </fileset>
248     </cxxtestpart>
249     <cxxtestpart command="python ${cxxtest}/cxxtestgen.py --have-eh"
250                  out="${src}/svg/test-svg.cpp">
251         <fileset dir="${src}/svg">
252             <include name="css-ostringstream-test.h"/>
253             <include name="stringstream-test.h"/>
254             <include name="svg-affine-test.h"/>
255             <include name="svg-color-test.h"/>
256             <include name="svg-length-test.h"/>
257             <include name="svg-path-geom-test.h"/>
258         </fileset>
259     </cxxtestpart>
260     <cxxtestpart command="python ${cxxtest}/cxxtestgen.py --have-eh"
261                  out="${src}/util/test-util.cpp">
262         <fileset dir="${src}/util">
263             <include name="list-container-test.h"/>
264         </fileset>
265     </cxxtestpart>
266     <cxxtestpart command="python ${cxxtest}/cxxtestgen.py --have-eh"
267                  out="${src}/xml/test-xml.cpp">
268         <fileset dir="${src}/xml">
269             <include name="repr-action-test.h"/>
270             <include name="quote-test.h"/>
271         </fileset>
272     </cxxtestpart>
273     <cxxtestroot command="python ${cxxtest}/cxxtestgen.py" 
274                  out="${src}/test-main.cpp"
275                  template="${src}/selfname.tpl">
276         <fileset dir="${src}">
277             <include name="MultiPrinter.h"/>
278             <include name="PylogFormatter.h"/>
279             <include name="TRPIFormatter.h"/>
280         </fileset>
281     </cxxtestroot>
282   </target>
285   <!--
286   ########################################################################
287   ## T A R G E T    :    C O M P I L E
288   ########################################################################
289   -->
290   <target name="compile" depends="cxxtest"
291         description="compile the source to .o" >
293     <!-- Compile from source to build -->
294     <cc cc="${arch}gcc" cxx="${arch}g++"
295              destdir="${build}/obj"
296              continueOnError="true"
297              refreshCache="${refresh}">
298         <fileset dir="${src}">
299             <!-- THINGS TO EXCLUDE -->
300             <exclude name="2geom/chebyshev.cpp"/>
301             <exclude name="ast/.*"/>
302             <exclude name="bonobo/.*"/>
303             <exclude name="deptool.cpp"/>
304             <!--<exclude name="test-main.cpp"/>-->
305             <!--<exclude name="test-src.cpp"/>-->
306             <exclude name="display/test-display.cpp"/>
307             <exclude name="display/testnr.cpp"/>
308             <exclude name="display/bezier-utils-test.cpp"/>
309             <exclude name="dom/work/.*"/>
310             <exclude name="dom/odf/SvgOdg.cpp"/>
311             <exclude name="extension/api.cpp"/>
312             <exclude name="extension/dxf2svg/.*"/>
313             <exclude name="extension/implementation/plugin.cpp"/>
314             <exclude name="extension/script/bindtest.cpp"/>
315             <exclude name="extension/script/cpptest.cpp"/>
316             <exclude name="extension/plugin/.*"/>
317             <exclude name="extract-uri-test.cpp"/>
318             <exclude name="helper/units-test.cpp"/>
319             <!-- exclude name="inkview.cpp"/-->
320             <!--<exclude name="libnr/test-nr.cpp"/>-->
321             <exclude name="libnr/test-nr-main.cpp"/>
322             <exclude name="libnr/testnr.cpp"/>
323             <exclude name="libnr/in-svg-plane-test.cpp"/>
324             <exclude name="libnr/nr-matrix-test.cpp"/>
325             <exclude name="libnr/nr-point-fns-test.cpp"/>
326             <exclude name="libnr/nr-rotate-fns-test.cpp"/>
327             <exclude name="libnr/nr-rotate-test.cpp"/>
328             <exclude name="libnr/nr-scale-test.cpp"/>
329             <exclude name="libnr/nr-translate-test.cpp"/>
330             <exclude name="libnr/nr-types-test.cpp"/>
331             <exclude name="livarot/Path-test.cpp"/>
332             <exclude name="mod360-test.cpp"/>
333             <exclude name="trace/potrace/potest.cpp"/>
334             <exclude name="round-test.cpp"/>
335             <exclude name="sp-gradient-test.cpp"/>
336             <exclude name="style-test.cpp"/>
337             <exclude name="svg/ftos.cpp"/>
338             <!--<exclude name="svg/test-svg.cpp"/>-->
339             <exclude name="svg/test-svg-main.cpp"/>
340             <exclude name="svg/test-stubs.cpp"/>
341             <exclude name="utest/.*"/>
342             <exclude name="util/list-container-test.cpp"/>
343             <exclude name="widgets/test-widgets.cpp"/>
344             <exclude name="xml/quote-test.cpp"/>
345             <exclude name="xml/repr-action-test.cpp"/>
346             <exclude name="xml/test-xml.cpp"/>
347             <!--<exclude name="xml/test-xml-main.cpp"/>-->
348             <exclude name="io/streamtest.cpp"/>
349             <!--JABBER-->
350             <exclude name="pedro/pedrogui.cpp"/>
351             <exclude name="pedro/pedrogui.h"/>
352             <exclude name="pedro/work/.*"/>
353             <!--WHITEBOARD-->
354             <exclude name="ui/dialog/session-player.cpp"/>
355             <exclude name="ui/dialog/whiteboard-connect.cpp"/>
356             <exclude name="ui/dialog/whiteboard-sharewithchat.cpp"/>
357             <exclude name="ui/dialog/whiteboard-sharewithuser.cpp"/>
358             <exclude name="dialogs/whiteboard-connect-dialog.cpp"/>
359             <exclude name="dialogs/whiteboard-common-dialog.cpp"/>
360             <exclude name="dialogs/whiteboard-sharewithchat-dialog.cpp"/>
361             <exclude name="dialogs/whiteboard-sharewithuser-dialog.cpp"/>
362             <exclude name="jabber_whiteboard/node-tracker.cpp"/>
363             <exclude name="jabber_whiteboard/node-utilities.cpp"/>
364             <!--OVERLAP-->
365             <exclude name="removeoverlap/placement_SolveVPSC.cpp"/>
366             <exclude name="removeoverlap/placement_SolveVPSC.h"/>
367             <exclude name="removeoverlap/test.cpp"/>
368             <exclude name="removeoverlap/remove_rectangle_overlap-test.cpp"/>
369             <exclude name="removeoverlap/remove_rectangle_overlap-test.h"/>
370         </fileset>
371         <excludeinc dir="${src}">
372             <file name="extension/param"/>
373         </excludeinc>
374         <flags>
375             -Wall -Wformat -Werror=format-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch
376             -O2
377             -mms-bitfields
378         </flags>
379         <defines>
380             -DVERSION=\"${version}\"
381             -DHAVE_CONFIG_H
382             -D_INTL_REDIRECT_INLINE
383             -DHAVE_SSL
384             -DRELAYTOOL_SSL="static const int libssl_is_present=1; static int __attribute__((unused)) libssl_symbol_is_present(char *s){ return 1; }" <!-- inkboard -->
385             -DPOPPLER_NEW_GFXFONT <!-- poppler changed the api for 0.8.3 -->
386         </defines>
387         <includes>
388             -I${devlibs}/include
389             <!-- GTK / GTKMM -->
390             ${pcc.gtkmm-2.4}
391             <!-- OTHER -->
392             -I${devlibs}/include/libxml2 
393             ${pcc.freetype2}
394             ${pcc.cairo}
395             ${pcc.poppler}
396             -I${devlibs}/include/gc
397             ${pcc.libwpg-0.1} ${pcc.libwpg-stream-0.1}
398             -I${cxxtest}
399             <!-- PERL -->
400             <!-- -Wno-comment -I${devlibs}/perl/lib/CORE -->
401             <!-- PYTHON -->
402             -I${devlibs}/python/include
403             <!-- JAVA -->
404             -I${src}/bind/javainc -I${src}/bind/javainc/win32
405         </includes>
406     </cc>
407   </target>
408   
410   <!--
411   ########################################################################
412   ## T A R G E T    :    L I B
413   ########################################################################
414   -->
415   <target name="lib" depends="compile"
416       description="create a static library">
417     <staticlib command="${archutil}ar crsv"
418            file="${build}/libinkscape.a">
419        <fileset dir="${build}/obj">
420            <exclude name="main.o"/>
421            <exclude name="winmain.o"/>
422            <exclude name="inkview.o"/>
423            <!-- CxxTest -->
424            <exclude name="test-main.o"/>
425            <exclude name="test-src.o"/>
426            <exclude name="display/test-display.o"/>
427            <exclude name="helper/test-helper.o"/>
428            <exclude name="libnr/nr-compose-reference.o"/>
429            <exclude name="libnr/test-nr.o"/>
430            <exclude name="svg/test-svg.o"/>
431            <exclude name="util/test-util.o"/>
432            <exclude name="xml/test-xml.o"/>
433        </fileset>
434     </staticlib>
435   </target>
439   <!--
440   ########################################################################
441   ## T A R G E T    :    I 1 8 N
442   ########################################################################
443   -->
444   <target name="i18n" depends="compile"
445       description="compile gettext .po files to .mo">
447     <msgfmt todir="${build}/locale" owndir="true"
448          out="LC_MESSAGES/inkscape.mo">
449        <fileset dir="po">
450        </fileset>
451     </msgfmt>
452   </target>
458   <!--
459   ########################################################################
460   ## T A R G E T    :    L I N K
461   ########################################################################
462   -->
463   <target name="link" depends="lib"
464       description="link objects and library to create executable">
466     <rc command="${archutil}windres" 
467         file="${src}/inkscape.rc"
468         out="${build}/inkres.o">
469         <flags>
470         --include-dir=${src}
471         </flags>
472     </rc>
473     <link command="${arch}g++" out="${build}/inkscape.exe"
474               strip="true" symfile="${build}/inkscape.dbg"
475               stripcommand="${archutil}strip"
476               objcopycommand="${archutil}objcopy">
477        <flags>
478            -mwindows
479        </flags>
480        <fileset dir="${build}">
481            <include name="inkres.o"/>
482            <include name="obj/main.o"/>
483            <include name="obj/winmain.o"/>
484            <include name="libinkscape.a"/>
485        </fileset>
486        <!-- WARNING: If you change these libraries, don't forget to change them for inkview and cxxtests below as well! -->
487        <libs>
488            -L${devlibs}/lib
489            ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler} 
490            ${pcl.gtkmm-2.4}  ${pcl.pangoft2} ${pcl.gthread-2.0}
491            ${devlibs}/bin/libxml2.dll
492            ${devlibs}/bin/libxslt.dll
493            ${pcl.cairo} ${pcl.cairomm-1.0}
494            ${pcl.libwpg-0.1} ${pcl.libwpg-stream-0.1}
495            ${devlibs}/lib/iconv.lib
496            ${pcl.ImageMagick++}
497            ${pcl.fontconfig} ${pcl.freetype2}
498            -lssl -lcrypto
499            ${pcl.lcms}
500            ${pcl.gsl}
501            -lpng -ljpeg.dll -ltiff.dll -lpopt ${devlibs}/lib/zdll.lib
502            -lgc
503            -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
504        </libs>
505     </link>
506   </target>
507   
512   <!--
513   ########################################################################
514   ## T A R G E T    :    L I N K I N K V I E W
515   ########################################################################
516   -->
517   <target name="linkinkview" depends="lib"
518         description="link objects and library to create Inkview executable">
520     <rc command="${archutil}windres" 
521         file="${src}/inkview.rc"
522         out="${build}/inkviewres.o">
523         <flags>
524         --include-dir=${src}
525         </flags>
526     </rc>
527     <link command="${arch}g++" out="${build}/inkview.exe"
528               strip="true" symfile="${build}/inkview.dbg"
529               stripcommand="${archutil}strip"
530               objcopycommand="${archutil}objcopy">
531        <flags>
532            -mwindows
533        </flags>
534        <fileset dir="${build}">
535            <include name="inkviewres.o"/>
536            <include name="obj/inkview.o"/>
537            <include name="libinkscape.a"/>
538        </fileset>
539        <libs>
540            -L${devlibs}/lib
541            ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler} 
542            ${pcl.gtkmm-2.4}  ${pcl.pangoft2} ${pcl.gthread-2.0}
543            ${devlibs}/bin/libxml2.dll
544            ${devlibs}/bin/libxslt.dll
545            ${pcl.cairo} ${pcl.cairomm-1.0}
546            ${pcl.libwpg-0.1} ${pcl.libwpg-stream-0.1}
547            ${devlibs}/lib/iconv.lib
548            ${pcl.ImageMagick++}
549            ${pcl.fontconfig} ${pcl.freetype2}
550            -lssl -lcrypto
551            ${pcl.lcms}
552            ${pcl.gsl}
553            -lpng -ljpeg.dll -ltiff.dll -lpopt ${devlibs}/lib/zdll.lib
554            -lgc
555            -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
556        </libs>
557     </link>
558   </target>
562   <!--
563   ########################################################################
564   ## T A R G E T    :    L I N K C X X T E S T S
565   ########################################################################
566   -->
567   <target name="linkcxxtests" depends="lib"
568       description="link objects and library to create executable">
570     <link command="${arch}g++" out="${build}/cxxtests.exe"
571               strip="true" symfile="${build}/cxxtests.dbg"
572               stripcommand="${archutil}strip"
573               objcopycommand="${archutil}objcopy">
574        <flags>
575        </flags>
576        <fileset dir="${build}">
577            <include name="obj/test-main.o"/>
578            <include name="obj/test-src.o"/>
579            <include name="obj/display/test-display.o"/>
580            <include name="obj/helper/test-helper.o"/>
581            <include name="obj/libnr/nr-compose-reference.o"/>
582            <include name="obj/libnr/test-nr.o"/>
583            <include name="obj/svg/test-svg.o"/>
584            <include name="obj/util/test-util.o"/>
585            <include name="obj/xml/test-xml.o"/>
586            <include name="libinkscape.a"/>
587        </fileset>
588        <libs>
589            -L${devlibs}/lib
590            ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler} 
591            ${pcl.gtkmm-2.4}  ${pcl.pangoft2} ${pcl.gthread-2.0}
592            ${devlibs}/bin/libxml2.dll
593            ${devlibs}/bin/libxslt.dll
594            ${pcl.cairo} ${pcl.cairomm-1.0}
595            ${pcl.libwpg-0.1} ${pcl.libwpg-stream-0.1}
596            ${devlibs}/lib/iconv.lib
597            ${pcl.ImageMagick++}
598            ${pcl.fontconfig} ${pcl.freetype2}
599            -lssl -lcrypto
600            ${pcl.lcms}
601            ${pcl.gsl}
602            -lpng -ljpeg.dll -ltiff.dll -lpopt ${devlibs}/lib/zdll.lib
603            -lgc
604            -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
605        </libs>
606     </link>
607   </target>
610   <!--
611   ########################################################################
612   ## T A R G E T    :    D I S T B A S E
613   ########################################################################
614   -->
615   <target name="distbase" depends="i18n"
616       description="generate the distribution directory with all needed files">
618     <!-- Create the distribution directory -->
619     <copy todir="${dist}" file="AUTHORS"/>
620     <copy todir="${dist}" file="COPYING"/>
621     <copy todir="${dist}" file="COPYING.LIB"/>
622     <copy todir="${dist}" file="NEWS"/>
623     <copy todir="${dist}" file="README"/>
624     <copy todir="${dist}" file="TRANSLATORS"/>
625     <copy todir="${dist}" file="${devlibs}/bin/libatkmm-1.6-1.dll"/>
626     <copy todir="${dist}" file="${devlibs}/bin/libglibmm-2.4-1.dll"/>
627     <copy todir="${dist}" file="${devlibs}/bin/libgtkmm-2.4-1.dll"/>
628     <copy todir="${dist}" file="${devlibs}/bin/libgdkmm-2.4-1.dll"/>
629     <copy todir="${dist}" file="${devlibs}/bin/libpangomm-1.4-1.dll"/>
630     <copy todir="${dist}" file="${devlibs}/bin/libcairomm-1.0-1.dll"/>
631     <copy todir="${dist}" file="${devlibs}/bin/libsigc-2.0-0.dll"/>
632     <copy todir="${dist}" file="${devlibs}/bin/freetype6.dll"/>
633     <copy todir="${dist}" file="${devlibs}/bin/libatk-1.0-0.dll"/>
634     <copy todir="${dist}" file="${devlibs}/bin/libgdk-win32-2.0-0.dll"/>
635     <copy todir="${dist}" file="${devlibs}/bin/libgdk_pixbuf-2.0-0.dll"/>
636     <copy todir="${dist}" file="${devlibs}/bin/libglib-2.0-0.dll"/>
637     <copy todir="${dist}" file="${devlibs}/bin/libgmodule-2.0-0.dll"/>
638     <copy todir="${dist}" file="${devlibs}/bin/libgobject-2.0-0.dll"/>
639     <copy todir="${dist}" file="${devlibs}/bin/libgtk-win32-2.0-0.dll"/>
640     <copy todir="${dist}" file="${devlibs}/bin/libgthread-2.0-0.dll"/>
641     <copy todir="${dist}" file="${devlibs}/bin/libgio-2.0-0.dll"/>
642     <copy todir="${dist}" file="${devlibs}/bin/libcairo-2.dll"/>
643     <copy todir="${dist}" file="${devlibs}/bin/libpoppler-3.dll"/>
644     <copy todir="${dist}" file="${devlibs}/bin/libpangocairo-1.0-0.dll"/>
645     <copy todir="${dist}" file="${devlibs}/bin/libpango-1.0-0.dll"/>
646     <copy todir="${dist}" file="${devlibs}/bin/libpangoft2-1.0-0.dll"/>
647     <copy todir="${dist}" file="${devlibs}/bin/libpangowin32-1.0-0.dll"/>
648     <copy todir="${dist}" file="${devlibs}/bin/freetype6.dll"/>
649     <copy todir="${dist}" file="${devlibs}/bin/libfontconfig-1.dll"/>
650     <copy todir="${dist}" file="${devlibs}/bin/libxml2.dll"/>
651     <copy todir="${dist}" file="${devlibs}/bin/libxslt.dll"/>
652     <copy todir="${dist}" file="${devlibs}/bin/libexpat.dll"/>
653     <!--<copy file="${devlibs}/bin/libexpat.dll" tofile="${dist}/xmlparse.dll"/>-->
654     <copy todir="${dist}" file="${devlibs}/bin/libwpg-0.1.dll"/>
655     <copy todir="${dist}" file="${devlibs}/bin/libwpg-stream-0.1.dll"/>
656     <copy todir="${dist}" file="${devlibs}/bin/libwpd-0.8.dll"/>
657     <copy todir="${dist}" file="${devlibs}/bin/libwpd-stream-0.8.dll"/>
658     <copy todir="${dist}" file="${devlibs}/bin/jpeg62.dll"/>
659     <copy todir="${dist}" file="${devlibs}/bin/libpng13.dll"/>
660     <!-- GTK changed their dep file name for PNG!   :-(  -->
661     <copy todir="${dist}" file="${devlibs}/bin/libpng12-0.dll"/>
662     <copy todir="${dist}" file="${devlibs}/bin/libtiff3.dll"/>
663     <copy todir="${dist}" file="${devlibs}/bin/msvcr70.dll"/>
664     <copy todir="${dist}" file="${devlibs}/bin/msvcr71.dll"/>
665     <copy todir="${dist}" file="${devlibs}/bin/zlib1.dll"/>
666     <copy todir="${dist}" file="${devlibs}/bin/iconv.dll"/>
667     <copy todir="${dist}" file="${devlibs}/bin/libpopt-0.dll"/>
668     <copy todir="${dist}" file="${devlibs}/bin/liblcms-1.dll"/>
669     <copy todir="${dist}" file="${devlibs}/bin/intl.dll"/>
670     <copy file="${devlibs}/bin/intl.dll" tofile="${dist}/libintl-2.dll"/>
672     <!-- MSGFMT files -->
673     <copy todir="${dist}">
674         <fileset dir="${build}/locale">
675           <exclude name=".*\.am"/>
676         </fileset>
677     </copy>
679     <mkdir dir="${dist}/data"/>
680     <mkdir dir="${dist}/locale"/>
681     <mkdir dir="${dist}/modules"/>
682     <mkdir dir="${dist}/plugins"/>
684     <!-- GTK -->
685     <copy todir="${dist}">     <fileset dir="${devlibs}/etc"/> </copy>
686     <copy todir="${dist}/lib"> <fileset dir="${devlibs}/lib/gtk-2.0"/> </copy>
687     <copy todir="${dist}/lib"> <fileset dir="${devlibs}/lib/glib-2.0"/> </copy>
688     <copy todir="${dist}">
689         <fileset dir="share">
690           <exclude name=".*\.am"/>
691         </fileset>
692     </copy>
693     <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/locale"/> </copy>
694     <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/themes"/> </copy>
695     <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/poppler"/> </copy>
696     <copy todir="${dist}" file="${devlibs}/bin/gdb.exe"/>
698     <!-- Necessary to run extensions on windows if it is not in the path -->
699     <copy todir="${dist}" file="${devlibs}/bin/gspawn-win32-helper.exe"/>
700     <copy todir="${dist}" file="${devlibs}/bin/gspawn-win32-helper-console.exe"/>
702     <!-- PERL -->
703     <copy todir="${dist}" file="${devlibs}/perl/bin/perl58.dll"/>
705     <!-- PYTHON -->
706     <copy todir="${dist}" file="${devlibs}/python/python25.dll"/>
707     <copy todir="${dist}/python" file="${devlibs}/python/python.exe" />
708     <copy todir="${dist}/python" file="${devlibs}/python/pythonw.exe"/>
709     <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/Lib"/> </copy>
710     <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/DLLs"/> </copy>
711     <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/Scripts"/> </copy>
713     <!--<copy file="${devlibs}/share/themes/MS-Windows/gtk-2.0/gtkrc" todir="${dist}/etc/gtk-2.0"/>-->
714     <makefile file="${dist}/etc/gtk-2.0/gtkrc">
715     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"
716     gtk-toolbar-icon-size = small-toolbar
718     # disable images in buttons. i've only seen ugly delphi apps use this feature.
719     gtk-button-images = 0
720     
721     # disable the annoying beep in editable controls
722     gtk-error-bell = 0
724     # enable/disable images in menus. most "stock" microsoft apps don't use these, except sparingly.
725     # the office apps use them heavily, though.
726     gtk-menu-images = 1
728     # use the win32 button ordering instead of the GNOME HIG one, where applicable
729     gtk-alternative-button-order = 1
731     style "msw-default"
732     {
733       GtkWidget::interior-focus = 1
734       GtkOptionMenu::indicator-size = { 9, 5 }
735       GtkOptionMenu::indicator-spacing = { 7, 5, 2, 2 }
736       GtkSpinButton::shadow-type = in
738       # Owen and I disagree that these should be themable
739       #GtkUIManager::add-tearoffs = 0
740       #GtkComboBox::add-tearoffs = 0
742       GtkComboBox::appears-as-list = 1
743       GtkComboBox::focus-on-click = 0
745       GOComboBox::add_tearoffs = 0
747       GtkTreeView::allow-rules = 0
748       GtkTreeView::expander-size = 12
750       GtkExpander::expander-size = 12
752       GtkScrolledWindow::scrollbar_spacing = 1
754       GtkSeparatorMenuItem::horizontal-padding = 2
756       engine "wimp"
757       {
758       }
759     }
760     class "*" style "msw-default"
761     </makefile>
763   </target>
766   <!--
767   ########################################################################
768   ## T A R G E T    :    D I S T - I N K S C A P E
769   ########################################################################
770   -->
771   <target name="dist-inkscape" depends="link,distbase"
772       description="copy inkscape to the distribution directory">
774     <!-- Create the distribution directory -->
775     <copy todir="${dist}" file="${build}/inkscape.exe"/>
776     <copy todir="${dist}" file="${build}/inkscape.dbg"/>
777   </target>
780   <!--
781   ########################################################################
782   ## T A R G E T    :    D I S T - I N K V I E W
783   ########################################################################
784   -->
785   <target name="dist-inkview" depends="linkinkview,distbase"
786       description="copy inkview to the distribution directory">
788     <!-- Create the distribution directory -->
789     <copy todir="${dist}" file="${build}/inkview.exe"/>
790     <copy todir="${dist}" file="${build}/inkview.dbg"/>
791   </target>
794   <!--
795   ########################################################################
796   ## T A R G E T    :    C H E C K
797   ########################################################################
798   -->
799   <target name="check" depends="linkcxxtests,distbase"
800       description="perform unit tests">
801     <cxxtestrun command="${build}/cxxtests" workingdir="${dist}" />
802   </target>
805   <!--
806   ########################################################################
807   ## T A R G E T    :    JAVAC
808   ########################################################################
809   -->
810   <target name="javac" depends="init"
811       description="compile java binding classes">
812     <javac srcdir="${src}/bind/java" destdir="${build}/java/classes"/>
813   </target>
816   <!--
817   ########################################################################
818   ## T A R G E T    :    JAR
819   ########################################################################
820   -->
821   <target name="jar" depends="javac"
822       description="pack java classes and resources into a jar file">
823     <copy todir="${build}/java/classes"> <fileset dir="${devlibs}/bind/data"/> </copy>
824     <jar basedir="${build}/java/classes" destfile="${build}/java/lib/inkscape.jar"/>
825   </target>
827   <!--
828   ########################################################################
829   ## T A R G E T    :    BINDDIST
830   ########################################################################
831   -->
832   <target name="binddist" depends="jar"
833       description="pack java classes and resources into a jar file">
834     <copy todir="${dist}/share/bind"> <fileset dir="${devlibs}/bind/java"/> </copy>
835     <copy todir="${dist}/share/bind/java"> <fileset dir="${build}/java/lib"/> </copy>
837   </target>
839   <!--
840   ########################################################################
841   ## T A R G E T    :    BINDCLEAN
842   ########################################################################
843   -->
844   <target name="bindclean" depends=""
845       description="clean up java binding classes">
846         <delete dir="${build}/java"/>
847   </target>
852   <!--
853   ########################################################################
854   ## T A R G E T    :    D I S T - A L L
855   ########################################################################
856   -->
857   <target name="dist-all" depends="dist-inkscape,dist-inkview"
858         description="generate the distribution, along with inkview" >
859   </target>
864   <!--
865   ########################################################################
866   ## T A R G E T    :    D I S T - A L L - C H E C K
867   ########################################################################
868   -->
869   <target name="dist-all-check" depends="dist-all,check"
870         description="generate the distribution, along with inkview and run cxxtests" >
871   </target>
877   <!--
878   ########################################################################
879   ## T A R G E T    :    C L E A N
880   ########################################################################
881   -->
882   <target name="clean" depends="bindclean"
883         description="clean up.  deleting build and distro dirs" >
885     <delete dir="${build}"/>
886     <delete dir="${dist}"/>
887     <delete file="build.dep"/>
888     <delete file="config.h"/>
889     <delete file="inkscape_version.h"/>
891     <delete file="${src}/test-main.cpp"/>
892     <delete file="${src}/test-src.cpp"/>
893     <delete file="${src}/display/test-display.cpp"/>
894     <delete file="${src}/helper/test-helper.cpp"/>
895     <delete file="${src}/libnr/test-nr.cpp"/>
896     <delete file="${src}/svg/test-svg.cpp"/>
897     <delete file="${src}/util/test-util.cpp"/>
898     <delete file="${src}/xml/test-xml.cpp"/>
900   </target>
904 </project>
905 <!--
906 ########################################################################
907 ## E N D
908 ########################################################################
909 -->