~inkscape.dev/inkscape/trunk

13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
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
-->
26
27
28
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>
43
44
  <!-- set global properties for this build -->
13643 by bryce
Fix version numbers
45
  <property name="version"       value="0.91+devel_64bit"/>
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
46
  <property name="src"           location="src"/>
47
  <property name="lib"           location="lib"/>
48
  <property name="build"         location="build"/>
49
  <property name="dist"          location="inkscape"/>
50
51
  <!-- Use these settings for the native compiler -->  
52
  <!-- -->
53
  <property name="arch"          value="x86_64-w64-mingw32-"/>
54
  <property name="arch_cc"       value="${arch}gcc"/>
55
  <property name="arch_cxx"      value="${arch}g++"/>
56
  <property name="arch_link"     value="${arch}g++"/>
57
  <property name="archutil"      value=""/>
58
  <property name="devlibs"       location="${env.DEVLIBS_PATH}"/>
59
  <property name="mingw"         location="${env.MINGW_PATH}"/>
60
  <property name="mingw_bin"     location="${env.MINGW_PATH}/bin"/>
61
  <property name="cxxtest"       location="cxxtest"/>
62
  <property name="python"        location="${devlibs}/python/python.exe"/>
63
  <!-- -->
64
65
  <!-- Use these settings for the cross compiler -->  
66
  <!--
67
  <property name="arch"          value="i686-pc-mingw32-"/>
68
  <property name="arch_cc"       value="${arch}gcc"/>
69
  <property name="arch_cxx"      value="${arch}g++"/>
70
  <property name="arch_link"     value="${arch}g++"/>
71
  <property name="archutil"      value="${arch}"/>
72
  <property name="devlibs"       location="/target"/>
73
  <property name="mingw_bin"     location="${env.MINGW_BIN}"/>
74
  <property name="cxxtest"       location="cxxtest"/>
75
  <property name="python"        location="python"/>
76
  -->
77
78
  <!-- Extra properties -->  
79
  <property name="refresh"       value="false"/>
80
81
  <!--
82
    This is for package-config.  With these two settings, pkg-config
83
    queries can be as simple as ${pcc.packageName} for cflags, and
84
    ${pcl.packageName} for libs.  Dependencies are calculated automatically.
85
  -->
86
  <property name="pkg-config-path"   location="${devlibs}/lib/pkgconfig"/>
87
  <property name="pkg-config-prefix" location="${devlibs}"/>
88
89
90
  <!--
91
  ########################################################################
92
  ## T A R G E T    :    I N I T
93
  ########################################################################
94
  -->
95
  <target name="init"
96
      description=
97
      "Do all preparatory tasks, like make directories and copy files">
98
99
100
    <mkdir dir="${build}"/>
101
    <mkdir dir="${dist}"/>
102
    
103
    <copy file="${src}/helper/sp-marshal.h.mingw"
104
          tofile="${src}/helper/sp-marshal.h"/>
105
    <copy file="${src}/helper/sp-marshal.cpp.mingw"
106
          tofile="${src}/helper/sp-marshal.cpp"/>
107
          
108
    <!--makefile file="${src}/inkscape-version.cpp">
109
        namespace Inkscape {
110
            char const *version_string = "${version}";
111
        }
112
    </makefile-->
113
    <makefile file="${src}/inkscape-version.cpp">
114
        namespace Inkscape {
115
            char const *version_string = "${version} ${bzr.revision}";
116
        }
117
    </makefile>
118
    <makefile file="config.h">
119
        #ifndef _CONFIG_H_
120
        #define _CONFIG_H_
121
122
        #ifndef WIN32
123
        #define WIN32
124
        #endif
125
126
        /*######################################
127
        ## This is for require-config.h, whose
128
        ## purpose I cannot fathom.
129
        ######################################*/
130
        
131
        #define PACKAGE_TARNAME
132
133
        /*######################################
134
        #### RESOURCE DIRECTORIES
135
        ######################################*/
136
137
        #define INKSCAPE_DATADIR       "."
138
        #define PACKAGE_LOCALE_DIR     "locale"
139
140
141
        /*######################################
142
        #### OTHER DEFINITIONS
143
        ######################################*/
144
145
        #define GETTEXT_PACKAGE "inkscape"
146
147
        #define PACKAGE_STRING                VERSION
148
149
        #define HAVE_GETOPT_H                 1
150
        #define HAVE_STRING_H                 1
151
        #define HAVE_LIBINTL_H                1
152
        #define HAVE_MALLOC_H                 1
153
        #define HAVE_STDLIB_H                 1
154
        #define HAVE_SYS_STAT_H               1
155
        #define HAVE_INTTYPES_H               1
156
        #define HAVE_OPENMP                   1
157
        #define HAVE_TR1_UNORDERED_SET        1
158
        #define HAVE_STDINT_H                 1
159
160
        #define HAVE_LIBLCMS2                 1
161
162
        #define WITH_GTKMM_2_24               1
163
164
        #define ENABLE_NLS                    1
165
        #define HAVE_BIND_TEXTDOMAIN_CODESET  1
166
167
        /* keep binreloc off */
168
        #define BR_PTHREADS 0
169
        #undef ENABLE_BINRELOC
170
171
        /* CairoPDF options */
172
        #define HAVE_CAIRO_PDF                1
173
        #define PANGO_ENABLE_ENGINE           1
174
        #define RENDER_WITH_PANGO_CAIRO       1
175
176
        #define HAVE_GTK_WINDOW_FULLSCREEN    1
177
        
178
        /* internal interpreter */
