Code

tweaks
[inkscape.git] / build.xml
1 <project name="Sands" default="dist" basedir=".">\r
2     <description>\r
3         Build file for Sands office data tool\r
4     </description>\r
5 \r
6   <!-- set global properties for this build -->\r
7   <property name="version"     location="0.45"/>\r
8   <property name="src"         location="src"/>\r
9   <property name="gtk"         location="c:/gtk28"/>\r
10   <property name="lib"         location="lib"/>\r
11   <property name="build"       location="build"/>\r
12   <property name="dist"        location="dist"/>\r
13 \r
14   <target name="init">\r
15     <!-- Create the build directory structure used by compile -->\r
16     <mkdir dir="${build}"/>\r
17     <copy file="config.h.mingw" tofile="config.h"/>\r
18   </target>\r
19 \r
20   <target name="compile" depends="init"\r
21         description="compile the source " >\r
22     <!-- Compile from source to build -->\r
23     <cc cc="gcc" cxx="g++" destdir="${build}/obj">\r
24             <fileset dir="${src}">\r
25             <!-- THINGS TO EXCLUDE -->\r
26                 <exclude name="ast"/>\r
27                 <exclude name="bonobo"/>\r
28                 <exclude name="deptool.cpp"/>\r
29                 <exclude name="dialogs/filedialog-win32.cpp"/>\r
30                 <exclude name="display/testnr.cpp"/>\r
31                 <exclude name="display/bezier-utils-test.cpp"/>\r
32                 <exclude name="dom/jsdombind.cpp"/>\r
33                 <exclude name="dom/work"/>\r
34                 <exclude name="dom/odf/SvgOdg.cpp"/>\r
35                 <exclude name="extension/api.cpp"/>\r
36                 <exclude name="extension/dxf2svg"/>\r
37                 <exclude name="extension/internal/gnome.cpp"/>\r
38                 <exclude name="extension/script/bindtest.cpp"/>\r
39                 <exclude name="extension/script/cpptest.cpp"/>\r
40                 <exclude name="extension/plugin"/>\r
41                 <exclude name="extract-uri-test.cpp"/>\r
42                 <exclude name="helper/units-test.cpp"/>\r
43                 <exclude name="inkview.cpp"/>\r
44                 <exclude name="libnr/in-svg-plane-test.cpp"/>\r
45                 <exclude name="libnr/nr-compose-reference.cpp"/>\r
46                 <exclude name="libnr/nr-compose-test.cpp"/>\r
47                 <exclude name="libnr/nr-matrix-test.cpp"/>\r
48                 <exclude name="libnr/nr-point-fns-test.cpp"/>\r
49                 <exclude name="libnr/nr-rotate-fns-test.cpp"/>\r
50                 <exclude name="libnr/nr-rotate-test.cpp"/>\r
51                 <exclude name="libnr/nr-scale-test.cpp"/>\r
52                 <exclude name="libnr/nr-translate-test.cpp"/>\r
53                 <exclude name="libnr/nr-types-test.cpp"/>\r
54                 <exclude name="livarot/Path-test.cpp"/>\r
55                 <exclude name="mod360-test.cpp"/>\r
56                 <exclude name="trace/potrace/potest.cpp"/>\r
57                 <exclude name="round-test.cpp"/>\r
58                 <exclude name="sp-gradient-test.cpp"/>\r
59                 <exclude name="svg/ftos.cpp"/>\r
60                 <exclude name="utest"/>\r
61                 <exclude name="widgets/test-widgets.cpp"/>\r
62                 <exclude name="xml/quote-test.cpp"/>\r
63                 <exclude name="xml/repr-action-test.cpp"/>\r
64                 <exclude name="io/streamtest.cpp"/>\r
65             <!--JABBER-->\r
66                 <exclude name="pedro/pedrogui.cpp"/>\r
67                 <exclude name="pedro/pedrogui.h"/>\r
68                 <exclude name="pedro/work"/>\r
69             <!--WHITEBOARD-->\r
70                 <exclude name="ui/dialog/session-player.cpp"/>\r
71                 <exclude name="ui/dialog/whiteboard-connect.cpp"/>\r
72                 <exclude name="ui/dialog/whiteboard-sharewithchat.cpp"/>\r
73                 <exclude name="ui/dialog/whiteboard-sharewithuser.cpp"/>\r
74                 <exclude name="dialogs/whiteboard-connect-dialog.cpp"/>\r
75                 <exclude name="dialogs/whiteboard-common-dialog.cpp"/>\r
76                 <exclude name="dialogs/whiteboard-sharewithchat-dialog.cpp"/>\r
77                 <exclude name="dialogs/whiteboard-sharewithuser-dialog.cpp"/>\r
78                 <exclude name="jabber_whiteboard/node-tracker.cpp"/>\r
79                 <exclude name="jabber_whiteboard/node-utilities.cpp"/>\r
80             <!--WHITEBOARD-->\r
81                 <exclude name="removeoverlap/placement_SolveVPSC.cpp"/>\r
82                 <exclude name="removeoverlap/placement_SolveVPSC.h"/>\r
83                 <exclude name="removeoverlap/test.cpp"/>\r
84                 <exclude name="removeoverlap/remove_rectangle_overlap-test.cpp"/>\r
85                 <exclude name="removeoverlap/remove_rectangle_overlap-test.h"/>\r
86             </fileset>\r
87         <flags>\r
88             -Wall -g -O3\r
89                         -mms-bitfields\r
90         </flags>\r
91         <defines>\r
92             -DVERSION=\"${version}\"\r
93             -DHAVE_CONFIG_H\r
94             -DXP_WIN <!-- for JS -->\r
95                         -D_INTL_REDIRECT_INLINE\r
96             -DWITH_INKBOARD -DHAVE_SSL <!-- inkboard -->\r
97         </defines>\r
98         <includes>\r
99             -I${gtk}/include\r
100                         <!-- GTK / GTKMM -->\r
101             -I${gtk}/include/glibmm-2.4\r
102                     -I${gtk}/lib/glibmm-2.4/include\r
103             -I${gtk}/include/gtkmm-2.4\r
104                     -I${gtk}/lib/gtkmm-2.4/include\r
105             -I${gtk}/include/gdkmm-2.4\r
106                     -I${gtk}/lib/gdkmm-2.4/include\r
107             -I${gtk}/include/pangomm-1.4\r
108             -I${gtk}/include/atkmm-1.6\r
109             -I${gtk}/include/sigc++-2.0\r
110                     -I${gtk}/lib/sigc++-2.0/include\r
111             -I${gtk}/include/gtk-2.0\r
112                     -I${gtk}/lib/gtk-2.0/include\r
113             -I${gtk}/include/atk-1.0\r
114                     -I${gtk}/include/pango-1.0\r
115             -I${gtk}/include/glib-2.0\r
116                     -I${gtk}/lib/glib-2.0/include\r
117                     <!-- OTHER -->\r
118             -I${gtk}/include/libxml2 \r
119                         -I${gtk}/include/freetype2\r
120                     -I${gtk}/include/cairo\r
121                     <!-- PERL -->\r
122                     -Wno-comment -I${gtk}/perl/lib/CORE\r
123                     <!-- PYTHON -->\r
124                     -I${gtk}/python/include\r
125         </includes>\r
126         </cc>\r
127   </target>\r
128   \r
129   <target name="lib" depends="compile">\r
130     <ar file="${build}/libinkscape.a">\r
131            <fileset dir="${build}/obj">\r
132                <exclude name="main,o"/>\r
133                <exclude name="winmain,o"/>\r
134            </fileset>\r
135         </ar>\r
136   </target>\r
137 \r
138   <target name="i18n" depends="compile">\r
139     <msgfmt todir="${build}/po">\r
140            <fileset dir="po">\r
141            </fileset>\r
142         </msgfmt>\r
143   </target>\r
144 \r
145   <target name="link" depends="lib">\r
146     <rc command="windres -o" \r
147             file="${src}/inkscape.rc"\r
148             out="${build}/inkres.o">\r
149                 <flags>\r
150                 --include-dir=${src}\r
151                 </flags>\r
152         </rc>\r
153     <link command="g++" out="${build}/inkscape.exe">\r
154        <flags>\r
155        </flags>\r
156            <fileset>\r
157                <include name="${build}/inkres.o"/>\r
158                <include name="${build}/obj/main.o"/>\r
159                <include name="${build}/obj/winmain.o"/>\r
160                <include name="${build}/libinkscape.a"/>\r
161            </fileset>\r
162            <libs>\r
163                -L${gtk}/lib\r
164            -lgtkmm-2.4 -lgdkmm-2.4 -lglibmm-2.4\r
165            -latkmm-1.6 -lpangomm-1.4 -lsigc-2.0\r
166            -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0\r
167            -lgdk_pixbuf-2.0\r
168            -lpangocairo-1.0 -lpangoft2-1.0 -lpangowin32-1.0 -lpango-1.0\r
169            -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lcairo\r
170            <!-- PERL -->\r
171                    -L${gtk}/perl/lib/CORE -lperl58\r
172            <!-- PYTHON -->\r
173            -L${gtk}/python/libs -lpython24\r
174            ${gtk}/bin/libxml2.dll\r
175            ${gtk}/lib/iconv.lib\r
176            -lfreetype.dll -lfontconfig.dll\r
177            -llcms.dll\r
178            -lssl -lcrypto\r
179            -lpng -lpopt ${gtk}/lib/zdll.lib\r
180            -lgc -mwindows -lws2_32 -lintl -lm\r
181            </libs>\r
182         </link>\r
183   </target>\r
184 \r
185   <target name="dist" depends="link"\r
186         description="generate the distribution" >\r
187     <!-- Create the distribution directory -->\r
188     <copy file="${build}/inkscape.exe" todir="${dist}"/>\r
189     <copy file="AUTHORS" todir="${dist}"/>\r
190     <copy file="COPYING" todir="${dist}"/>\r
191     <copy file="COPYING.LIB" todir="${dist}"/>\r
192     <copy file="NEWS" todir="${dist}"/>\r
193     <copy file="README" todir="${dist}"/>\r
194     <copy file="TRANSLATORS" todir="${dist}"/>\r
195     <copy file="${gtk}/bin/libatkmm-1.6-1.dll" todir="${dist}"/>\r
196     <copy file="${gtk}/bin/libglibmm-2.4-1.dll" todir="${dist}"/>\r
197     <copy file="${gtk}/bin/libgtkmm-2.4-1.dll" todir="${dist}"/>\r
198     <copy file="${gtk}/bin/libgdkmm-2.4-1.dll" todir="${dist}"/>\r
199     <copy file="${gtk}/bin/libpangomm-1.4-1.dll" todir="${dist}"/>\r
200     <copy file="${gtk}/bin/libsigc-2.0-0.dll" todir="${dist}"/>\r
201     <copy file="${gtk}/bin/freetype6.dll" todir="${dist}"/>\r
202     <copy file="${gtk}/bin/libatk-1.0-0.dll" todir="${dist}"/>\r
203     <copy file="${gtk}/bin/libgdk-win32-2.0-0.dll" todir="${dist}"/>\r
204     <copy file="${gtk}/bin/libgdk_pixbuf-2.0-0.dll" todir="${dist}"/>\r
205     <copy file="${gtk}/bin/libglib-2.0-0.dll" todir="${dist}"/>\r
206     <copy file="${gtk}/bin/libgmodule-2.0-0.dll" todir="${dist}"/>\r
207     <copy file="${gtk}/bin/libgobject-2.0-0.dll" todir="${dist}"/>\r
208     <copy file="${gtk}/bin/libgtk-win32-2.0-0.dll" todir="${dist}"/>\r
209     <copy file="${gtk}/bin/libgthread-2.0-0.dlll" todir="${dist}"/>\r
210     <copy file="${gtk}/bin/libcairo-2.dll" todir="${dist}"/>\r
211     <copy file="${gtk}/bin/libpangocairo-1.0-0.dll" todir="${dist}"/>\r
212     <copy file="${gtk}/bin/libpango-1.0-0.dll" todir="${dist}"/>\r
213     <copy file="${gtk}/bin/libpangoft2-1.0-0.dll" todir="${dist}"/>\r
214     <copy file="${gtk}/bin/libpangowin32-1.0-0.dll" todir="${dist}"/>\r
215     <copy file="${gtk}/bin/freetype6.dll" todir="${dist}"/>\r
216     <copy file="${gtk}/bin/libfontconfig-1.dll" todir="${dist}"/>\r
217     <copy file="${gtk}/bin/libxml2.dll" todir="${dist}"/>\r
218     <copy file="${gtk}/bin/xmlparse.dll" todir="${dist}"/>\r
219     <copy file="${gtk}/bin/jpeg62.dll" todir="${dist}"/>\r
220     <copy file="${gtk}/bin/libintl-2.dll" todir="${dist}"/>\r
221     <copy file="${gtk}/bin/libintl-2.dll" tofile="${dist}/intl.dll"/>\r
222     <copy file="${gtk}/bin/libpng13.dlll" todir="${dist}"/>\r
223     <copy file="${gtk}/bin/msvcr70.dll" todir="${dist}"/>\r
224     <copy file="${gtk}/bin/msvcr71.dll" todir="${dist}"/>\r
225     <copy file="${gtk}/bin/zlib1.dll" todir="${dist}"/>\r
226     <copy file="${gtk}/bin/iconv.dll" todir="${dist}"/>\r
227     <copy file="${gtk}/bin/popt1.dll" todir="${dist}"/>\r
228     <copy file="${gtk}/bin/liblcms-1.dll" todir="${dist}"/>\r
229 \r
230     <!-- MSGFMT files -->\r
231     <copy todir="${dist}"> <fileset dir="${build}/po"/> </copy>\r
232 \r
233     <!-- GTK -->\r
234     <copy todir="${dist}"> <fileset dir="${gtk}/etc"/> </copy>\r
235     <copy file="${gtk}/share/themes/MS-Windows/gtk-2.0/gtkrc" todir="${dist}/etc/gtk-2.0"/>\r
236     <copy todir="${dist}/lib"> <fileset dir="${gtk}/lib/gtk-2.0"/> </copy>\r
237     <copy todir="${dist}/lib"> <fileset dir="${gtk}/lib/glib-2.0"/> </copy>\r
238     <copy todir="${dist}/lib"> <fileset dir="${gtk}/lib/locale"/> </copy>\r
239     <copy todir="${dist}/lib"> <fileset dir="${gtk}/lib/pango"/> </copy>\r
240     <copy todir="${dist}"> <fileset dir="share"/> </copy>\r
241     <copy todir="${dist}/share"> <fileset dir="${gtk}/share/themes"/> </copy>\r
242     <mkdir dir="${dist}/data"/>\r
243     <mkdir dir="${dist}/locale"/>\r
244     <mkdir dir="${dist}/modules"/>\r
245     <mkdir dir="${dist}/plugins"/>\r
246     <copy file="${gtk}/bin/gdb.exe" todir="${dist}"/>\r
247 \r
248     <!-- PERL -->\r
249     <copy file="${gtk}/perl/bin/perl58.dll" todir="${dist}"/>\r
250 \r
251     <!-- PYTHON -->\r
252     <copy file="${gtk}/python/python24.dll" todir="${dist}"/>\r
253     <copy file="${gtk}/python/python.exe" todir="${dist}/python"/>\r
254     <copy todir="${dist}/python"> <fileset dir="${gtk}/python/Lib"/> </copy>\r
255     <copy todir="${dist}/python"> <fileset dir="${gtk}/python/DLLs"/> </copy>\r
256     <copy todir="${dist}/python"> <fileset dir="${gtk}/python/Scripts"/> </copy>\r
257 \r
258 \r
259   </target>\r
260 \r
261   <target name="clean"\r
262         description="clean up" >\r
263     <!-- Delete the ${build} and ${dist} directory trees -->\r
264     <delete dir="${build}"/>\r
265     <delete dir="${dist}"/>\r
266   </target>\r
267 </project>\r
268 \r