Code

Filters. Custom predefined filters update and new ABC filters.
[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-all" 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-all'.  You can execute other
40         targets instead, by "btool {target}",  like  "btool compile", if
41         you want to save time, or "dist-inkscape" if you don't want inkview.
42     </description>
44   <!-- set global properties for this build -->
45   <property name="version"       value="0.48+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="mingw"         location="${env.MINGW_PATH}"/>
57   <property name="mingw_bin"     location="${env.MINGW_PATH}/bin"/>
58   <property name="cxxtest"       location="cxxtest"/>
59   <property name="python"        location="${devlibs}/python/python.exe"/>
60   <!-- -->
62   <!-- Use these settings for the cross compiler -->  
63   <!--
64   <property name="arch"          value="i686-pc-mingw32-"/>
65   <property name="archutil"      value="${arch}"/>
66   <property name="devlibs"       location="/target"/>
67   <property name="mingw_bin"     location="${env.MINGW_BIN}"/>
68   <property name="cxxtest"       location="cxxtest"/>
69   <property name="python"        location="python"/>
70   -->
72   <!-- Extra properties -->  
73   <property name="refresh"       value="false"/>
75   <!--
76     This is for package-config.  With these two settings, pkg-config
77     queries can be as simple as ${pcc.packageName} for cflags, and
78     ${pcl.packageName} for libs.  Dependencies are calculated automatically.
79   -->
80   <property name="pkg-config-path"   location="${devlibs}/lib/pkgconfig"/>
81   <property name="pkg-config-prefix" location="${devlibs}"/>
84   <!--
85   ########################################################################
86   ## T A R G E T    :    I N I T
87   ########################################################################
88   -->
89   <target name="init"
90       description=
91       "Do all preparatory tasks, like make directories and copy files">
94     <mkdir dir="${build}"/>
95     <mkdir dir="${build}/java"/>
96     <mkdir dir="${build}/java/classes"/>
97     <mkdir dir="${build}/java/lib"/>
98     <mkdir dir="${dist}"/>
99     
100     <copy file="${src}/helper/sp-marshal.h.mingw"
101           tofile="${src}/helper/sp-marshal.h"/>
102     <copy file="${src}/helper/sp-marshal.cpp.mingw"
103           tofile="${src}/helper/sp-marshal.cpp"/>
104           
105     <!--makefile file="${src}/inkscape-version.cpp">
106         namespace Inkscape {
107             char const *version_string = "${version}";
108         }
109     </makefile-->
110     <makefile file="${src}/inkscape-version.cpp">
111         namespace Inkscape {
112             char const *version_string = "${version} ${bzr.revision}";
113         }
114     </makefile>
115     <makefile file="config.h">
116         #ifndef _CONFIG_H_
117         #define _CONFIG_H_
119         #ifndef WIN32
120         #define WIN32
121         #endif
123         /*######################################
124         ## This is for require-config.h, whose
125         ## purpose I cannot fathom.
126         ######################################*/
127         
128         #define PACKAGE_TARNAME
130         /*######################################
131         #### RESOURCE DIRECTORIES
132         ######################################*/
134         #define INKSCAPE_DATADIR       "."
135         #define PACKAGE_LOCALE_DIR     "locale"
138         /*######################################
139         #### OTHER DEFINITIONS
140         ######################################*/
142         #define GETTEXT_PACKAGE "inkscape"
144         #define PACKAGE_STRING                VERSION
146         #define HAVE_GETOPT_H                 1
147         #define HAVE_STRING_H                 1
148         #define HAVE_LIBINTL_H                1
149         #define HAVE_MALLOC_H                 1
150         #define HAVE_STDLIB_H                 1
151         #define HAVE_SYS_STAT_H               1
152         #define HAVE_INTTYPES_H               1
153         #define HAVE_OPENMP                   1
154                 #define HAVE_TR1_UNORDERED_SET        1
156         #define ENABLE_LCMS                   1
158         #define ENABLE_NLS                    1
159         #define HAVE_BIND_TEXTDOMAIN_CODESET  1
161         /* keep binreloc off */
162         #define BR_PTHREADS 0
163         #undef ENABLE_BINRELOC
165         /* CairoPDF options */
166         #define HAVE_CAIRO_PDF                1
167         #define PANGO_ENABLE_ENGINE           1
168         #define RENDER_WITH_PANGO_CAIRO       1
170         #define HAVE_GTK_WINDOW_FULLSCREEN    1
171         
172         /* internal interpreter */
173         #define WITH_PYTHON                   1
175         /* shared whiteboard */
176         #undef WITH_INKBOARD
177         #undef HAVE_SSL
178         
179         /* use poppler for pdf import? */
180         #define HAVE_POPPLER                  1
181         #define HAVE_POPPLER_CAIRO            1
183         /* do we want bitmap manipulation? */
184         #define WITH_IMAGE_MAGICK             1
186         /* Allow reading WordPerfect? */
187         #define WITH_LIBWPG                   1
189         /* Do we support SVG Fonts? */
190         #define ENABLE_SVG_FONTS              1
192         /* Do we want experimental, unsupported, unguaranteed, etc., LivePathEffects enabled? */
193         //#define LPE_ENABLE_TEST_EFFECTS    1
195         #define HAVE_ASPELL                   1
197         #endif /* _CONFIG_H_ */
198     </makefile>
199   </target>
201   <!--
202   ########################################################################
203   ## T A R G E T    :    C X X T E S T
204   ########################################################################
205   -->
206   <target name="cxxtest" depends="init"
207         description="generate test files" >
209     <!-- Generate CxxTest files -->
210     <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
211                  out="${src}/test-src.cpp">
212         <fileset dir="${src}">
213             <include name="attributes-test.h"/>
214             <include name="color-profile-test.h"/>
215             <include name="dir-util-test.h"/>
216             <include name="extract-uri-test.h"/>
217             <include name="marker-test.h"/>
218             <include name="mod360-test.h"/>
219             <include name="preferences-test.h"/>
220             <include name="round-test.h"/>
221             <include name="sp-gradient-test.h"/>
222             <include name="sp-style-elem-test.h"/>
223             <include name="syle-test.h"/>
224             <include name="test-helpers.h"/>
225             <include name="verbs-test.h"/>
226         </fileset>
227     </cxxtestpart>
228     <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
229                  out="${src}/display/test-display.cpp">
230         <fileset dir="${src}/display">
231             <include name="curve-test.h"/>
232         </fileset>
233     </cxxtestpart>
234     <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
235                  out="${src}/helper/test-helper.cpp">
236         <fileset dir="${src}/helper">
237             <include name="units-test.h"/>
238         </fileset>
239     </cxxtestpart>
240     <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
241                  out="${src}/libnr/test-nr.cpp">
242         <fileset dir="${src}/libnr">
243             <include name="nr-compose-test.h"/>
244             <include name="nr-types-test.h"/>
245             <include name="nr-translate-test.h"/>
246             <include name="nr-rotate-test.h"/>
247             <include name="nr-scale-test.h"/>
248             <include name="nr-point-fns-test.h"/>
249             <include name="nr-rotate-fns-test.h"/>
250             <include name="in-svg-plane-test.h"/>
251             <include name="nr-matrix-test.h"/>
252         </fileset>
253     </cxxtestpart>
254     <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
255                  out="${src}/svg/test-svg.cpp">
256         <fileset dir="${src}/svg">
257             <include name="css-ostringstream-test.h"/>
258             <include name="stringstream-test.h"/>
259             <include name="svg-affine-test.h"/>
260             <include name="svg-color-test.h"/>
261             <include name="svg-length-test.h"/>
262             <include name="svg-path-geom-test.h"/>
263         </fileset>
264     </cxxtestpart>
265     <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
266                  out="${src}/util/test-util.cpp">
267         <fileset dir="${src}/util">
268             <include name="list-container-test.h"/>
269         </fileset>
270     </cxxtestpart>
271     <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
272                  out="${src}/xml/test-xml.cpp">
273         <fileset dir="${src}/xml">
274             <include name="repr-action-test.h"/>
275             <include name="quote-test.h"/>
276         </fileset>
277     </cxxtestpart>
278     <cxxtestroot command="${python} ${cxxtest}/cxxtestgen.py" 
279                  out="${src}/test-main.cpp"
280                  template="${src}/cxxtest-template.tpl">
281         <fileset dir="${src}">
282             <include name="MultiPrinter.h"/>
283             <include name="PylogFormatter.h"/>
284             <include name="TRPIFormatter.h"/>
285         </fileset>
286     </cxxtestroot>
287   </target>
290   <!--
291   ########################################################################
292   ## T A R G E T    :    C O M P I L E
293   ########################################################################
294   -->
295   <target name="compile" depends="cxxtest"
296         description="compile the source to .o" >
298     <!-- Compile from source to build -->
299     <cc cc="${arch}gcc" cxx="${arch}g++"
300              destdir="${build}/obj"
301              continueOnError="true"
302              refreshCache="${refresh}">
303         <fileset dir="${src}">
304             <!-- THINGS TO EXCLUDE -->
305             <exclude name="2geom/chebyshev.cpp"/>
306             <exclude name="ast/.*"/>
307             <exclude name="bonobo/.*"/>
308             <exclude name="deptool.cpp"/>
309             <exclude name="cxxtests.cpp"/>
310             <!--<exclude name="test-main.cpp"/>-->
311             <!--<exclude name="test-src.cpp"/>-->
312             <exclude name="display/test-display.cpp"/>
313             <exclude name="display/testnr.cpp"/>
314             <exclude name="dom/work/.*"/>
315             <exclude name="dom/odf/SvgOdg.cpp"/>
316             <exclude name="extension/api.cpp"/>
317             <exclude name="extension/dbus/.*"/>
318             <exclude name="extension/dxf2svg/.*"/>
319             <exclude name="extension/implementation/plugin.cpp"/>
320             <exclude name="extension/script/bindtest.cpp"/>
321             <exclude name="extension/script/cpptest.cpp"/>
322             <exclude name="extension/plugin/.*"/>
323             <exclude name="extract-uri-test.cpp"/>
324             <exclude name="helper/units-test.cpp"/>
325             <!-- exclude name="inkview.cpp"/-->
326             <!--<exclude name="libnr/test-nr.cpp"/>-->
327             <exclude name="libnr/test-nr-main.cpp"/>
328             <exclude name="libnr/testnr.cpp"/>
329             <exclude name="libnr/in-svg-plane-test.cpp"/>
330             <exclude name="libnr/nr-matrix-test.cpp"/>
331             <exclude name="libnr/nr-point-fns-test.cpp"/>
332             <exclude name="libnr/nr-rotate-fns-test.cpp"/>
333             <exclude name="libnr/nr-rotate-test.cpp"/>
334             <exclude name="libnr/nr-scale-test.cpp"/>
335             <exclude name="libnr/nr-translate-test.cpp"/>
336             <exclude name="libnr/nr-types-test.cpp"/>
337             <exclude name="livarot/Path-test.cpp"/>
338             <exclude name="mod360-test.cpp"/>
339             <exclude name="trace/potrace/potest.cpp"/>
340             <exclude name="round-test.cpp"/>
341             <exclude name="sp-gradient-test.cpp"/>
342             <exclude name="style-test.cpp"/>
343             <exclude name="svg/ftos.cpp"/>
344             <!--<exclude name="svg/test-svg.cpp"/>-->
345             <exclude name="svg/test-svg-main.cpp"/>
346             <exclude name="util/list-container-test.cpp"/>
347             <exclude name="widgets/test-widgets.cpp"/>
348             <exclude name="xml/quote-test.cpp"/>
349             <exclude name="xml/repr-action-test.cpp"/>
350             <exclude name="xml/test-xml.cpp"/>
351             <!--<exclude name="xml/test-xml-main.cpp"/>-->
352             <exclude name="io/streamtest.cpp"/>
353             <!--JABBER-->
354             <exclude name="pedro/pedrogui.cpp"/>
355             <exclude name="pedro/pedrogui.h"/>
356             <exclude name="pedro/work/.*"/>
357             <!--WHITEBOARD-->
358             <exclude name="ui/dialog/session-player.cpp"/>
359             <exclude name="ui/dialog/whiteboard-connect.cpp"/>
360             <exclude name="ui/dialog/whiteboard-sharewithchat.cpp"/>
361             <exclude name="ui/dialog/whiteboard-sharewithuser.cpp"/>
362             <exclude name="dialogs/whiteboard-connect-dialog.cpp"/>
363             <exclude name="dialogs/whiteboard-common-dialog.cpp"/>
364             <exclude name="dialogs/whiteboard-sharewithchat-dialog.cpp"/>
365             <exclude name="dialogs/whiteboard-sharewithuser-dialog.cpp"/>
366             <exclude name="jabber_whiteboard/node-tracker.cpp"/>
367             <exclude name="jabber_whiteboard/node-utilities.cpp"/>
368             <!--OVERLAP-->
369             <exclude name="removeoverlap/placement_SolveVPSC.cpp"/>
370             <exclude name="removeoverlap/placement_SolveVPSC.h"/>
371             <exclude name="removeoverlap/test.cpp"/>
372             <exclude name="removeoverlap/remove_rectangle_overlap-test.cpp"/>
373             <exclude name="removeoverlap/remove_rectangle_overlap-test.h"/>
374         </fileset>
375         <excludeinc dir="${src}">
376             <file name="extension/param"/>
377         </excludeinc>
378         <flags>
379             -Wall -Wformat -Werror=format-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch
380             -O2
381             -mms-bitfields
382             -fopenmp
383         </flags>
384         <defines>
385             -DVERSION=\"${version}\"
386             -DHAVE_CONFIG_H
387             -D_INTL_REDIRECT_INLINE
388             -DHAVE_SSL
389             -DRELAYTOOL_SSL="static const int libssl_is_present=1; static int __attribute__((unused)) libssl_symbol_is_present(char *s){ return 1; }" <!-- inkboard -->
390             -DPOPPLER_NEW_GFXFONT <!-- poppler changed the api for 0.8.3 -->
391         </defines>
392         <includes>
393             -I${devlibs}/include
394             <!-- GTK / GTKMM -->
395             ${pcc.gtkmm-2.4}
396             <!-- OTHER -->
397                         ${pcc.Magick++}
398                         ${pcc.libxml-2.0}
399             ${pcc.freetype2}
400             ${pcc.cairo}
401             ${pcc.poppler}
402             -I${devlibs}/include/gc
403             ${pcc.libwpg-0.1} ${pcc.libwpg-stream-0.1}
404             -I${cxxtest}
405             <!-- PERL -->
406             <!-- -Wno-comment -I${devlibs}/perl/lib/CORE -->
407             <!-- PYTHON -->
408             -I${devlibs}/python/include
409             <!-- JAVA -->
410             -I${src}/bind/javainc -I${src}/bind/javainc/win32
411         </includes>
412     </cc>
413   </target>
414   
416   <!--
417   ########################################################################
418   ## T A R G E T    :    L I B
419   ########################################################################
420   -->
421   <target name="lib" depends="compile"
422       description="create a static library">
423     <staticlib command="${archutil}ar crsv"
424            file="${build}/libinkscape.a">
425        <fileset dir="${build}/obj">
426            <exclude name="main.o"/>
427            <exclude name="winmain.o"/>
428            <exclude name="inkview.o"/>
429            <!-- CxxTest -->
430            <exclude name="test-main.o"/>
431            <exclude name="test-src.o"/>
432            <exclude name="display/test-display.o"/>
433            <exclude name="helper/test-helper.o"/>
434            <exclude name="libnr/nr-compose-reference.o"/>
435            <exclude name="libnr/test-nr.o"/>
436            <exclude name="svg/test-svg.o"/>
437            <exclude name="util/test-util.o"/>
438            <exclude name="xml/test-xml.o"/>
439        </fileset>
440     </staticlib>
441   </target>
445   <!--
446   ########################################################################
447   ## T A R G E T    :    I 1 8 N
448   ########################################################################
449   -->
450   <target name="i18n" depends="compile"
451       description="compile gettext .po files to .mo">
453     <msgfmt todir="${build}/locale" owndir="true"
454          out="LC_MESSAGES/inkscape.mo">
455        <fileset dir="po">
456        </fileset>
457     </msgfmt>
458   </target>
464   <!--
465   ########################################################################
466   ## T A R G E T    :    L I N K
467   ########################################################################
468   -->
469   <target name="link" depends="lib"
470       description="link objects and library to create executable">
472     <rc command="${archutil}windres" 
473         file="${src}/inkscape.rc"
474         out="${build}/inkres.o">
475         <flags>
476         --include-dir=${src}
477         </flags>
478     </rc>
479     <link command="${arch}g++" out="${build}/inkscape.exe"
480               strip="true" symfile="${build}/inkscape.dbg"
481               stripcommand="${archutil}strip"
482               objcopycommand="${archutil}objcopy">
483        <flags>
484            -mwindows
485            -mthreads
486        </flags>
487        <fileset dir="${build}">
488            <include name="inkres.o"/>
489            <include name="obj/main.o"/>
490            <include name="obj/winmain.o"/>
491            <include name="libinkscape.a"/>
492        </fileset>
493        <!-- WARNING: If you change these libraries, don't forget to change them for inkview and cxxtests below as well! -->
494        <libs>
495            -L${devlibs}/lib
496            ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler} 
497            ${pcl.gtkmm-2.4}  ${pcl.pangoft2} ${pcl.gthread-2.0}
498            ${devlibs}/bin/libxml2.dll
499            ${devlibs}/bin/libxslt.dll
500            ${pcl.cairo} ${pcl.cairomm-1.0}
501            ${pcl.libwpg-0.1} ${pcl.libwpg-stream-0.1}
502            -liconv
503            ${pcl.Magick++}
504            ${pcl.fontconfig} ${pcl.freetype2}
505            ${pcl.lcms}
506            ${pcl.gsl}
507            -lpng -ljpeg -ltiff -lpopt -lz
508            -lgc
509            -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
510            -lgomp -lpthreadGC2 -laspell
511            -lmscms  <!-- required for color profiles -->
512        </libs>
513     </link>
514   </target>
515   
516 <!--
517   ########################################################################
518   ## T A R G E T    :    L I N K C O N S O L E
519   ########################################################################
520   -->
521   <target name="linkconsole" depends="compile"
522         description="link console helper">
524     <link command="${arch}g++" out="${build}/inkscape-console.exe"
525               strip="true" stripcommand="${archutil}strip">
526        <flags>
527            -mconsole
528            -mthreads
529        </flags>
530        <fileset dir="${build}">
531            <include name="obj/winconsole.o"/>
532        </fileset>
533        <libs></libs>
534     </link>
535   </target>
537   <!--
538   ########################################################################
539   ## T A R G E T    :    L I N K I N K V I E W
540   ########################################################################
541   -->
542   <target name="linkinkview" depends="lib"
543         description="link objects and library to create Inkview executable">
545     <rc command="${archutil}windres" 
546         file="${src}/inkview.rc"
547         out="${build}/inkviewres.o">
548         <flags>
549         --include-dir=${src}
550         </flags>
551     </rc>
552     <link command="${arch}g++" out="${build}/inkview.exe"
553               strip="true" symfile="${build}/inkview.dbg"
554               stripcommand="${archutil}strip"
555               objcopycommand="${archutil}objcopy">
556        <flags>
557            -mwindows
558            -mthreads
559        </flags>
560        <fileset dir="${build}">
561            <include name="inkviewres.o"/>
562            <include name="obj/inkview.o"/>
563            <include name="libinkscape.a"/>
564        </fileset>
565        <libs>
566            -L${devlibs}/lib
567            ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler} 
568            ${pcl.gtkmm-2.4}  ${pcl.pangoft2} ${pcl.gthread-2.0}
569            ${devlibs}/bin/libxml2.dll
570            ${devlibs}/bin/libxslt.dll
571            ${pcl.cairo} ${pcl.cairomm-1.0}
572            ${pcl.libwpg-0.1} ${pcl.libwpg-stream-0.1}
573            -liconv
574            ${pcl.Magick++}
575            ${pcl.fontconfig} ${pcl.freetype2}
576            ${pcl.lcms}
577            ${pcl.gsl}
578            -lpng -ljpeg -ltiff -lpopt -lz
579            -lgc
580            -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
581            -lgomp -lpthreadGC2 -laspell
582            -lmscms  <!-- required for color profiles -->
583        </libs>
584     </link>
585   </target>
589   <!--
590   ########################################################################
591   ## T A R G E T    :    L I N K C X X T E S T S
592   ########################################################################
593   -->
594   <target name="linkcxxtests" depends="lib"
595       description="link objects and library to create executable">
597     <link command="${arch}g++" out="${build}/cxxtests.exe"
598               strip="true" symfile="${build}/cxxtests.dbg"
599               stripcommand="${archutil}strip"
600               objcopycommand="${archutil}objcopy">
601        <flags>
602            -mthreads
603        </flags>
604        <fileset dir="${build}">
605            <include name="obj/test-main.o"/>
606            <include name="obj/test-src.o"/>
607            <include name="obj/display/test-display.o"/>
608            <include name="obj/helper/test-helper.o"/>
609            <include name="obj/libnr/nr-compose-reference.o"/>
610            <include name="obj/libnr/test-nr.o"/>
611            <include name="obj/svg/test-svg.o"/>
612            <include name="obj/util/test-util.o"/>
613            <include name="obj/xml/test-xml.o"/>
614            <include name="libinkscape.a"/>
615        </fileset>
616        <libs>
617            -L${devlibs}/lib
618            ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler} 
619            ${pcl.gtkmm-2.4}  ${pcl.pangoft2} ${pcl.gthread-2.0}
620            ${devlibs}/bin/libxml2.dll
621            ${devlibs}/bin/libxslt.dll
622            ${pcl.cairo} ${pcl.cairomm-1.0}
623            ${pcl.libwpg-0.1} ${pcl.libwpg-stream-0.1}
624            -liconv
625            ${pcl.Magick++}
626            ${pcl.fontconfig} ${pcl.freetype2}
627            ${pcl.lcms}
628            ${pcl.gsl}
629            -lpng -ljpeg -ltiff -lpopt -lz
630            -lgc
631            -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
632            -lgomp -lpthreadGC2 -laspell
633            -lmscms  <!-- required for color profiles -->
634        </libs>
635     </link>
636   </target>
639   <!--
640   ########################################################################
641   ## T A R G E T    :    D I S T B A S E
642   ########################################################################
643   -->
644   <target name="distbase" depends="i18n"
645       description="generate the distribution directory with all needed files">
647     <!-- Create the distribution directory -->
648     <copy todir="${dist}" file="AUTHORS"/>
649     <copy todir="${dist}" file="COPYING"/>
650     <copy todir="${dist}" file="COPYING.LIB"/>
651     <copy todir="${dist}" file="NEWS"/>
652     <copy todir="${dist}" file="README"/>
653     <copy todir="${dist}" file="TRANSLATORS"/>
654     <copy todir="${dist}" file="${devlibs}/bin/libatkmm-1.6-1.dll"/>
655     <copy todir="${dist}" file="${devlibs}/bin/libglibmm-2.4-1.dll"/>
656         <copy todir="${dist}" file="${devlibs}/bin/libgiomm-2.4-1.dll"/>
657     <copy todir="${dist}" file="${devlibs}/bin/libgtkmm-2.4-1.dll"/>
658     <copy todir="${dist}" file="${devlibs}/bin/libgdkmm-2.4-1.dll"/>
659     <copy todir="${dist}" file="${devlibs}/bin/libpangomm-1.4-1.dll"/>
660     <copy todir="${dist}" file="${devlibs}/bin/libcairomm-1.0-1.dll"/>
661     <copy todir="${dist}" file="${devlibs}/bin/libsigc-2.0-0.dll"/>
662     <copy todir="${dist}" file="${devlibs}/bin/freetype6.dll"/>
663     <copy todir="${dist}" file="${devlibs}/bin/libatk-1.0-0.dll"/>
664     <copy todir="${dist}" file="${devlibs}/bin/libgdk-win32-2.0-0.dll"/>
665     <copy todir="${dist}" file="${devlibs}/bin/libgdk_pixbuf-2.0-0.dll"/>
666     <copy todir="${dist}" file="${devlibs}/bin/libglib-2.0-0.dll"/>
667     <copy todir="${dist}" file="${devlibs}/bin/libgmodule-2.0-0.dll"/>
668     <copy todir="${dist}" file="${devlibs}/bin/libgobject-2.0-0.dll"/>
669     <copy todir="${dist}" file="${devlibs}/bin/libgtk-win32-2.0-0.dll"/>
670     <copy todir="${dist}" file="${devlibs}/bin/libgthread-2.0-0.dll"/>
671     <copy todir="${dist}" file="${devlibs}/bin/libgio-2.0-0.dll"/>
672     <copy todir="${dist}" file="${devlibs}/bin/libcairo-2.dll"/>
673     <copy todir="${dist}" file="${devlibs}/bin/libpoppler-5.dll"/>
674         <copy todir="${dist}" file="${devlibs}/bin/libpoppler-glib-4.dll"/>
675     <copy todir="${dist}" file="${devlibs}/bin/libpangocairo-1.0-0.dll"/>
676     <copy todir="${dist}" file="${devlibs}/bin/libpango-1.0-0.dll"/>
677     <copy todir="${dist}" file="${devlibs}/bin/libpangoft2-1.0-0.dll"/>
678     <copy todir="${dist}" file="${devlibs}/bin/libpangowin32-1.0-0.dll"/>
679     <copy todir="${dist}" file="${devlibs}/bin/freetype6.dll"/>
680     <copy todir="${dist}" file="${devlibs}/bin/libfontconfig-1.dll"/>
681     <copy todir="${dist}" file="${devlibs}/bin/libxml2.dll"/>
682     <copy todir="${dist}" file="${devlibs}/bin/libxslt.dll"/>
683     <copy todir="${dist}" file="${devlibs}/bin/libexpat-1.dll"/>
684     <copy todir="${dist}" file="${devlibs}/bin/libwpg-0.1.dll"/>
685     <copy todir="${dist}" file="${devlibs}/bin/libwpg-stream-0.1.dll"/>
686     <copy todir="${dist}" file="${devlibs}/bin/libwpd-0.8.dll"/>
687     <copy todir="${dist}" file="${devlibs}/bin/libwpd-stream-0.8.dll"/>
688     <copy todir="${dist}" file="${devlibs}/bin/libjpeg-7.dll"/>
689     <copy todir="${dist}" file="${devlibs}/bin/libpng12-0.dll"/>
690     <copy todir="${dist}" file="${devlibs}/bin/libtiff-3.dll"/>
691         <copy todir="${dist}" file="${devlibs}/bin/libopenjpeg-2.dll"/>
692     <copy todir="${dist}" file="${devlibs}/bin/msvcr70.dll"/>
693     <copy todir="${dist}" file="${devlibs}/bin/msvcr71.dll"/>
694     <copy todir="${dist}" file="${devlibs}/bin/zlib1.dll"/>
695         <copy todir="${dist}" file="${devlibs}/bin/bzip2.dll"/>
696     <copy todir="${dist}" file="${devlibs}/bin/iconv.dll"/>
697     <copy todir="${dist}" file="${devlibs}/bin/libpopt-0.dll"/>
698     <copy todir="${dist}" file="${devlibs}/bin/liblcms-1.dll"/>
699         <copy todir="${dist}" file="${devlibs}/bin/libMagick++-3.dll"/>
700         <copy todir="${dist}" file="${devlibs}/bin/libMagickCore-3.dll"/>
701         <copy todir="${dist}" file="${devlibs}/bin/libMagickWand-3.dll"/>
702     <copy todir="${dist}" file="${devlibs}/bin/intl.dll"/>
703     <copy todir="${dist}" file="${devlibs}/bin/pthreadGC2.dll"/>
704     <copy file="${devlibs}/bin/intl.dll" tofile="${dist}/libintl-2.dll"/>
705     <!-- MINGW support DLLs needed for openmp support  -->
706     <copy todir="${dist}" file="${mingw_bin}/mingwm10.dll"/>
707         <copy todir="${dist}" file="${mingw}/lib/gcc/mingw32/bin/libgomp-1.dll"/>
709     <!-- MSGFMT files -->
710     <copy todir="${dist}">
711         <fileset dir="${build}/locale">
712           <exclude name=".*\.am"/>
713         </fileset>
714     </copy>
716     <mkdir dir="${dist}/data"/>
717     <mkdir dir="${dist}/locale"/>
718     <mkdir dir="${dist}/modules"/>
719     <mkdir dir="${dist}/plugins"/>
721     <!-- GTK -->
722     <copy todir="${dist}">     <fileset dir="${devlibs}/etc"/> </copy>
723     <copy todir="${dist}/lib"> <fileset dir="${devlibs}/lib/gtk-2.0"/> </copy>
724     <copy todir="${dist}/lib"> <fileset dir="${devlibs}/lib/glib-2.0"/> </copy>
725     <copy todir="${dist}">
726         <fileset dir="share">
727           <exclude name=".*\.am"/>
728           <exclude name=".*\.in"/>
729           <exclude name=".*\.sh"/>
730         </fileset>
731     </copy>
732     <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/locale"/> </copy>
733     <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/themes"/> </copy>
734     <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/poppler"/> </copy>
735     <copy todir="${dist}" file="${devlibs}/bin/gdb.exe"/>
737     <!-- Aspell dictionaries -->
738     <copy todir="${dist}/lib"> <fileset dir="${devlibs}/lib/aspell-0.60"/> </copy>
740     <!-- Necessary to run extensions on windows if it is not in the path -->
741     <copy todir="${dist}" file="${devlibs}/bin/gspawn-win32-helper.exe"/>
742     <copy todir="${dist}" file="${devlibs}/bin/gspawn-win32-helper-console.exe"/>
744     <!-- PERL -->
745     <copy todir="${dist}" file="${devlibs}/perl/bin/perl58.dll"/>
747     <!-- PYTHON -->
748     <copy todir="${dist}" file="${devlibs}/python/python26.dll"/>
749     <copy todir="${dist}/python" file="${devlibs}/python/python.exe" />
750     <copy todir="${dist}/python" file="${devlibs}/python/pythonw.exe"/>
751     <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/Lib"/> </copy>
752     <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/DLLs"/> </copy>
753     <!-- <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/Scripts"/> </copy> -->
755     <!--<copy file="${devlibs}/share/themes/MS-Windows/gtk-2.0/gtkrc" todir="${dist}/etc/gtk-2.0"/>-->
756     <makefile file="${dist}/etc/gtk-2.0/gtkrc">
757     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"
758     gtk-toolbar-icon-size = small-toolbar
760     # disable images in buttons. i've only seen ugly delphi apps use this feature.
761     gtk-button-images = 0
762     
763     # disable the annoying beep in editable controls
764     gtk-error-bell = 0
766     # enable/disable images in menus. most "stock" microsoft apps don't use these, except sparingly.
767     # the office apps use them heavily, though.
768     gtk-menu-images = 1
770     # use the win32 button ordering instead of the GNOME HIG one, where applicable
771     gtk-alternative-button-order = 1
773     style "msw-default"
774     {
775       GtkWidget::interior-focus = 1
776       GtkOptionMenu::indicator-size = { 9, 5 }
777       GtkOptionMenu::indicator-spacing = { 7, 5, 2, 2 }
778       GtkSpinButton::shadow-type = in
780       # Owen and I disagree that these should be themable
781       #GtkUIManager::add-tearoffs = 0
782       #GtkComboBox::add-tearoffs = 0
784       GtkComboBox::appears-as-list = 1
785       GtkComboBox::focus-on-click = 0
787       GOComboBox::add_tearoffs = 0
789       GtkTreeView::allow-rules = 0
790       GtkTreeView::expander-size = 12
792       GtkExpander::expander-size = 12
794       GtkScrolledWindow::scrollbar_spacing = 1
796       GtkSeparatorMenuItem::horizontal-padding = 2
798       engine "wimp"
799       {
800       }
801     }
802     class "*" style "msw-default"
803     </makefile>
805   </target>
808   <!--
809   ########################################################################
810   ## T A R G E T    :    D I S T - I N K S C A P E
811   ########################################################################
812   -->
813   <target name="dist-inkscape" depends="link,linkconsole,distbase"
814       description="copy inkscape to the distribution directory">
816     <!-- Create the distribution directory -->
817     <copy todir="${dist}" file="${build}/inkscape.exe"/>
818     <copy todir="${dist}" file="${build}/inkscape.dbg"/>
819     <copy file="${build}/inkscape-console.exe" tofile="${dist}/inkscape.com"/>
820   </target>
823   <!--
824   ########################################################################
825   ## T A R G E T    :    D I S T - I N K V I E W
826   ########################################################################
827   -->
828   <target name="dist-inkview" depends="linkinkview,distbase"
829       description="copy inkview to the distribution directory">
831     <!-- Create the distribution directory -->
832     <copy todir="${dist}" file="${build}/inkview.exe"/>
833     <copy todir="${dist}" file="${build}/inkview.dbg"/>
834   </target>
837   <!--
838   ########################################################################
839   ## T A R G E T    :    C H E C K
840   ########################################################################
841   -->
842   <target name="check" depends="linkcxxtests,distbase"
843       description="perform unit tests">
844     <cxxtestrun command="${build}/cxxtests" workingdir="${dist}" />
845   </target>
848   <!--
849   ########################################################################
850   ## T A R G E T    :    JAVAC
851   ########################################################################
852   -->
853   <target name="javac" depends="init"
854       description="compile java binding classes">
855     <javac srcdir="${src}/bind/java" destdir="${build}/java/classes"/>
856   </target>
859   <!--
860   ########################################################################
861   ## T A R G E T    :    JAR
862   ########################################################################
863   -->
864   <target name="jar" depends="javac"
865       description="pack java classes and resources into a jar file">
866     <copy todir="${build}/java/classes"> <fileset dir="${devlibs}/bind/data"/> </copy>
867     <jar basedir="${build}/java/classes" destfile="${build}/java/lib/inkscape.jar"/>
868   </target>
870   <!--
871   ########################################################################
872   ## T A R G E T    :    BINDDIST
873   ########################################################################
874   -->
875   <target name="binddist" depends="jar"
876       description="pack java classes and resources into a jar file">
877     <copy todir="${dist}/share/bind"> <fileset dir="${devlibs}/bind/java"/> </copy>
878     <copy todir="${dist}/share/bind/java"> <fileset dir="${build}/java/lib"/> </copy>
880   </target>
882   <!--
883   ########################################################################
884   ## T A R G E T    :    BINDCLEAN
885   ########################################################################
886   -->
887   <target name="bindclean" depends=""
888       description="clean up java binding classes">
889         <delete dir="${build}/java"/>
890   </target>
895   <!--
896   ########################################################################
897   ## T A R G E T    :    D I S T - A L L
898   ########################################################################
899   -->
900   <target name="dist-all" depends="dist-inkscape,dist-inkview"
901         description="generate the distribution, along with inkview" >
902   </target>
907   <!--
908   ########################################################################
909   ## T A R G E T    :    D I S T - A L L - C H E C K
910   ########################################################################
911   -->
912   <target name="dist-all-check" depends="dist-all,check"
913         description="generate the distribution, along with inkview and run cxxtests" >
914   </target>
920   <!--
921   ########################################################################
922   ## T A R G E T    :    C L E A N
923   ########################################################################
924   -->
925   <target name="clean" depends="bindclean"
926         description="clean up.  deleting build and distro dirs" >
928     <delete dir="${build}"/>
929     <delete dir="${dist}"/>
930     <delete file="build.dep"/>
931     <delete file="config.h"/>
932     <delete file="${src}/inkscape-version.cpp"/>
933     <delete file="${src}/test-main.cpp"/>
934     <delete file="${src}/test-src.cpp"/>
935     <delete file="${src}/display/test-display.cpp"/>
936     <delete file="${src}/helper/test-helper.cpp"/>
937     <delete file="${src}/libnr/test-nr.cpp"/>
938     <delete file="${src}/svg/test-svg.cpp"/>
939     <delete file="${src}/util/test-util.cpp"/>
940     <delete file="${src}/xml/test-xml.cpp"/>
942   </target>
946 </project>
947 <!--
948 ########################################################################
949 ## E N D
950 ########################################################################
951 -->