179
        #define WITH_PYTHON                   1
180
181
        /* use poppler for pdf import? */
182
        #define HAVE_POPPLER                  1
183
        #define HAVE_POPPLER_GLIB             1
184
        #define HAVE_POPPLER_CAIRO            1
13391 by Johan B. C. Engelen
add libwpg, libvisio, and libcdr to win64 build
185
        #define POPPLER_NEW_ERRORAPI          1 <!-- poppler changed the error api >= 0.20.0 -->
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
186
        #define POPPLER_NEW_GFXPATCH          1
13391 by Johan B. C. Engelen
add libwpg, libvisio, and libcdr to win64 build
187
        #define POPPLER_NEW_GFXFONT           1 <!-- poppler changed the api for 0.8.3 -->
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
188
189
        /* do we want bitmap manipulation? */
190
        #define WITH_IMAGE_MAGICK             1
191
192
        /* Exif and JPEG support for image resolution import */
193
        #define HAVE_EXIF                     1
194
        #define HAVE_JPEG                     1
195
196
        /* Allow reading WordPerfect? */
13391 by Johan B. C. Engelen
add libwpg, libvisio, and libcdr to win64 build
197
        #define WITH_LIBWPG                   1
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
198
199
        /* Default  to libwpg 0.2.x */
13391 by Johan B. C. Engelen
add libwpg, libvisio, and libcdr to win64 build
200
        #define WITH_LIBWPG02                 1
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
201
202
        /* Visio import filter */
13391 by Johan B. C. Engelen
add libwpg, libvisio, and libcdr to win64 build
203
        #define WITH_LIBVISIO                 1
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
204
205
        /* Corel Draw import filter */
13391 by Johan B. C. Engelen
add libwpg, libvisio, and libcdr to win64 build
206
        #define WITH_LIBCDR                   1
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
207
208
        /* Do we support SVG Fonts? */
209
        #define ENABLE_SVG_FONTS              1
210
211
        /* Do we want experimental, unsupported, unguaranteed, etc., LivePathEffects enabled? */
13392 by Johan B. C. Engelen
revert unintended changes by previous commit
212
        //#define LPE_ENABLE_TEST_EFFECTS    1
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
213
214
        /* Do we want experimental, unsupported, unguaranteed, etc., SVG2 features enabled? */
13392 by Johan B. C. Engelen
revert unintended changes by previous commit
215
        //#define WITH_SVG2                  1
216
        //#define WITH_CSSCOMPOSITE          1
217
        //#define WITH_CSSBLEND              1
218
        //#define WITH_MESH                  1
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
219
13403 by Johan B. C. Engelen
win64: add aspell and stand-alone gdb to builds. (x64 version should now be feature complete)
220
        #define HAVE_ASPELL                   1
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
221
222
        #endif /* _CONFIG_H_ */
223
    </makefile>
224
  </target>
225
226
  <!--
227
  ########################################################################
228
  ## T A R G E T    :    C X X T E S T
229
  ########################################################################
230
  -->
231
  <target name="cxxtest" depends="init"
232
        description="generate test files" >
233
234
    <!-- Generate CxxTest files -->
235
    <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
236
                 out="${src}/test-src.cpp">
237
        <fileset dir="${src}">
238
            <include name="attributes-test.h"/>
239
            <include name="color-profile-test.h"/>
240
            <include name="dir-util-test.h"/>
241
            <include name="extract-uri-test.h"/>
242
            <include name="marker-test.h"/>
243
            <include name="mod360-test.h"/>
13702 by Liam P. White
Add totally unfinished XML/SPObject test suite
244
            <include name="object-test.h"/>
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
245
            <include name="preferences-test.h"/>
246
            <include name="round-test.h"/>
247
            <include name="sp-gradient-test.h"/>
248
            <include name="sp-style-elem-test.h"/>
249
            <include name="syle-test.h"/>
250
            <include name="test-helpers.h"/>
251
            <include name="verbs-test.h"/>
252
        </fileset>
253
    </cxxtestpart>
254
    <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
255
                 out="${src}/display/test-display.cpp">
256
        <fileset dir="${src}/display">
257
            <include name="curve-test.h"/>
258
        </fileset>
259
    </cxxtestpart>
260
    <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
261
                 out="${src}/helper/test-helper.cpp">
262
        <fileset dir="${src}/helper">
263
            <include name="units-test.h"/>
264
        </fileset>
265
    </cxxtestpart>
266
    <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
267
                 out="${src}/svg/test-svg.cpp">
268
        <fileset dir="${src}/svg">
269
            <include name="css-ostringstream-test.h"/>
270
            <include name="stringstream-test.h"/>
271
            <include name="svg-affine-test.h"/>
272
            <include name="svg-color-test.h"/>
273
            <include name="svg-length-test.h"/>
274
            <include name="svg-path-geom-test.h"/>
275
        </fileset>
276
    </cxxtestpart>
277
    <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
278
                 out="${src}/util/test-util.cpp">
279
        <fileset dir="${src}/util">
280
            <include name="list-container-test.h"/>
281
        </fileset>
282
    </cxxtestpart>
283
    <cxxtestpart command="${python} ${cxxtest}/cxxtestgen.py --have-eh"
284
                 out="${src}/xml/test-xml.cpp">
285
        <fileset dir="${src}/xml">
286
            <include name="repr-action-test.h"/>
287
            <include name="quote-test.h"/>
288
        </fileset>
289
    </cxxtestpart>
290
    <cxxtestroot command="${python} ${cxxtest}/cxxtestgen.py" 
291
                 out="${src}/test-main.cpp"
