Code

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