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