292
                 template="${src}/cxxtest-template.tpl">
293
        <fileset dir="${src}">
294
            <include name="MultiPrinter.h"/>
295
            <include name="PylogFormatter.h"/>
296
            <include name="TRPIFormatter.h"/>
297
        </fileset>
298
    </cxxtestroot>
299
  </target>
300
301
302
  <!--
303
  ########################################################################
304
  ## T A R G E T    :    C O M P I L E
305
  ########################################################################
306
  -->
307
  <target name="compile" depends="cxxtest"
308
        description="compile the source to .o" >
309
310
    <!-- Compile from source to build -->
311
    <cc cc="${arch_cc}" cxx="${arch_cxx}"
312
             destdir="${build}/obj"
313
             continueOnError="true"
314
             refreshCache="${refresh}">
315
        <fileset dir="${src}">
316
            <!-- THINGS TO EXCLUDE -->
317
            <exclude name="ast/.*"/>
318
            <exclude name="bonobo/.*"/>
319
            <exclude name="deptool.cpp"/>
320
            <exclude name="cxxtests.cpp"/>
321
            <!--<exclude name="test-main.cpp"/>-->
322
            <!--<exclude name="test-src.cpp"/>-->
323
            <exclude name="display/test-display.cpp"/>
324
            <exclude name="display/testnr.cpp"/>
325
            <exclude name="extension/api.cpp"/>
326
            <exclude name="extension/dbus/.*"/>
327
            <exclude name="extension/dxf2svg/.*"/>
328
            <exclude name="extension/implementation/plugin.cpp"/>
329
            <exclude name="extension/plugin/.*"/>
330
            <exclude name="extract-uri-test.cpp"/>
331
            <exclude name="helper/units-test.cpp"/>
332
            <!-- exclude name="inkview.cpp"/-->
333
            <exclude name="livarot/Path-test.cpp"/>
334
            <exclude name="mod360-test.cpp"/>
335
            <exclude name="trace/potrace/potest.cpp"/>
336
            <exclude name="round-test.cpp"/>
337
            <exclude name="sp-gradient-test.cpp"/>
338
            <exclude name="style-test.cpp"/>
339
            <exclude name="svg/ftos.cpp"/>
340
            <!--<exclude name="svg/test-svg.cpp"/>-->
341
            <exclude name="svg/test-svg-main.cpp"/>
342
            <exclude name="util/list-container-test.cpp"/>
343
            <exclude name="widgets/test-widgets.cpp"/>
344
            <exclude name="xml/quote-test.cpp"/>
345
            <exclude name="xml/repr-action-test.cpp"/>
346
            <exclude name="xml/test-xml.cpp"/>
347
            <!--<exclude name="xml/test-xml-main.cpp"/>-->
348
            <exclude name="io/streamtest.cpp"/>
349
            <!--OVERLAP-->
350
            <exclude name="removeoverlap/placement_SolveVPSC.cpp"/>
351
            <exclude name="removeoverlap/placement_SolveVPSC.h"/>
352
            <exclude name="removeoverlap/test.cpp"/>
353
            <exclude name="removeoverlap/remove_rectangle_overlap-test.cpp"/>
354
            <exclude name="removeoverlap/remove_rectangle_overlap-test.h"/>
355
        </fileset>
356
        <excludeinc dir="${src}">
357
            <file name="extension/param"/>
358
        </excludeinc>
359
        <flags>
13382 by Johan B. C. Engelen
add cxxflags attribute possibility for buildtool. fixes warnings for c-files (-Woverloaded-virtual)
360
            -Wall -Wformat -Werror=format-security -Wextra -Wpointer-arith -Wcast-align -Wsign-compare -Wswitch
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
361
            -Werror=return-type
362
            <!-- - ->  -Werror <!-- -->
363
            <!-- A list of warnings that should not error *yet*, any help is welcome in fixing the code generating these warnings! -->
364
            <!-- libcroco is using guchar where it should use gchar, so we need: --> -Wno-error=pointer-sign
365
            -Wno-error=unused-parameter -Wno-error=unused-but-set-variable -Wno-error=strict-overflow -Wno-error=write-strings
366
            <!-- Format warnings are obviously bad errors, but with the current old compiler on Windows (gcc 4.6.) we run into a problem with long long ints...
367
                 The errors can be restored by removing these flags after updating to a newer compiler (soon after 0.91 release hopefully)  -->
368
            -Wno-error=format -Wno-error=format-extra-args
369
            -Wno-unused-local-typedefs <!-- triggers ton of warnings in (too old?) Boost with newer gcc -->
370
            -O2
371
            -mms-bitfields
372
            -fopenmp
373
        </flags>
13382 by Johan B. C. Engelen
add cxxflags attribute possibility for buildtool. fixes warnings for c-files (-Woverloaded-virtual)
374
        <cxxflags>
375
            -std=gnu++0x -DCPP11  
376
            -Woverloaded-virtual
377
            <!-- -Wno-unused-local-typedefs -->
378
        </cxxflags>
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
379
        <defines>
380
            -DVERSION=\"${version}\"
381
            -DHAVE_CONFIG_H
382
            -D_INTL_REDIRECT_INLINE
383
            -DHAVE_SSL
384
            -DRELAYTOOL_SSL="static const int libssl_is_present=1; static int __attribute__((unused)) libssl_symbol_is_present(char *s){ return 1; }" <!-- inkboard -->
385
            <!-- GTK+3 migration -->
386
            -DGLIBMM_DISABLE_DEPRECATED
387
            -DG_DISABLE_DEPRECATED
