Code

Translations. French translation minor update.
[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_GLIB             1
182         #define HAVE_POPPLER_CAIRO            1
184         /* do we want bitmap manipulation? */
185         #define WITH_IMAGE_MAGICK             1
187         /* Allow reading WordPerfect? */
188         #define WITH_LIBWPG                   1
190         /* Do we support SVG Fonts? */
191         #define ENABLE_SVG_FONTS              1
193         /* Do we want experimental, unsupported, unguaranteed, etc., LivePathEffects enabled? */
194         //#define LPE_ENABLE_TEST_EFFECTS    1
196         #define HAVE_ASPELL                   1
198         #endif /* _CONFIG_H_ */
199     </makefile>
200   </target>
202   <!--
203   ########################################################################
204   ## T A R G E T    :    C X X T E S T
205   ########################################################################
206   -->
207   <target name="cxxtest" depends="init"
208         description="generate test files" >
210     <!-- Generate CxxTest files -->
211     <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
212                  out="${src}/test-src.cpp">
213         <fileset dir="${src}">
214             <include name="attributes-test.h"/>
215             <include name="color-profile-test.h"/>
216             <include name="dir-util-test.h"/>
217             <include name="extract-uri-test.h"/>
218             <include name="marker-test.h"/>
219             <include name="mod360-test.h"/>
220             <include name="preferences-test.h"/>
221             <include name="round-test.h"/>
222             <include name="sp-gradient-test.h"/>
223             <include name="sp-style-elem-test.h"/>
224             <include name="syle-test.h"/>
225             <include name="test-helpers.h"/>
226             <include name="verbs-test.h"/>
227         </fileset>
228     </cxxtestpart>
229     <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
230                  out="${src}/display/test-display.cpp">
231         <fileset dir="${src}/display">
232             <include name="curve-test.h"/>
233         </fileset>
234     </cxxtestpart>
235     <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
236                  out="${src}/helper/test-helper.cpp">
237         <fileset dir="${src}/helper">
238             <include name="units-test.h"/>
239         </fileset>
240     </cxxtestpart>
241     <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
242                  out="${src}/libnr/test-nr.cpp">
243         <fileset dir="${src}/libnr">
244             <include name="nr-compose-test.h"/>
245             <include name="nr-types-test.h"/>
246             <include name="nr-translate-test.h"/>
247             <include name="nr-rotate-test.h"/>
248             <include name="nr-scale-test.h"/>
249             <include name="nr-point-fns-test.h"/>
250             <include name="nr-rotate-fns-test.h"/>
251             <include name="in-svg-plane-test.h"/>
252             <include name="nr-matrix-test.h"/>
253         </fileset>
254     </cxxtestpart>
255     <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
256                  out="${src}/svg/test-svg.cpp">
257         <fileset dir="${src}/svg">
258             <include name="css-ostringstream-test.h"/>
259             <include name="stringstream-test.h"/>
260             <include name="svg-affine-test.h"/>
261             <include name="svg-color-test.h"/>
262             <include name="svg-length-test.h"/>
263             <include name="svg-path-geom-test.h"/>
264         </fileset>
265     </cxxtestpart>
266     <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
267                  out="${src}/util/test-util.cpp">
268         <fileset dir="${src}/util">
269             <include name="list-container-test.h"/>
270         </fileset>
271     </cxxtestpart>
272     <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
273                  out="${src}/xml/test-xml.cpp">
274         <fileset dir="${src}/xml">
275             <include name="repr-action-test.h"/>
276             <include name="quote-test.h"/>
277         </fileset>
278     </cxxtestpart>
279     <cxxtestroot command="${python} ${cxxtest}/cxxtestgen.py" 
280                  out="${src}/test-main.cpp"
281                  template="${src}/cxxtest-template.tpl">
282         <fileset dir="${src}">
283             <include name="MultiPrinter.h"/>
284             <include name="PylogFormatter.h"/>
285             <include name="TRPIFormatter.h"/>
286         </fileset>
287     </cxxtestroot>
288   </target>
291   <!--
292   ########################################################################
293   ## T A R G E T    :    C O M P I L E
294   ########################################################################
295   -->
296   <target name="compile" depends="cxxtest"
297         description="compile the source to .o" >
299     <!-- Compile from source to build -->
300     <cc cc="${arch}gcc" cxx="${arch}g++"
301              destdir="${build}/obj"
302              continueOnError="true"
303              refreshCache="${refresh}">
304         <fileset dir="${src}">
305             <!-- THINGS TO EXCLUDE -->
306             <exclude name="2geom/chebyshev.cpp"/>
307             <exclude name="ast/.*"/>
308             <exclude name="bonobo/.*"/>
309             <exclude name="deptool.cpp"/>
310             <exclude name="cxxtests.cpp"/>
311             <!--<exclude name="test-main.cpp"/>-->
312             <!--<exclude name="test-src.cpp"/>-->
313             <exclude name="display/test-display.cpp"/>
314             <exclude name="display/testnr.cpp"/>
315             <exclude name="dom/work/.*"/>
316             <exclude name="dom/odf/SvgOdg.cpp"/>
317             <exclude name="extension/api.cpp"/>
318             <exclude name="extension/dbus/.*"/>
319             <exclude name="extension/dxf2svg/.*"/>
320             <exclude name="extension/implementation/plugin.cpp"/>
321             <exclude name="extension/script/bindtest.cpp"/>
322             <exclude name="extension/script/cpptest.cpp"/>
323             <exclude name="extension/plugin/.*"/>
324             <exclude name="extract-uri-test.cpp"/>
325             <exclude name="helper/units-test.cpp"/>
326             <!-- exclude name="inkview.cpp"/-->
327             <!--<exclude name="libnr/test-nr.cpp"/>-->
328             <exclude name="libnr/test-nr-main.cpp"/>
329             <exclude name="libnr/testnr.cpp"/>
330             <exclude name="libnr/in-svg-plane-test.cpp"/>
331             <exclude name="libnr/nr-matrix-test.cpp"/>
332             <exclude name="libnr/nr-point-fns-test.cpp"/>
333             <exclude name="libnr/nr-rotate-fns-test.cpp"/>
334             <exclude name="libnr/nr-rotate-test.cpp"/>
335             <exclude name="libnr/nr-scale-test.cpp"/>
336             <exclude name="libnr/nr-translate-test.cpp"/>
337             <exclude name="libnr/nr-types-test.cpp"/>
338             <exclude name="livarot/Path-test.cpp"/>
339             <exclude name="mod360-test.cpp"/>
340             <exclude name="trace/potrace/potest.cpp"/>
341             <exclude name="round-test.cpp"/>
342             <exclude name="sp-gradient-test.cpp"/>
343             <exclude name="style-test.cpp"/>
344             <exclude name="svg/ftos.cpp"/>
345             <!--<exclude name="svg/test-svg.cpp"/>-->
346             <exclude name="svg/test-svg-main.cpp"/>
347             <exclude name="util/list-container-test.cpp"/>
348             <exclude name="widgets/test-widgets.cpp"/>
349             <exclude name="xml/quote-test.cpp"/>
350             <exclude name="xml/repr-action-test.cpp"/>
351             <exclude name="xml/test-xml.cpp"/>
352             <!--<exclude name="xml/test-xml-main.cpp"/>-->
353             <exclude name="io/streamtest.cpp"/>
354             <!--JABBER-->
355             <exclude name="pedro/pedrogui.cpp"/>
356             <exclude name="pedro/pedrogui.h"/>
357             <exclude name="pedro/work/.*"/>
358             <!--WHITEBOARD-->
359             <exclude name="ui/dialog/session-player.cpp"/>
360             <exclude name="ui/dialog/whiteboard-connect.cpp"/>
361             <exclude name="ui/dialog/whiteboard-sharewithchat.cpp"/>
362             <exclude name="ui/dialog/whiteboard-sharewithuser.cpp"/>
363             <exclude name="dialogs/whiteboard-connect-dialog.cpp"/>
364             <exclude name="dialogs/whiteboard-common-dialog.cpp"/>
365             <exclude name="dialogs/whiteboard-sharewithchat-dialog.cpp"/>
366             <exclude name="dialogs/whiteboard-sharewithuser-dialog.cpp"/>
367             <exclude name="jabber_whiteboard/node-tracker.cpp"/>
368             <exclude name="jabber_whiteboard/node-utilities.cpp"/>
369             <!--OVERLAP-->
370             <exclude name="removeoverlap/placement_SolveVPSC.cpp"/>
371             <exclude name="removeoverlap/placement_SolveVPSC.h"/>
372             <exclude name="removeoverlap/test.cpp"/>
373             <exclude name="removeoverlap/remove_rectangle_overlap-test.cpp"/>
374             <exclude name="removeoverlap/remove_rectangle_overlap-test.h"/>
375         </fileset>
376         <excludeinc dir="${src}">
377             <file name="extension/param"/>
378         </excludeinc>
379         <flags>
380             -Wall -Wformat -Werror=format-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch
381             -O2
382             -mms-bitfields
383             -fopenmp
384         </flags>
385         <defines>
386             -DVERSION=\"${version}\"
387             -DHAVE_CONFIG_H
388             -D_INTL_REDIRECT_INLINE
389             -DHAVE_SSL
390             -DRELAYTOOL_SSL="static const int libssl_is_present=1; static int __attribute__((unused)) libssl_symbol_is_present(char *s){ return 1; }" <!-- inkboard -->
391             -DPOPPLER_NEW_GFXFONT <!-- poppler changed the api for 0.8.3 -->
392         </defines>
393         <includes>
394             -I${devlibs}/include
395             <!-- GTK / GTKMM -->
396             ${pcc.gtkmm-2.4}
397             <!-- OTHER -->
398                         ${pcc.Magick++}
399                         ${pcc.libxml-2.0}
400             ${pcc.freetype2}
401             ${pcc.cairo}
402             ${pcc.poppler}
403             -I${devlibs}/include/gc
404             ${pcc.libwpg-0.1} ${pcc.libwpg-stream-0.1}
405             -I${cxxtest}
406             <!-- PERL -->
407             <!-- -Wno-comment -I${devlibs}/perl/lib/CORE -->
408             <!-- PYTHON -->
409             -I${devlibs}/python/include
410             <!-- JAVA -->
411             -I${src}/bind/javainc -I${src}/bind/javainc/win32
412         </includes>
413     </cc>
414   </target>
415   
417   <!--
418   ########################################################################
419   ## T A R G E T    :    L I B
420   ########################################################################
421   -->
422   <target name="lib" depends="compile"
423       description="create a static library">
424     <staticlib command="${archutil}ar crsv"
425            file="${build}/libinkscape.a">
426        <fileset dir="${build}/obj">
427            <exclude name="main.o"/>
428            <exclude name="winmain.o"/>
429            <exclude name="inkview.o"/>
430            <!-- CxxTest -->
431            <exclude name="test-main.o"/>
432            <exclude name="test-src.o"/>
433            <exclude name="display/test-display.o"/>
434            <exclude name="helper/test-helper.o"/>
435            <exclude name="libnr/nr-compose-reference.o"/>
436            <exclude name="libnr/test-nr.o"/>
437            <exclude name="svg/test-svg.o"/>
438            <exclude name="util/test-util.o"/>
439            <exclude name="xml/test-xml.o"/>
440        </fileset>
441     </staticlib>
442   </target>
446   <!--
447   ########################################################################
448   ## T A R G E T    :    I 1 8 N
449   ########################################################################
450   -->
451   <target name="i18n" depends="compile"
452       description="compile gettext .po files to .mo">
454     <msgfmt todir="${build}/locale" owndir="true"
455          out="LC_MESSAGES/inkscape.mo">
456        <fileset dir="po">
457        </fileset>
458     </msgfmt>
459   </target>
465   <!--
466   ########################################################################
467   ## T A R G E T    :    L I N K
468   ########################################################################
469   -->
470   <target name="link" depends="lib"
471       description="link objects and library to create executable">
473     <rc command="${archutil}windres" 
474         file="${src}/inkscape.rc"
475         out="${build}/inkres.o">
476         <flags>
477         --include-dir=${src}
478         </flags>
479     </rc>
480     <link command="${arch}g++" out="${build}/inkscape.exe"
481               strip="true" symfile="${build}/inkscape.dbg"
482               stripcommand="${archutil}strip"
483               objcopycommand="${archutil}objcopy">
484        <flags>
485            -mwindows
486            -mthreads
487        </flags>
488        <fileset dir="${build}">
489            <include name="inkres.o"/>
490            <include name="obj/main.o"/>
491            <include name="obj/winmain.o"/>
492            <include name="libinkscape.a"/>
493        </fileset>
494        <!-- WARNING: If you change these libraries, don't forget to change them for inkview and cxxtests below as well! -->
495        <libs>
496            -L${devlibs}/lib
497            ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler} 
498            ${pcl.gtkmm-2.4}  ${pcl.pangoft2} ${pcl.gthread-2.0}
499            ${devlibs}/bin/libxml2.dll
500            ${devlibs}/bin/libxslt.dll
501            ${pcl.cairo} ${pcl.cairomm-1.0}
502            ${pcl.libwpg-0.1} ${pcl.libwpg-stream-0.1}
503            -liconv
504            ${pcl.Magick++}
505            ${pcl.fontconfig} ${pcl.freetype2}
506            ${pcl.lcms}
507            ${pcl.gsl}
508            -lpng -ljpeg -ltiff -lpopt -lz
509            -lgc
510            -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
511            -lgomp -lpthreadGC2 -laspell
512            -lmscms  <!-- required for color profiles -->
513        </libs>
514     </link>
515   </target>
516   
517 <!--
518   ########################################################################
519   ## T A R G E T    :    L I N K C O N S O L E
520   ########################################################################
521   -->
522   <target name="linkconsole" depends="compile"
523         description="link console helper">
525     <link command="${arch}g++" out="${build}/inkscape-console.exe"
526               strip="true" stripcommand="${archutil}strip">
527        <flags>
528            -mconsole
529            -mthreads
530        </flags>
531        <fileset dir="${build}">
532            <include name="obj/winconsole.o"/>
533        </fileset>
534        <libs></libs>
535     </link>
536   </target>
538   <!--
539   ########################################################################
540   ## T A R G E T    :    L I N K I N K V I E W
541   ########################################################################
542   -->
543   <target name="linkinkview" depends="lib"
544         description="link objects and library to create Inkview executable">
546     <rc command="${archutil}windres" 
547         file="${src}/inkview.rc"
548         out="${build}/inkviewres.o">
549         <flags>
550         --include-dir=${src}
551         </flags>
552     </rc>
553     <link command="${arch}g++" out="${build}/inkview.exe"
554               strip="true" symfile="${build}/inkview.dbg"
555               stripcommand="${archutil}strip"
556               objcopycommand="${archutil}objcopy">
557        <flags>
558            -mwindows
559            -mthreads
560        </flags>
561        <fileset dir="${build}">
562            <include name="inkviewres.o"/>
563            <include name="obj/inkview.o"/>
564            <include name="libinkscape.a"/>
565        </fileset>
566        <libs>
567            -L${devlibs}/lib
568            ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler} 
569            ${pcl.gtkmm-2.4}  ${pcl.pangoft2} ${pcl.gthread-2.0}
570            ${devlibs}/bin/libxml2.dll
571            ${devlibs}/bin/libxslt.dll
572            ${pcl.cairo} ${pcl.cairomm-1.0}
573            ${pcl.libwpg-0.1} ${pcl.libwpg-stream-0.1}
574            -liconv
575            ${pcl.Magick++}
576            ${pcl.fontconfig} ${pcl.freetype2}
577            ${pcl.lcms}
578            ${pcl.gsl}
579            -lpng -ljpeg -ltiff -lpopt -lz
580            -lgc
581            -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
582            -lgomp -lpthreadGC2 -laspell
583            -lmscms  <!-- required for color profiles -->
584        </libs>
585     </link>
586   </target>
590   <!--
591   ########################################################################
592   ## T A R G E T    :    L I N K C X X T E S T S
593   ########################################################################
594   -->
595   <target name="linkcxxtests" depends="lib"
596       description="link objects and library to create executable">
598     <link command="${arch}g++" out="${build}/cxxtests.exe"
599               strip="true" symfile="${build}/cxxtests.dbg"
600               stripcommand="${archutil}strip"
601               objcopycommand="${archutil}objcopy">
602        <flags>
603            -mthreads
604        </flags>
605        <fileset dir="${build}">
606            <include name="obj/test-main.o"/>
607            <include name="obj/test-src.o"/>
608            <include name="obj/display/test-display.o"/>
609            <include name="obj/helper/test-helper.o"/>
610            <include name="obj/libnr/nr-compose-reference.o"/>
611            <include name="obj/libnr/test-nr.o"/>
612            <include name="obj/svg/test-svg.o"/>
613            <include name="obj/util/test-util.o"/>
614            <include name="obj/xml/test-xml.o"/>
615            <include name="libinkscape.a"/>
616        </fileset>
617        <libs>
618            -L${devlibs}/lib
619            ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler} 
620            ${pcl.gtkmm-2.4}  ${pcl.pangoft2} ${pcl.gthread-2.0}
621            ${devlibs}/bin/libxml2.dll
622            ${devlibs}/bin/libxslt.dll
623            ${pcl.cairo} ${pcl.cairomm-1.0}
624            ${pcl.libwpg-0.1} ${pcl.libwpg-stream-0.1}
625            -liconv
626            ${pcl.Magick++}
627            ${pcl.fontconfig} ${pcl.freetype2}
628            ${pcl.lcms}
629            ${pcl.gsl}
630            -lpng -ljpeg -ltiff -lpopt -lz
631            -lgc
632            -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
633            -lgomp -lpthreadGC2 -laspell
634            -lmscms  <!-- required for color profiles -->
635        </libs>
636     </link>
637   </target>
640   <!--
641   ########################################################################
642   ## T A R G E T    :    D I S T B A S E
643   ########################################################################
644   -->
645   <target name="distbase" depends="i18n"
646       description="generate the distribution directory with all needed files">
648     <!-- Create the distribution directory -->
649     <copy todir="${dist}" file="AUTHORS"/>
650     <copy todir="${dist}" file="COPYING"/>
651     <copy todir="${dist}" file="COPYING.LIB"/>
652     <copy todir="${dist}" file="NEWS"/>
653     <copy todir="${dist}" file="README"/>
654     <copy todir="${dist}" file="TRANSLATORS"/>
655     <copy todir="${dist}" file="${devlibs}/bin/libatkmm-1.6-1.dll"/>
656     <copy todir="${dist}" file="${devlibs}/bin/libglibmm-2.4-1.dll"/>
657         <copy todir="${dist}" file="${devlibs}/bin/libgiomm-2.4-1.dll"/>
658     <copy todir="${dist}" file="${devlibs}/bin/libgtkmm-2.4-1.dll"/>
659     <copy todir="${dist}" file="${devlibs}/bin/libgdkmm-2.4-1.dll"/>
660     <copy todir="${dist}" file="${devlibs}/bin/libpangomm-1.4-1.dll"/>
661     <copy todir="${dist}" file="${devlibs}/bin/libcairomm-1.0-1.dll"/>
662     <copy todir="${dist}" file="${devlibs}/bin/libsigc-2.0-0.dll"/>
663     <copy todir="${dist}" file="${devlibs}/bin/freetype6.dll"/>
664     <copy todir="${dist}" file="${devlibs}/bin/libatk-1.0-0.dll"/>
665     <copy todir="${dist}" file="${devlibs}/bin/libgdk-win32-2.0-0.dll"/>
666     <copy todir="${dist}" file="${devlibs}/bin/libgdk_pixbuf-2.0-0.dll"/>
667     <copy todir="${dist}" file="${devlibs}/bin/libglib-2.0-0.dll"/>
668     <copy todir="${dist}" file="${devlibs}/bin/libgmodule-2.0-0.dll"/>
669     <copy todir="${dist}" file="${devlibs}/bin/libgobject-2.0-0.dll"/>
670     <copy todir="${dist}" file="${devlibs}/bin/libgtk-win32-2.0-0.dll"/>
671     <copy todir="${dist}" file="${devlibs}/bin/libgthread-2.0-0.dll"/>
672     <copy todir="${dist}" file="${devlibs}/bin/libgio-2.0-0.dll"/>
673     <copy todir="${dist}" file="${devlibs}/bin/libcairo-2.dll"/>
674     <copy todir="${dist}" file="${devlibs}/bin/libpoppler-5.dll"/>
675         <copy todir="${dist}" file="${devlibs}/bin/libpoppler-glib-4.dll"/>
676     <copy todir="${dist}" file="${devlibs}/bin/libpangocairo-1.0-0.dll"/>
677     <copy todir="${dist}" file="${devlibs}/bin/libpango-1.0-0.dll"/>
678     <copy todir="${dist}" file="${devlibs}/bin/libpangoft2-1.0-0.dll"/>
679     <copy todir="${dist}" file="${devlibs}/bin/libpangowin32-1.0-0.dll"/>
680     <copy todir="${dist}" file="${devlibs}/bin/freetype6.dll"/>
681     <copy todir="${dist}" file="${devlibs}/bin/libfontconfig-1.dll"/>
682     <copy todir="${dist}" file="${devlibs}/bin/libxml2.dll"/>
683     <copy todir="${dist}" file="${devlibs}/bin/libxslt.dll"/>
684     <copy todir="${dist}" file="${devlibs}/bin/libexpat-1.dll"/>
685     <copy todir="${dist}" file="${devlibs}/bin/libwpg-0.1.dll"/>
686     <copy todir="${dist}" file="${devlibs}/bin/libwpg-stream-0.1.dll"/>
687     <copy todir="${dist}" file="${devlibs}/bin/libwpd-0.8.dll"/>
688     <copy todir="${dist}" file="${devlibs}/bin/libwpd-stream-0.8.dll"/>
689     <copy todir="${dist}" file="${devlibs}/bin/libjpeg-7.dll"/>
690     <copy todir="${dist}" file="${devlibs}/bin/libpng12-0.dll"/>
691     <copy todir="${dist}" file="${devlibs}/bin/libpng14-14.dll"/>
692     <copy todir="${dist}" file="${devlibs}/bin/libtiff-3.dll"/>
693         <copy todir="${dist}" file="${devlibs}/bin/libopenjpeg-2.dll"/>
694     <copy todir="${dist}" file="${devlibs}/bin/msvcr70.dll"/>
695     <copy todir="${dist}" file="${devlibs}/bin/msvcr71.dll"/>
696     <copy todir="${dist}" file="${devlibs}/bin/zlib1.dll"/>
697         <copy todir="${dist}" file="${devlibs}/bin/bzip2.dll"/>
698     <copy todir="${dist}" file="${devlibs}/bin/iconv.dll"/>
699     <copy todir="${dist}" file="${devlibs}/bin/libpopt-0.dll"/>
700     <copy todir="${dist}" file="${devlibs}/bin/liblcms-1.dll"/>
701         <copy todir="${dist}" file="${devlibs}/bin/libMagick++-3.dll"/>
702         <copy todir="${dist}" file="${devlibs}/bin/libMagickCore-3.dll"/>
703         <copy todir="${dist}" file="${devlibs}/bin/libMagickWand-3.dll"/>
704     <copy todir="${dist}" file="${devlibs}/bin/intl.dll"/>
705     <copy todir="${dist}" file="${devlibs}/bin/pthreadGC2.dll"/>
706     <copy file="${devlibs}/bin/intl.dll" tofile="${dist}/libintl-2.dll"/>
707     <!-- MINGW support DLLs needed for openmp support  -->
708     <copy todir="${dist}" file="${mingw_bin}/mingwm10.dll"/>
709         <copy todir="${dist}" file="${mingw}/lib/gcc/mingw32/bin/libgomp-1.dll"/>
711     <!-- MSGFMT files -->
712     <copy todir="${dist}">
713         <fileset dir="${build}/locale">
714           <exclude name=".*\.am"/>
715         </fileset>
716     </copy>
718     <mkdir dir="${dist}/data"/>
719     <mkdir dir="${dist}/locale"/>
720     <mkdir dir="${dist}/modules"/>
721     <mkdir dir="${dist}/plugins"/>
723     <!-- GTK -->
724     <copy todir="${dist}">     <fileset dir="${devlibs}/etc"/> </copy>
725     <copy todir="${dist}/lib"> <fileset dir="${devlibs}/lib/gtk-2.0"/> </copy>
726     <copy todir="${dist}/lib"> <fileset dir="${devlibs}/lib/glib-2.0"/> </copy>
727     <copy todir="${dist}">
728         <fileset dir="share">
729           <exclude name=".*\.am"/>
730           <exclude name=".*\.in"/>
731           <exclude name=".*\.sh"/>
732         </fileset>
733     </copy>
734     <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/locale"/> </copy>
735     <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/themes"/> </copy>
736     <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/poppler"/> </copy>
737     <copy todir="${dist}" file="${devlibs}/bin/gdb.exe"/>
739     <!-- Aspell dictionaries -->
740     <copy todir="${dist}/lib"> <fileset dir="${devlibs}/lib/aspell-0.60"/> </copy>
742     <!-- Necessary to run extensions on windows if it is not in the path -->
743     <copy todir="${dist}" file="${devlibs}/bin/gspawn-win32-helper.exe"/>
744     <copy todir="${dist}" file="${devlibs}/bin/gspawn-win32-helper-console.exe"/>
746     <!-- PERL -->
747     <copy todir="${dist}" file="${devlibs}/perl/bin/perl58.dll"/>
749     <!-- PYTHON -->
750     <copy todir="${dist}" file="${devlibs}/python/python26.dll"/>
751     <copy todir="${dist}/python" file="${devlibs}/python/python.exe" />
752     <copy todir="${dist}/python" file="${devlibs}/python/pythonw.exe"/>
753     <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/Lib"/> </copy>
754     <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/DLLs"/> </copy>
755     <!-- <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/Scripts"/> </copy> -->
757     <!--<copy file="${devlibs}/share/themes/MS-Windows/gtk-2.0/gtkrc" todir="${dist}/etc/gtk-2.0"/>-->
758     <makefile file="${dist}/etc/gtk-2.0/gtkrc">
759     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"
760     gtk-toolbar-icon-size = small-toolbar
762     # disable images in buttons. i've only seen ugly delphi apps use this feature.
763     gtk-button-images = 0
764     
765     # disable the annoying beep in editable controls
766     gtk-error-bell = 0
768     # enable/disable images in menus. most "stock" microsoft apps don't use these, except sparingly.
769     # the office apps use them heavily, though.
770     gtk-menu-images = 1
772     # use the win32 button ordering instead of the GNOME HIG one, where applicable
773     gtk-alternative-button-order = 1
775     style "msw-default"
776     {
777       GtkWidget::interior-focus = 1
778       GtkOptionMenu::indicator-size = { 9, 5 }
779       GtkOptionMenu::indicator-spacing = { 7, 5, 2, 2 }
780       GtkSpinButton::shadow-type = in
782       # Owen and I disagree that these should be themable
783       #GtkUIManager::add-tearoffs = 0
784       #GtkComboBox::add-tearoffs = 0
786       GtkComboBox::appears-as-list = 1
787       GtkComboBox::focus-on-click = 0
789       GOComboBox::add_tearoffs = 0
791       GtkTreeView::allow-rules = 0
792       GtkTreeView::expander-size = 12
794       GtkExpander::expander-size = 12
796       GtkScrolledWindow::scrollbar_spacing = 1
798       GtkSeparatorMenuItem::horizontal-padding = 2
800       engine "wimp"
801       {
802       }
803     }
804     class "*" style "msw-default"
805     </makefile>
807   </target>
810   <!--
811   ########################################################################
812   ## T A R G E T    :    D I S T - I N K S C A P E
813   ########################################################################
814   -->
815   <target name="dist-inkscape" depends="link,linkconsole,distbase"
816       description="copy inkscape to the distribution directory">
818     <!-- Create the distribution directory -->
819     <copy todir="${dist}" file="${build}/inkscape.exe"/>
820     <copy todir="${dist}" file="${build}/inkscape.dbg"/>
821     <copy file="${build}/inkscape-console.exe" tofile="${dist}/inkscape.com"/>
822   </target>
825   <!--
826   ########################################################################
827   ## T A R G E T    :    D I S T - I N K V I E W
828   ########################################################################
829   -->
830   <target name="dist-inkview" depends="linkinkview,distbase"
831       description="copy inkview to the distribution directory">
833     <!-- Create the distribution directory -->
834     <copy todir="${dist}" file="${build}/inkview.exe"/>
835     <copy todir="${dist}" file="${build}/inkview.dbg"/>
836   </target>
839   <!--
840   ########################################################################
841   ## T A R G E T    :    C H E C K
842   ########################################################################
843   -->
844   <target name="check" depends="linkcxxtests,distbase"
845       description="perform unit tests">
846     <cxxtestrun command="${build}/cxxtests" workingdir="${dist}" />
847   </target>
850   <!--
851   ########################################################################
852   ## T A R G E T    :    JAVAC
853   ########################################################################
854   -->
855   <target name="javac" depends="init"
856       description="compile java binding classes">
857     <javac srcdir="${src}/bind/java" destdir="${build}/java/classes"/>
858   </target>
861   <!--
862   ########################################################################
863   ## T A R G E T    :    JAR
864   ########################################################################
865   -->
866   <target name="jar" depends="javac"
867       description="pack java classes and resources into a jar file">
868     <copy todir="${build}/java/classes"> <fileset dir="${devlibs}/bind/data"/> </copy>
869     <jar basedir="${build}/java/classes" destfile="${build}/java/lib/inkscape.jar"/>
870   </target>
872   <!--
873   ########################################################################
874   ## T A R G E T    :    BINDDIST
875   ########################################################################
876   -->
877   <target name="binddist" depends="jar"
878       description="pack java classes and resources into a jar file">
879     <copy todir="${dist}/share/bind"> <fileset dir="${devlibs}/bind/java"/> </copy>
880     <copy todir="${dist}/share/bind/java"> <fileset dir="${build}/java/lib"/> </copy>
882   </target>
884   <!--
885   ########################################################################
886   ## T A R G E T    :    BINDCLEAN
887   ########################################################################
888   -->
889   <target name="bindclean" depends=""
890       description="clean up java binding classes">
891         <delete dir="${build}/java"/>
892   </target>
897   <!--
898   ########################################################################
899   ## T A R G E T    :    D I S T - A L L
900   ########################################################################
901   -->
902   <target name="dist-all" depends="dist-inkscape,dist-inkview"
903         description="generate the distribution, along with inkview" >
904   </target>
909   <!--
910   ########################################################################
911   ## T A R G E T    :    D I S T - A L L - C H E C K
912   ########################################################################
913   -->
914   <target name="dist-all-check" depends="dist-all,check"
915         description="generate the distribution, along with inkview and run cxxtests" >
916   </target>
922   <!--
923   ########################################################################
924   ## T A R G E T    :    C L E A N
925   ########################################################################
926   -->
927   <target name="clean" depends="bindclean"
928         description="clean up.  deleting build and distro dirs" >
930     <delete dir="${build}"/>
931     <delete dir="${dist}"/>
932     <delete file="build.dep"/>
933     <delete file="config.h"/>
934     <delete file="${src}/inkscape-version.cpp"/>
935     <delete file="${src}/test-main.cpp"/>
936     <delete file="${src}/test-src.cpp"/>
937     <delete file="${src}/display/test-display.cpp"/>
938     <delete file="${src}/helper/test-helper.cpp"/>
939     <delete file="${src}/libnr/test-nr.cpp"/>
940     <delete file="${src}/svg/test-svg.cpp"/>
941     <delete file="${src}/util/test-util.cpp"/>
942     <delete file="${src}/xml/test-xml.cpp"/>
944   </target>
948 </project>
949 <!--
950 ########################################################################
951 ## E N D
952 ########################################################################
953 -->