388
            -DGTK_DISABLE_SINGLE_INCLUDES
389
            <!-- -DGTKMM_DISABLE_DEPRECATED -->
390
            <!-- -DGTK_DISABLE_DEPRECATED  -->
391
            -DGDKMM_DISABLE_DEPRECATED
392
            -DGSEAL_ENABLE
393
        </defines>
394
        <includes>
395
            -I${devlibs}/include
396
            <!-- GTK / GTKMM -->
397
            ${pcc.gtkmm-2.4}
398
            ${pcc.glibmm-2.4}
399
            ${pcc.gtk+-2.0}
400
            ${pcc.gdkmm-2.4}
401
            ${pcc.pangomm-1.4}
402
            ${pcc.cairomm-1.0}
403
            <!-- OTHER -->
404
			      ${pcc.Magick++}
405
			      ${pcc.libxml-2.0}
406
            ${pcc.freetype2}
407
            ${pcc.cairo}
408
            ${pcc.poppler}
409
            -I${devlibs}/include/gc
13391 by Johan B. C. Engelen
add libwpg, libvisio, and libcdr to win64 build
410
            ${pcc.libwpg-0.2} ${pcc.libvisio-0.0} ${pcc.libcdr-0.0}
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
411
            -I${cxxtest}
412
            <!-- PERL -->
413
            <!-- -Wno-comment -I${devlibs}/perl/lib/CORE -->
414
            <!-- PYTHON -->
415
            -I${devlibs}/python/include
416
        </includes>
417
    </cc>
418
  </target>
419
  
420
421
422
  <!--
423
  ########################################################################
424
  ## T A R G E T    :    I 1 8 N
425
  ########################################################################
426
  -->
427
  <target name="i18n" depends="compile"
428
      description="compile gettext .po files to .mo">
429
430
    <msgfmt todir="${build}/locale" owndir="true"
431
         out="LC_MESSAGES/inkscape.mo">
432
       <fileset dir="po">
433
       </fileset>
434
    </msgfmt>
435
  </target>
436
437
438
439
440
441
  <!--
442
  ########################################################################
443
  ## T A R G E T    :    L I N K
444
  ########################################################################
445
  -->
446
  <target name="link" depends="compile"
447
      description="link objects and library to create executable">
448
449
    <rc command="${archutil}windres" 
450
        file="${src}/inkscape-x64.rc"
451
        out="${build}/obj/inkres.o">
452
        <flags>
453
        --include-dir=${src}
454
        </flags>
455
    </rc>
456
    <link command="${arch_link}" out="${build}/inkscape.exe"
457
              strip="true" symfile="${build}/inkscape.dbg"
458
              stripcommand="${archutil}strip"
459
              objcopycommand="${archutil}objcopy">
460
       <flags>
13434 by Johan B. C. Engelen
release without console window per default
461
           -mwindows -m64
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
462
           -mthreads
463
       </flags>
464
       <fileset dir="${build}/obj">
465
           <exclude name="winconsole.o"/>
466
           <exclude name="inkview.o"/>
467
           <exclude name="inkviewres.o"/>
468
           <!-- CxxTest -->
469
           <exclude name="test-main.o"/>
470
           <exclude name="test-src.o"/>
471
           <exclude name="display/test-display.o"/>
472
           <exclude name="helper/test-helper.o"/>
473
           <exclude name="svg/test-svg.o"/>
474
           <exclude name="util/test-util.o"/>
475
           <exclude name="xml/test-xml.o"/>
476
       </fileset>
477
       <!-- WARNING: If you change these libraries, don't forget to change them for inkview and cxxtests below as well! -->
478
       <libs>
479
           -L${devlibs}/lib
480
           ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler} 
481
           ${pcl.gtkmm-2.4}  ${pcl.pangoft2} ${pcl.gthread-2.0}
482
           ${devlibs}/bin/libxml2-2.dll
483
           ${devlibs}/bin/libxslt-1.dll
484
           ${devlibs}/bin/libexslt-0.dll
485
           ${pcl.cairo} ${pcl.cairomm-1.0}
13391 by Johan B. C. Engelen
add libwpg, libvisio, and libcdr to win64 build
486
           ${pcl.libwpg-0.2} ${pcl.libvisio-0.0} ${pcl.libcdr-0.0}
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
487
           ${pcl.glibmm-2.4}
488
           ${pcl.gtk+-2.0}
489
           ${pcl.gdkmm-2.4}
490
           ${pcl.pangomm-1.4}
491
           ${pcl.cairomm-1.0}
492
           -liconv
493
           ${pcl.Magick++}
494
           ${pcl.fontconfig} ${pcl.freetype2}
495
           ${pcl.lcms2}
496
           ${pcl.gsl}
497
           -lpng -ljpeg -ltiff -lexif -lpopt -lz
498
           -lgc
499
           -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
500
           -lgomp -lwinpthread-1
13403 by Johan B. C. Engelen
win64: add aspell and stand-alone gdb to builds. (x64 version should now be feature complete)
501
           -laspell
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
502
           -lmscms  <!-- required for color profiles -->
503
       </libs>
504
    </link>
505
  </target>
506
  
507
<!--
508
  ########################################################################
509
  ## T A R G E T    :    L I N K C O N S O L E
510
  ########################################################################
511
  -->
512
  <target name="linkconsole" depends="compile"
513
        description="link console helper">
514
515
    <link command="${arch_link}" out="${build}/inkscape-console.exe"
516
              strip="true" stripcommand="${archutil}strip">
517
       <flags>
518
           -mconsole
519
           -mthreads
520
       </flags>
521
       <fileset dir="${build}">
522
           <include name="obj/winconsole.o"/>
523
       </fileset>
524
       <libs></libs>
525
    </link>
526
  </target>
527
528
  <!--
529
  ########################################################################
530
  ## T A R G E T    :    L I N K I N K V I E W
531
  ########################################################################
532
  -->
533
  <target name="linkinkview" depends="compile"
534
        description="link objects and library to create Inkview executable">
535
536
    <rc command="${archutil}windres" 
537
        file="${src}/inkview-x64.rc"
538
        out="${build}/obj/inkviewres.o">
539
        <flags>
540
        --include-dir=${src}
541
        </flags>
542
    </rc>
543
    <link command="${arch_link}" out="${build}/inkview.exe"
544
              strip="true" symfile="${build}/inkview.dbg"
545
              stripcommand="${archutil}strip"
546
              objcopycommand="${archutil}objcopy">
547
       <flags>
13434 by Johan B. C. Engelen
release without console window per default
548
           -mwindows -m64
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
549
           -mthreads
550
       </flags>
551
       <fileset dir="${build}/obj">
552
           <!-- exclude the other programs -->
553
           <exclude name="main.o"/>
554
           <exclude name="winmain.o"/>
555
           <exclude name="winconsole.o"/>
556
           <exclude name="inkres.o"/>
557
           <!-- CxxTest -->
558
           <exclude name="test-main.o"/>
559
           <exclude name="test-src.o"/>
560
           <exclude name="display/test-display.o"/>
561
           <exclude name="helper/test-helper.o"/>
562
           <exclude name="svg/test-svg.o"/>
563
           <exclude name="util/test-util.o"/>
564
           <exclude name="xml/test-xml.o"/>
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-2.dll
571
           ${devlibs}/bin/libxslt-1.dll
572
           ${devlibs}/bin/libexslt-0.dll
573
           ${pcl.cairo} ${pcl.cairomm-1.0}
13391 by Johan B. C. Engelen
add libwpg, libvisio, and libcdr to win64 build
574
           ${pcl.libwpg-0.2} ${pcl.libvisio-0.0} ${pcl.libcdr-0.0}
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
575
           ${pcl.glibmm-2.4}
576
           ${pcl.gtk+-2.0}
577
           ${pcl.gdkmm-2.4}
578
           ${pcl.pangomm-1.4}
579
           ${pcl.cairomm-1.0}
580
           -liconv
581
           ${pcl.Magick++}
582
           ${pcl.fontconfig} ${pcl.freetype2}
583
           ${pcl.lcms2}
584
           ${pcl.gsl}
585
           -lpng -ljpeg -ltiff -lexif -lpopt -lz
586
           -lgc
587
           -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
588
           -lgomp -lwinpthread
13403 by Johan B. C. Engelen
win64: add aspell and stand-alone gdb to builds. (x64 version should now be feature complete)
589
           -laspell
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
590
           -lmscms  <!-- required for color profiles -->
591
       </libs>
592
    </link>
593
  </target>
594
595
596
597
  <!--
598
  ########################################################################
599
  ## T A R G E T    :    L I N K C X X T E S T S
600
  ########################################################################
601
  -->
602
  <target name="linkcxxtests" depends="compile"
603
      description="link objects and library to create executable">
604
605
    <link command="${arch_link}" out="${build}/cxxtests.exe"
606
              strip="true" symfile="${build}/cxxtests.dbg"
607
              stripcommand="${archutil}strip"
608
              objcopycommand="${archutil}objcopy">
609
       <flags>
610
           -mconsole
611
           -mthreads
612
       </flags>
613
       <fileset dir="${build}/obj">
614
           <!-- exclude the other programs -->
615
           <exclude name="main.o"/>
616
           <exclude name="winmain.o"/>
617
           <exclude name="winconsole.o"/>
618
           <exclude name="inkres.o"/>
619
           <exclude name="inkviewres.o"/>
620
           <exclude name="inkview.o"/>
621
       </fileset>
622
       <libs>
623
           -L${devlibs}/lib
624
           ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler} 
625
           ${pcl.gtkmm-2.4}  ${pcl.pangoft2} ${pcl.gthread-2.0}
626
           ${devlibs}/bin/libxml2-2.dll
627
           ${devlibs}/bin/libxslt-1.dll
628
           ${devlibs}/bin/libexslt-0.dll
629
           ${pcl.cairo} ${pcl.cairomm-1.0}
13391 by Johan B. C. Engelen
add libwpg, libvisio, and libcdr to win64 build
630
           ${pcl.libwpg-0.2} ${pcl.libvisio-0.0} ${pcl.libcdr-0.0}
13733 by Johan B. C. Engelen
Windows 64-bit: fix linking cxxtests (missing deps)
631
           ${pcl.glibmm-2.4}
632
           ${pcl.gtk+-2.0}
633
           ${pcl.gdkmm-2.4}
634
           ${pcl.pangomm-1.4}
635
           ${pcl.cairomm-1.0}
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
636
           -liconv
637
           ${pcl.Magick++}
638
           ${pcl.fontconfig} ${pcl.freetype2}
639
           ${pcl.lcms2}
640
           ${pcl.gsl}
641
           -lpng -ljpeg -ltiff -lexif -lpopt -lz
642
           -lgc
643
           -lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
644
           -lgomp -lwinpthread-1
13403 by Johan B. C. Engelen
win64: add aspell and stand-alone gdb to builds. (x64 version should now be feature complete)
645
           -laspell
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
646
           -lmscms  <!-- required for color profiles -->
647
       </libs>
648
    </link>
649
  </target>
650
651
652
  <!--
653
  ########################################################################
654
  ## T A R G E T    :    D I S T B A S E
655
  ########################################################################
656
  -->
657
  <target name="distbase" depends="i18n"
658
      description="generate the distribution directory with all needed files">
659
660
    <!-- Create the distribution directory -->
661
    <copy todir="${dist}" file="AUTHORS"/>
662
    <copy todir="${dist}" file="COPYING"/>
663
    <copy todir="${dist}" file="COPYING.LIB"/>
664
    <copy todir="${dist}" file="NEWS"/>
665
    <copy todir="${dist}" file="README"/>
666
    <copy todir="${dist}" file="TRANSLATORS"/>
667
    <copy todir="${dist}" file="${devlibs}/bin/libatkmm-1.6-1.dll"/>
668
    <copy todir="${dist}" file="${devlibs}/bin/libglibmm-2.4-1.dll"/>
669
    <copy todir="${dist}" file="${devlibs}/bin/libgiomm-2.4-1.dll"/>
670
    <copy todir="${dist}" file="${devlibs}/bin/libgtkmm-2.4-1.dll"/>
671
    <copy todir="${dist}" file="${devlibs}/bin/libgdkmm-2.4-1.dll"/>
672
    <copy todir="${dist}" file="${devlibs}/bin/libpangomm-1.4-1.dll"/>
673
    <copy todir="${dist}" file="${devlibs}/bin/libcairomm-1.0-1.dll"/>
674
    <copy todir="${dist}" file="${devlibs}/bin/libsigc-2.0-0.dll"/>
675
    <copy todir="${dist}" file="${devlibs}/bin/libfreetype-6.dll"/>
676
677
<copy todir="${dist}" file="${devlibs}/bin/libffi-6.dll"/>
678
<copy todir="${dist}" file="${devlibs}/bin/libgc-1.dll"/>
679
<copy todir="${dist}" file="${devlibs}/bin/libgsl-0.dll"/>
680
<copy todir="${dist}" file="${devlibs}/bin/libgslcblas-0.dll"/>
681
<copy todir="${dist}" file="${devlibs}/bin/libharfbuzz-0.dll"/>
682
<copy todir="${dist}" file="${devlibs}/bin/liblzma-5.dll"/>
683
13403 by Johan B. C. Engelen
win64: add aspell and stand-alone gdb to builds. (x64 version should now be feature complete)
684
    <copy todir="${dist}" file="${devlibs}/bin/libaspell-15.dll"/>
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
685
    <copy todir="${dist}" file="${devlibs}/bin/libatk-1.0-0.dll"/>
686
    <copy todir="${dist}" file="${devlibs}/bin/libgdk-win32-2.0-0.dll"/>
687
    <copy todir="${dist}" file="${devlibs}/bin/libgdk_pixbuf-2.0-0.dll"/>
688
    <copy todir="${dist}" file="${devlibs}/bin/libglib-2.0-0.dll"/>
689
    <copy todir="${dist}" file="${devlibs}/bin/libgmodule-2.0-0.dll"/>
690
    <copy todir="${dist}" file="${devlibs}/bin/libgobject-2.0-0.dll"/>
691
    <copy todir="${dist}" file="${devlibs}/bin/libgtk-win32-2.0-0.dll"/>
692
    <copy todir="${dist}" file="${devlibs}/bin/libgthread-2.0-0.dll"/>
693
    <copy todir="${dist}" file="${devlibs}/bin/libgio-2.0-0.dll"/>
694
    <copy todir="${dist}" file="${devlibs}/bin/libcairo-2.dll"/>
695
    <copy todir="${dist}" file="${devlibs}/bin/libpixman-1-0.dll"/>
696
    <copy todir="${dist}" file="${devlibs}/bin/libpoppler-43.dll"/>
697
    <copy todir="${dist}" file="${devlibs}/bin/libpoppler-glib-8.dll"/>
698
    <copy todir="${dist}" file="${devlibs}/bin/libpangocairo-1.0-0.dll"/>
699
    <copy todir="${dist}" file="${devlibs}/bin/libpango-1.0-0.dll"/>
700
    <copy todir="${dist}" file="${devlibs}/bin/libpangoft2-1.0-0.dll"/>
701
    <copy todir="${dist}" file="${devlibs}/bin/libpangowin32-1.0-0.dll"/>
702
    <copy todir="${dist}" file="${devlibs}/bin/libfontconfig-1.dll"/>
703
    <copy todir="${dist}" file="${devlibs}/bin/libxml2-2.dll"/>
704
    <copy todir="${dist}" file="${devlibs}/bin/libxslt-1.dll"/>
705
    <copy todir="${dist}" file="${devlibs}/bin/libexslt-0.dll"/>
13391 by Johan B. C. Engelen
add libwpg, libvisio, and libcdr to win64 build
706
    <!-- <copy todir="${dist}" file="${devlibs}/bin/libexpat-1.dll"/> -->
707
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
708
    <copy todir="${dist}" file="${devlibs}/bin/libwpg-0.2.dll"/>
709
    <copy todir="${dist}" file="${devlibs}/bin/libwpd-0.9.dll"/>
710
    <copy todir="${dist}" file="${devlibs}/bin/libwpd-stream-0.9.dll"/>
711
    <copy todir="${dist}" file="${devlibs}/bin/libvisio-0.0.dll"/>
712
    <copy todir="${dist}" file="${devlibs}/bin/libcdr-0.0.dll"/>
13391 by Johan B. C. Engelen
add libwpg, libvisio, and libcdr to win64 build
713
    <copy todir="${dist}" file="${devlibs}/bin/icuin53.dll"/>
714
    <copy todir="${dist}" file="${devlibs}/bin/icudt53.dll"/>
715
    <copy todir="${dist}" file="${devlibs}/bin/icuuc53.dll"/>
716
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
717
    <copy todir="${dist}" file="${devlibs}/bin/libjpeg-9.dll"/>
718
    <copy todir="${dist}" file="${devlibs}/bin/libpng16-16.dll"/>
719
    <copy todir="${dist}" file="${devlibs}/bin/libtiff-5.dll"/>
720
    <copy todir="${dist}" file="${devlibs}/bin/libexif-12.dll"/>
721
<!--    
722
    <copy todir="${dist}" file="${devlibs}/bin/libopenjpeg-2.dll"/>
723
  -->
724
    <copy todir="${dist}" file="${devlibs}/bin/msvcr70.dll"/>
725
    <copy todir="${dist}" file="${devlibs}/bin/msvcr71.dll"/>
726
    <copy todir="${dist}" file="${devlibs}/bin/zlib1.dll"/>
727
    <copy todir="${dist}" file="${devlibs}/bin/bz2-1.dll"/>
728
    <copy todir="${dist}" file="${devlibs}/bin/libiconv-2.dll"/>
729
    <copy todir="${dist}" file="${devlibs}/bin/libpopt-0.dll"/>
730
    <copy todir="${dist}" file="${devlibs}/bin/liblcms2-2.dll"/>
731
    <copy todir="${dist}" file="${devlibs}/bin/libMagick++-6.Q16-3.dll"/>
732
    <copy todir="${dist}" file="${devlibs}/bin/libMagickCore-6.Q16-2.dll"/>
733
    <copy todir="${dist}" file="${devlibs}/bin/libMagickWand-6.Q16-2.dll"/>
734
    <copy todir="${dist}" file="${devlibs}/bin/libintl-8.dll"/>
735
    <!-- MINGW support DLLs -->
736
    <copy todir="${dist}" file="${mingw_bin}/libstdc++-6.dll"/>
737
    <copy todir="${dist}" file="${mingw_bin}/libwinpthread-1.dll"/>
738
    <copy todir="${dist}" file="${mingw_bin}/libgcc_s_sjlj-1.dll"/>
739
    <!-- MINGW support DLLs needed for openmp support  -->
740
    <copy todir="${dist}" file="${mingw_bin}/libgomp-1.dll"/>
741
742
    <!-- MSGFMT files -->
743
    <copy todir="${dist}">
744
        <fileset dir="${build}/locale">
745
          <exclude name=".*\.am"/>
746
        </fileset>
747
    </copy>
748
749
    <mkdir dir="${dist}/data"/>
750
    <mkdir dir="${dist}/locale"/>
751
    <mkdir dir="${dist}/modules"/>
752
    <mkdir dir="${dist}/plugins"/>
753
754
    <!-- GTK -->
755
    <copy todir="${dist}">     <fileset dir="${devlibs}/etc"/> </copy>
756
    <copy todir="${dist}/lib"> <fileset dir="${devlibs}/lib/gtk-2.0"/> </copy>
757
    <copy todir="${dist}/lib"> <fileset dir="${devlibs}/lib/glib-2.0"/> </copy>
758
    <copy todir="${dist}">
759
        <fileset dir="share">
760
          <exclude name=".*\.am"/>
761
          <exclude name=".*\.in"/>
762
          <exclude name=".*\.sh"/>
763
        </fileset>
764
    </copy>
765
    <!-- Quick fix for the following problem: having the hicolor folder there with empty index file bugs booting inkscape... -->
766
    <delete dir="${dist}/share/icons/hicolor"/>
767
768
    <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/locale"/> </copy>
769
    <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/themes"/> </copy>
770
    <copy todir="${dist}/lib">
771
        <fileset dir="${devlibs}/lib/gdk-pixbuf-2.0">
772
          <exclude name=".*\.la"/>
773
          <exclude name=".*\.dll.a"/>
774
        </fileset>
775
    </copy>
776
<!--    <copy todir="${dist}/share"> <fileset dir="${devlibs}/share/poppler"/> </copy> -->
13403 by Johan B. C. Engelen
win64: add aspell and stand-alone gdb to builds. (x64 version should now be feature complete)
777
    <copy todir="${dist}" file="${devlibs}/bin/gdb.exe"/>
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
778
779
    <!-- Aspell dictionaries -->
13403 by Johan B. C. Engelen
win64: add aspell and stand-alone gdb to builds. (x64 version should now be feature complete)
780
    <copy todir="${dist}/lib"> <fileset dir="${devlibs}/lib/aspell-0.60"/> </copy>
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
781
782
    <!-- Necessary to run extensions on windows if it is not in the path -->
783
    <copy todir="${dist}" file="${devlibs}/bin/gspawn-win64-helper.exe"/>
784
    <copy todir="${dist}" file="${devlibs}/bin/gspawn-win64-helper-console.exe"/>
785
786
    <!-- PERL -->
787
    <copy todir="${dist}" file="${devlibs}/perl/bin/perl58.dll"/>
788
789
    <!-- PYTHON -->
790
    <copy todir="${dist}" file="${devlibs}/python/python26.dll"/>
791
    <copy todir="${dist}/python" file="${devlibs}/python/python.exe" />
792
    <copy todir="${dist}/python" file="${devlibs}/python/pythonw.exe"/>
793
    <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/Lib"/> </copy>
794
    <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/DLLs"/> </copy>
795
    <!-- <copy todir="${dist}/python"> <fileset dir="${devlibs}/python/Scripts"/> </copy> -->
796
797
    <!--<copy file="${devlibs}/share/themes/MS-Windows/gtk-2.0/gtkrc" todir="${dist}/etc/gtk-2.0"/>-->
798
    <makefile file="${dist}/etc/gtk-2.0/gtkrc">
799
    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"
800
    gtk-toolbar-icon-size = small-toolbar
801
802
    # disable images in buttons. i've only seen ugly delphi apps use this feature.
803
    gtk-button-images = 0
804
    
805
    # disable the annoying beep in editable controls
806
    gtk-error-bell = 0
807
808
    # enable/disable images in menus. most "stock" microsoft apps don't use these, except sparingly.
809
    # the office apps use them heavily, though.
810
    gtk-menu-images = 1
811
812
    # use the win32 button ordering instead of the GNOME HIG one, where applicable
813
    gtk-alternative-button-order = 1
814
815
    style "msw-default"
816
    {
817
      GtkWidget::interior-focus = 1
818
      GtkOptionMenu::indicator-size = { 9, 5 }
819
      GtkOptionMenu::indicator-spacing = { 7, 5, 2, 2 }
820
      GtkSpinButton::shadow-type = in
821
822
      # Owen and I disagree that these should be themable
823
      #GtkUIManager::add-tearoffs = 0
824
      #GtkComboBox::add-tearoffs = 0
825
826
      GtkComboBox::appears-as-list = 1
827
      GtkComboBox::focus-on-click = 0
828
829
      GOComboBox::add_tearoffs = 0
830
831
      GtkTreeView::allow-rules = 0
832
      GtkTreeView::expander-size = 12
833
834
      GtkExpander::expander-size = 12
835
836
      GtkScrolledWindow::scrollbar_spacing = 1
837
838
      GtkSeparatorMenuItem::horizontal-padding = 2
839
840
      engine "wimp"
841
      {
842
      }
843
    }
844
    class "*" style "msw-default"
845
    </makefile>
846
847
  </target>
848
849
850
  <!--
851
  ########################################################################
852
  ## T A R G E T    :    D I S T - I N K S C A P E
853
  ########################################################################
854
  -->
855
  <target name="dist-inkscape" depends="link,linkconsole,distbase"
856
      description="copy inkscape to the distribution directory">
857
858
    <!-- Create the distribution directory -->
859
    <copy todir="${dist}" file="${build}/inkscape.exe"/>
860
    <copy todir="${dist}" file="${build}/inkscape.dbg"/>
861
    <copy file="${build}/inkscape-console.exe" tofile="${dist}/inkscape.com"/>
862
  </target>
863
864
865
  <!--
866
  ########################################################################
867
  ## T A R G E T    :    D I S T - I N K V I E W
868
  ########################################################################
869
  -->
870
  <target name="dist-inkview" depends="linkinkview,distbase"
871
      description="copy inkview to the distribution directory">
872
873
    <!-- Create the distribution directory -->
874
    <copy todir="${dist}" file="${build}/inkview.exe"/>
875
    <copy todir="${dist}" file="${build}/inkview.dbg"/>
876
  </target>
877
878
879
  <!--
880
  ########################################################################
881
  ## T A R G E T    :    C H E C K
882
  ########################################################################
883
  -->
884
  <target name="check" depends="linkcxxtests,distbase"
885
      description="perform unit tests">
13738 by Johan B. C. Engelen
Win64: complimentary to rev13689, fix cxxtests on 64bit windows
886
    <copy todir="${dist}" file="${build}/cxxtests.exe"/>
887
    <cxxtestrun command="${dist}/cxxtests" workingdir="${dist}" />
13381 by Johan B. C. Engelen
add 64bit build-x64.xml to trunk
888
  </target>
889
890
  <!--
891
  ########################################################################
892
  ## T A R G E T    :    D I S T - A L L
893
  ########################################################################
894
  -->
895
  <target name="dist-all" depends="dist-inkscape,dist-inkview"
896
        description="generate the distribution, along with inkview" >
897
  </target>
898
899
900
901
902
  <!--
903
  ########################################################################
904
  ## T A R G E T    :    D I S T - A L L - C H E C K
905
  ########################################################################
906
  -->
907
  <target name="dist-all-check" depends="dist-all,check"
908
        description="generate the distribution, along with inkview and run cxxtests" >
909
  </target>
910
911
912
913
914
915
  <!--
916
  ########################################################################
917
  ## T A R G E T    :    C L E A N
918
  ########################################################################
919
  -->
920
  <target name="clean"
921
        description="clean up.  deleting build and distro dirs" >
922
923
    <delete dir="${build}"/>
924
    <delete dir="${dist}"/>
925
    <delete file="build.dep"/>
926
    <delete file="config.h"/>
927
    <delete file="${src}/inkscape-version.cpp"/>
928
    <delete file="${src}/test-main.cpp"/>
929
    <delete file="${src}/test-src.cpp"/>
930
    <delete file="${src}/display/test-display.cpp"/>
931
    <delete file="${src}/helper/test-helper.cpp"/>
932
    <delete file="${src}/svg/test-svg.cpp"/>
933
    <delete file="${src}/util/test-util.cpp"/>
934
    <delete file="${src}/xml/test-xml.cpp"/>
935
936
  </target>
937
938
939
940
</project>
941
<!--
942
########################################################################
943
## E N D
944
########################################################################
945
-->
946