-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
765 lines (708 loc) · 28.6 KB
/
build.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
<project name="freemind" default="dist" basedir=".">
<!-- read version number from java source: -->
<loadfile property="ver" srcfile="freemind/main/FreeMind.java">
<filterchain>
<tokenfilter>
<filetokenizer/>
<replaceregex pattern='.*new VersionInformation\("(.*?)".*' replace="\1" flags="s" />
</tokenfilter>
<!-- Replace spaces by underscores. -->
<tokenfilter><replaceregex pattern=" " replace="_" flags="g"/></tokenfilter>
</filterchain>
</loadfile>
<property name="freemind.buildnumber.file" value="version.properties"/>
<property name="freemind.installer_year" value="2009"/>
<property name="src" location="."/>
<property name="src_base_for_post" location="../" />
<property name="build" location="../bin/classes" />
<property name="testbuild" location="../bin/testclasses" />
<property name="acc_build" location="accessories/plugins/build.xml" />
<property name="dist" location="../bin/dist" />
<property name="dist.lib" location="${dist}/lib" />
<property name="dist_macos_name" value="FreeMind_${ver}" />
<property name="dist_macos_base" location="../bin/dist_macos" />
<property name="dist_macos" location="${dist_macos_base}/${dist_macos_name}" />
<property name="dist_macos_app_name" value="FreeMind.app" />
<property name="dist_macos_app" location="${dist_macos}/${dist_macos_app_name}"/>
<property name="dist_macos_contents" location="${dist_macos_app}/Contents"/>
<property name="dist_macos_info" location="${dist_macos_contents}/Info.plist"/>
<property name="icns_extension" value="Modern"/>
<property name="FM.jar" location="${dist.lib}/freemind.jar"/>
<property name="test.reports" location="../bin/reports/" />
<property name="post" location="../post" />
<property name="debug" value="on" />
<property name="java_source_version" value="1.4" />
<property name="java_target_version" value="1.4" />
<property name="build.compiler" value="modern" />
<property name="appbundler.jar" value = "appbundler-1.0.jar"/>
<!-- begin generator part -->
<property name="jibxhome" location="lib/jibx"/>
<property name="jibxjar" location="lib/bindings.jar"/>
<property name="jibxruntimelibs" value="${jibxhome}/jibx-run.jar:${jibxhome}/xpp3.jar"/>
<property name="jibxlibs" value="${jibxhome}/bcel.jar:${jibxhome}/jibx-bind.jar:${jibxhome}/jibx-extras.jar:${jibxruntimelibs}"/>
<taskdef name="bind" classname="org.jibx.binding.ant.CompileTask">
<classpath path="${jibxlibs}"/>
<classpath location="binding/classes"/>
</taskdef>
<property name="formsLib" location="lib/forms-1.0.5.jar:lib/SimplyHTML/SimplyHTML.jar"/>
<property name="simplyHtml" location="lib/SimplyHTML/SimplyHTML.jar"/>
<property name="spellLib" location="lib/jortho.jar"/>
<property name="xsltLib" location="lib/xalan.jar"/>
<property name="xsltLib2" location="lib/serializer.jar"/>
<property name="xsltLib3" location="lib/xml-apis.jar"/>
<property name="xsltLib4" location="lib/xercesImpl.jar"/>
<property name="classpath" value="${jibxruntimelibs}:${jibxjar}:${formsLib}:${simplyHtml}:${spellLib}:${xsltLib}:${xsltLib2}:${xsltLib3}:${xsltLib4}"/>
<path id="jars.path">
<fileset dir="${src}">
<include name="**/*.jar" />
</fileset>
</path>
<target name="xmlbind.checkStatusOfGeneration">
<uptodate property="xmlbind.isUpToDate"
srcfile="freemind_actions.xsd"
targetfile="${jibxjar}"/>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: init
- - - - - - - - - - - - - - - - - -->
<target name="init">
<buildnumber file="${freemind.buildnumber.file}"/>
<loadproperties srcfile="${freemind.buildnumber.file}"></loadproperties>
<property name="version" value="${ver}_${build.number}"/>
<property environment="env" />
<echo>FreeMind Version = ${ver}, build ${build.number}.</echo>
<echo>Checking for duplicate Resource strings</echo>
<exec os="Linux" executable="${src}/check_for_duplicate_resources.sh"></exec>
</target>
<!-- =================================
target: gen
================================= -->
<target name="gen" depends="xmlbind.checkStatusOfGeneration" description="--> Generates the JixB binding jar." unless="xmlbind.isUpToDate">
<mkdir dir="binding" />
<mkdir dir="binding/src" />
<mkdir dir="binding/run" />
<mkdir dir="binding/classes" />
<javac includeantruntime="false" destdir="binding/run"
srcdir="${src}"
classpath="${classpath}"
debug="${debug}"
source="${java_source_version}"
target="${java_target_version}">
<include name="de/foltin/**" />
</javac>
<java fork="true" classpath="binding/run" classname="de.foltin.CompileXsdStart"></java>
<delete dir="binding/run" quiet="true"/>
<!-- Special file for String encoding. -->
<mkdir dir="binding/src/de/foltin"/>
<copy todir="binding/src/de/foltin" file="${src}/de/foltin/StringEncoder.java"/>
<javac includeantruntime="false" srcdir="binding/src" destdir="binding/classes" source="${java_source_version}" target="${java_target_version}" debug="on" />
<echo message="Running binding compiler..." />
<bind verbose="false" load="true">
<bindingfileset dir="binding/src">
<include name="**/*.xml" />
</bindingfileset>
<classpathset dir="binding/classes" />
</bind>
<!-- jar the bindings -->
<jar destfile="${jibxjar}">
<fileset dir="binding/classes">
<include name="**/*.class" />
</fileset>
<fileset dir="binding/src">
<include name="**/*.java" />
<include name="**/*.xml" />
</fileset>
</jar>
<delete dir="binding">
</delete>
<delete failonerror="false" file="${src}/accessories/plugins/MacChanges.java" quiet="true"/>
<delete failonerror="false" file="${src}/accessories/plugins/MacChanges.xml" quiet="true"/>
</target>
<target name="patterns">
<xslt style="patterns_updater.xslt" in="patterns.xml" out="patterns_new.xml" force="true" />
</target>
<!-- end generator part -->
<target name="build" depends="init,gen">
<!-- Perform Mac Changes as a plugin. -->
<exec dir="${src}/accessories/plugins" executable="ln" os="Mac OS X">
<arg value="-s"/>
<arg value="MacChanges.java.not_here"/>
<arg value="MacChanges.java"/>
</exec>
<exec dir="${src}/accessories/plugins" executable="ln" os="Mac OS X">
<arg value="-s"/>
<arg value="MacChanges.xml.not_here"/>
<arg value="MacChanges.xml"/>
</exec>
<!-- end mac changes. -->
<mkdir dir="${build}"/>
<javac includeantruntime="false" srcdir="${src}"
destdir="${build}"
classpath="${classpath}"
debug="${debug}"
source="${java_source_version}"
target="${java_target_version}"
>
<exclude name="${gen.dir}/**" />
<exclude name="accessories/plugins/**" />
<!-- Currently, JUnit tests are only supported inside eclipse due to
classpath problems of the plugins. -->
<exclude name="tests/**" />
<exclude name="plugins/**" />
</javac>
<!-- Starter should work with java 1.1, too as it checks the java version.-->
<delete failonerror="false" file="${build}/freemind/main/FreeMindStarter.class"></delete>
<javac includeantruntime="false" srcdir="${src}" destdir="${build}" classpath="${classpath}" debug="${debug}" source="1.3" target="1.1">
<include name="freemind/main/FreeMindStarter.java"/>
</javac>
<ant antfile="${acc_build}" target="build"/>
<ant antfile="plugins/build.xml" target="build"/>
</target>
<target name="build_tests" depends="build">
<mkdir dir="${testbuild}"/>
<javac includeantruntime="false" srcdir="${src}"
destdir="${testbuild}"
debug="${debug}"
source="${java_source_version}"
target="${java_target_version}"
>
<classpath refid="jars.path"></classpath>
<exclude name="${gen.dir}/**" />
<exclude name="plugins/collaboration/jabber/**" />
</javac>
<copy todir="${testbuild}" file="${src}/freemind.properties"/>
</target>
<!-- =================================
target: test
================================= -->
<target name="test" depends="build_tests" description="Carries out all unit tests">
<delete dir="${test.reports}" />
<mkdir dir="${test.reports}" />
<junit printsummary="withOutAndErr" fork="yes" haltonfailure="no">
<classpath refid="jars.path"></classpath>
<classpath path="${testbuild}"></classpath>
<classpath path="${src}"></classpath>
<formatter type="xml" />
<batchtest todir="${test.reports}">
<fileset dir="${src}">
<include name="tests/**/AllTests.java" />
</fileset>
</batchtest>
</junit>
</target>
<target name="dist" depends="jar, browser">
<copy todir="${dist}">
<fileset dir="${src}">
<include name="freemind.bat"/>
<include name="freemindw.bat"/>
<include name="freemind.sh"/>
<include name="license"/>
<include name="patterns.xml"/>
<include name="dictionaries.properties"/>
<include name="dictionary_??.ortho"/>
</fileset>
</copy>
<chmod file="${dist}/freemind.sh" perm="u+rx"/>
<copy todir="${dist}">
<fileset dir="${src}/windows-launcher">
<include name="FreeMind.exe"/>
<include name="FreeMind64.exe"/>
</fileset>
</copy>
<mkdir dir="${dist}/doc" />
<copy todir="${dist}/doc">
<fileset dir="${src}/doc/">
<include name="freemind*.mm"/>
<include name="FM_Key_Mappings_Quick_Guide*.pdf"/>
<include name="FM_Key_Mappings_Quick_Guide*.odt"/>
</fileset>
</copy>
<mkdir dir="${dist}/accessories" />
<mkdir dir="${dist}/plugins" />
<copy todir="${dist}/accessories" >
<fileset dir="${src}/accessories" excludes="plugins" includes="*"/>
<!-- exclude jars too!
<fileset dir="${build}/accessories"/> -->
</copy>
<!-- third party libs -->
<mkdir dir="${dist.lib}" />
<copy todir="${dist.lib}">
<fileset dir="${src}/lib">
<include name="jortho.jar"/>
<include name="xalan.jar"/>
<include name="serializer.jar"/>
<include name="xml-apis.jar"/>
<include name="xercesImpl.jar"/>
<include name="forms-1.0.5.jar"/>
<include name="bindings.jar"/>
<include name="jibx/jibx-run.jar"/>
<include name="jibx/xpp3.jar"/>
<include name="SimplyHTML/gnu-regexp-1.1.4.jar"/>
<include name="SimplyHTML/SimplyHTML.jar"/>
<include name="SimplyHTML/SimplyHTMLHelp.jar"/>
<include name="SimplyHTML/jhall.jar"/>
</fileset>
</copy>
<ant antfile="${acc_build}" target="dist"/>
<ant antfile="plugins/build.xml" target="dist"/>
<!-- Mac OS X -->
<condition property="isMacOs">
<os family="mac"/>
</condition>
<antcall target="dist_icon"/>
<antcall target="dist_macos"/>
</target>
<target name="dist_icon">
<!-- <copy file="${src}/windows-launcher/Freemind_light_bulb.exe"
tofile="${dist}/Freemind.exe" overwrite="true"/> -->
</target>
<target name="dist_macos" if="isMacOs">
<delete dir="${dist_macos}" followsymlinks="false"/>
<mkdir dir="${dist_macos}"/>
<taskdef name="bundleapp"
classname="com.oracle.appbundler.AppBundlerTask"
classpath="${src}/lib/${appbundler.jar}" />
<bundleapp outputdirectory="${dist_macos}"
name="FreeMind"
displayname="FreeMind"
shortversion="${ver} (build: ${build.number})"
copyright="FreeMind ${ver} (build: ${build.number}) application (c) ${freemind.installer_year}"
icon="${src}/images/FreeMindWindowIcon${icns_extension}.icns"
identifier="freemind.main.FreeMind"
mainclassname="freemind.main.FreeMindStarter"
>
<runtime dir="${env.JAVA_HOME}"/>
<classpath dir="${dist}">
<include name="**/*.jar" />
<include name="." />
<exclude name="accessories/**" />
<exclude name="plugins/**" />
<exclude name="browser/**" />
<exclude name="**/freemindbrowser.jar" />
</classpath>
<option value="-Xms64m"/>
<option value="-Xmx512m"/>
<option value="-Xss8M"/>
<option value="-Dapple.laf.useScreenMenuBar=true"/>
</bundleapp>
<copy todir="${dist_macos_contents}/Resources">
<fileset dir="${src}/images">
<include name="FreeMindWindowIconModern-MM.icns"/>
</fileset>
</copy>
<copy todir="${dist_macos_contents}/Resources/Java">
<fileset dir="${dist}">
<include name="doc/*" />
<include name="dictionar*" />
</fileset>
</copy>
<!-- change freemind.properties -->
<copy todir="${dist_macos}" file="${src}/freemind.properties"/>
<replaceregexp byline="true" file="${dist_macos}/freemind.properties" match="^keystroke(.*)=(.*)\bcontrol\b" replace="keystroke\1=\2meta" flags="gim">
</replaceregexp>
<replaceregexp byline="true" file="${dist_macos}/freemind.properties" match="^keystroke(.*)=(.*)\binsert\b" replace="keystroke\1=\2TAB" flags="gim">
</replaceregexp>
<replaceregexp byline="true" file="${dist_macos}/freemind.properties" match="^#freemind.base.dir.*$" replace="freemind.base.dir=${dist_macos_app_name}" flags="gim">
</replaceregexp>
<!-- update jar -->
<jar file="${dist_macos_contents}/Java/freemind.jar" update="true">
<fileset dir="${dist_macos}">
<include name="freemind.properties"/>
</fileset>
<fileset dir="${dist}">
<include name="accessories/*" />
<include name="accessories/**/*" />
<include name="browser/**" />
</fileset>
</jar>
<delete file="${dist_macos}/freemind.properties"/>
<copy todir="${dist_macos_contents}/Java">
<fileset dir="${dist}">
<include name="plugins/*" />
<include name="plugins/**/*" />
</fileset>
</copy>
<!-- Associate Freemind with mm
-->
<xslt style="mac_file_association.xslt"
in ="${dist_macos_info}"
out="${dist_macos_info}2"/>
<move file="${dist_macos_info}2"
tofile="${dist_macos_info}"/>
<!-- Done. -->
</target>
<!-- installs the application directly on this mac. -->
<target name="install_macos" if="isMacOs" depends="dist">
<!-- Remove old application -->
<delete dir="/Applications/FreeMind.app" failonerror="off"/>
<exec dir="." executable="mv" os="Mac OS X">
<arg path="${dist_macos_app}"/>
<arg path="/Applications"/>
</exec>
</target>
<target name="post" depends="dist,browser">
<mkdir dir="${post}" />
<!-- <tar tarfile="${post}/freemind-bin.tar"
basedir="${dist}"
longfile="gnu"
excludes="doc/javadoc/,plugins/**" />
<gzip src="${post}/freemind-bin.tar"
zipfile="${post}/freemind-bin-${ver}.tar.gz" />
<tar tarfile="${post}/freemind-browser.tar"
longfile="gnu"
basedir="${dist}/browser" />
<gzip src="${post}/freemind-browser.tar"
zipfile="${post}/freemind-browser-${ver}.tar.gz" /> -->
<tar tarfile="${post}/freemind-src.tar"
longfile="gnu"
basedir="${src_base_for_post}"
includes="freemind/**,.classpath,.project" excludes="freemind/bin/**" />
<gzip src="${post}/freemind-src.tar"
zipfile="${post}/freemind-src-${ver}.tar.gz" />
<delete>
<fileset dir="${post}" includes="*.tar" />
</delete>
<zip destfile="${post}/freemind-bin-${ver}.zip"
basedir="${dist}"
excludes="doc/javadoc/,plugins/**" />
<!-- fc, 14.2.2005: new max export -->
<zip destfile="${post}/freemind-bin-max-${ver}.zip"
basedir="${dist}"
excludes="doc/javadoc/" />
<!-- <zip destfile="${post}/freemind-src-${ver}.zip"
basedir="${src_base_for_post}"
includes="freemind/**,.classpath,.project" /> -->
<zip destfile="${post}/freemind-browser-${ver}.zip"
basedir="${dist}/browser" />
<ant antfile="plugins/build.xml" target="post"/>
<antcall target="post_macos">
</antcall>
</target>
<target name="post_macos" if="isMacOs">
<copy todir="${dist_macos}" verbose="true">
<fileset dir="../admin/installer/mac/dmg/">
<include name=".VolumeIcon.icns"/>
</fileset>
<fileset dir="../admin/installer/mac/QuickLook/build/Debug/">
<include name="**"/>
</fileset>
</copy>
<chmod perm="ugo+rx" file="${dist_macos}/FreemindQL.qlgenerator/Contents/MacOS/FreemindQL" verbose="true"/>
<exec executable="cp">
<arg value="../admin/installer/mac/dmg/.DS_Store"/>
<arg value="${dist_macos}"/>
</exec>
<exec executable="ln">
<arg line="-s /Library/QuickLook"/>
<arg value="${dist_macos}"/>
</exec>
<exec executable="ln">
<arg line="-s /Applications"/>
<arg value="${dist_macos}"/>
</exec>
<!-- <delete file="${dist_macos_contents}/MacOS/JavaApplicationStub"/>
<exec executable="ln">
<arg line="-s /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub"/>
<arg value="${dist_macos_contents}/MacOS/JavaApplicationStub"/>
</exec> -->
<exec dir="." executable="zsh" os="Mac OS X">
<arg value="./mkdmg.sh"/>
<arg path="${dist_macos}"/>
</exec>
<exec dir="." executable="mv" os="Mac OS X">
<arg path="/tmp/${dist_macos_name} Archive.dmg"/>
<arg path="${post}/${dist_macos_name}.dmg"/>
</exec>
<exec executable="rm">
<arg value="${dist_macos}/QuickLook"/>
</exec>
<exec executable="rm">
<arg value="${dist_macos}/Applications"/>
</exec>
</target>
<target name="jar" depends="build">
<mkdir dir="${dist.lib}" />
<tempfile prefix="manifest" property="temp.manifest.file"/>
<manifest file="${temp.manifest.file}">
<attribute name="Built-By" value="${user.name}" />
<attribute name="Built-Number" value="${build.number}" />
<attribute name="Created-By" value="Joerg Mueller, Daniel Polansky, Christian Foltin, Dimitry Polivaev, and others." />
<attribute name="Main-Class" value="freemind.main.FreeMindStarter" />
<attribute name="Class-Path" value="freemind.jar .. commons-lang-2.0.jar forms-1.0.5.jar jibx/jibx-run.jar jibx/xpp3.jar jibx-run.jar xpp3.jar bindings.jar jortho.jar xalan.jar serializer.jar xml-apis.jar xercesImpl.jar SimplyHTML/gnu-regexp-1.1.4.jar gnu-regexp-1.1.4.jar SimplyHTML/SimplyHTML.jar SimplyHTML.jar"/>
</manifest>
<jar jarfile="${FM.jar}"
manifest="${temp.manifest.file}"
update="true">
<fileset dir="${build}">
<exclude name="accessories/**"/>
<exclude name="plugins/**"/>
<exclude name="**/*.jar"/>
</fileset>
<fileset dir="${src}">
<include name="images/*"/>
<include name="images/icons/*.png"/>
<include name="freemind.properties"/>
<include name="version.properties"/>
<include name="patterns.xml"/>
<include name="patterns_updater.xslt"/>
<include name="Resources*"/>
<include name="mindmap_menus.xml"/>
<include name="**/freemind_version_updater.xslt"/>
<include name="dictionar*"/>
</fileset>
</jar>
<delete file="${temp.manifest.file}" failonerror="false"/>
<ant antfile="${acc_build}" target="jar"/>
</target>
<target name="browser" depends="build">
<mkdir dir="${dist}/browser" />
<jar jarfile="${dist}/browser/freemindbrowser.jar" >
<fileset dir="${build}">
<include name="freemind/common/TextTranslator.class"/>
<include name="freemind/common/NamedObject.class"/>
<include name="freemind/view/*"/>
<include name="freemind/view/mindmapview/*"/>
<include name="freemind/view/mindmapview/attributeview/*"/>
<include name="freemind/main/*"/>
<include name="freemind/controller/*"/>
<include name="freemind/controller/filter/**"/>
<include name="freemind/extensions/*"/>
<include name="freemind/preferences/*"/>
<include name="freemind/preferences/layout/*"/>
<include name="freemind/modes/*"/>
<include name="freemind/modes/attributes/*"/>
<include name="freemind/modes/browsemode/*"/>
<include name="freemind/modes/common/**"/>
<include name="freemind/modes/viewmodes/*"/>
</fileset>
<fileset dir="${src}">
<include name="images/*"/>
<include name="images/icons/*.png"/>
<include name="*.properties"/>
<exclude name="Resources_*.properties"/>
<!-- <include name="*.xml"/>
<exclude name="build.xml"/> -->
<exclude name="images/*.svg"/>
<exclude name="images/splash.JPG"/>
<exclude name="images/Freemind_Splash_Butterfly_Modern.png"/>
<exclude name="images/FreeMindWindowIcon.icns"/>
</fileset>
<fileset dir="${src}">
<include name="Resources_en.properties"/>
</fileset>
</jar>
<copy todir="${dist}/browser" >
<fileset dir="${src}/html">
<include name="*.*html"/>
</fileset>
<fileset dir="${src}">
<include name="license*"/>
</fileset>
<fileset dir="${src}/doc">
<include name="freemind.mm"/>
</fileset>
</copy>
</target>
<target name="doc" depends="gen">
<mkdir dir="${dist}/doc/javadoc" />
<javadoc sourcepath="${src}"
destdir="${dist}/doc/javadoc"
breakiterator="yes"
classpath="${classpath}"
packagenames="freemind.*" />
</target>
<target name="clean">
<!-- Eclipse target: -->
<delete dir="bin/classes" quiet="true"/>
<delete dir="${build}" quiet="true"/>
<delete dir="${dist}" quiet="true"/>
<delete dir="${dist_macos_base}" quiet="true"/>
<delete dir="${gen.dir}" quiet="true"/>
<delete dir="${post}" quiet="true"/>
<delete file="${jibxjar}" quiet="true"/>
<delete>
<fileset defaultexcludes="no" dir="${src}" includes="**/*~"/>
</delete>
<delete file="${src}/accessories/plugins/MacChanges.java" quiet="true"/>
<delete file="${src}/accessories/plugins/MacChanges.xml" quiet="true"/>
</target>
<target name="run" depends="dist">
<!-- failonerror is false here, as we want to
make runWithoutPreferences safe. -->
<java classname="freemind.main.FreeMindStarter"
fork="yes"
dir="${dist}" failonerror="false">
<!-- <jvmarg value="-Djava.util.logging.config.file=logging.properties" /> -->
<classpath>
<!--<pathelement location="${dist}"/>-->
<pathelement location="${FM.jar}"/>
<pathelement location="${jibxjar}"/>
<pathelement location="${spellLib}"/>
<pathelement path="${jibxruntimelibs}"/>
</classpath>
</java>
</target>
<!-- =================================
target: runWithoutPreferences
================================= -->
<target name="runWithoutPreferences" description="Starts the application moving the current preferences temporarily away.">
<rename dest="${user.home}/.freemind_bak" src="${user.home}/.freemind"/>
<mkdir dir="${user.home}/.freemind"/>
<antcall target="run"></antcall>
<exec dir="${user.home}/.freemind" executable="cat" os="Linux" failifexecutionfails="no" failonerror="false">
<arg value="auto.properties"/>
</exec>
<delete dir="${user.home}/.freemind" failonerror="false"></delete>
<rename src="${user.home}/.freemind_bak" dest="${user.home}/.freemind" replace="yes"></rename>
</target>
<property name="log_file" location="${user.home}/.freemind/log.0"/>
<target name="runmac" depends="dist" description="Starts the application under Mac (using the open method).">
<move file="${log_file}" tofile="${log_file}.bak" failonerror="false"></move>
<exec dir="." executable="open" os="Mac OS X">
<arg path="${dist_macos_app}"/>
</exec>
<waitfor><available file="${log_file}"></available></waitfor>
<exec dir="." executable="tail" os="Mac OS X">
<arg line="-f ${log_file}"/>
</exec>
</target>
<!-- does not work!! -->
<target name="val">
<xmlvalidate lenient="false"
failonerror="no" warn="true" classname="org.apache.xerces.parsers.SAXParser"
classpath="plugins/svg/xerces_2_5_0.jar">
<fileset dir="." includes="**/*.mm"/>
<attribute name="http://apache.org/xml/features/validation/schema"
value="true"/>
<attribute name="http://xml.org/sax/features/namespaces" value="true"/>
<property
name="http://apache.org/xml/properties/schema/external-schemaLocation"
value="freemind.xsd"/>
</xmlvalidate>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: all
- - - - - - - - - - - - - - - - - -->
<target name="all">
<antcall target="post"></antcall>
</target>
<!-- =================================
target: installers for everybody
================================= -->
<target name="installers_all" depends="" description="--> Creates all installers.">
<property name="InnoSetup" location="D:/Programme/Inno Setup 5/ISCC.exe" />
<!--
<property name="InnoSetup" location="/home/foltin/.wine/drive_c/Programme/Inno Setup 5/ISCC.exe" />
-->
<property name="inst.dir" location="../tmp/fm_installer"/>
<property name="inst.dest.dir" location="../installers"/>
<delete dir="${inst.dest.dir}" failonerror="false"/>
<!--
<delete dir="${inst.dir}" failonerror="false"/>
-->
<mkdir dir="${inst.dest.dir}"/>
<mkdir dir="${inst.dir}"/>
<exec dir="." executable="git">
<arg value="clone"/>
<arg value="${gitRoot}"/>
<arg value="${inst.dir}/"/>
</exec>
<ant dir="${inst.dir}/freemind" target="clean" ></ant>
<ant dir="${inst.dir}/freemind" target="post" ></ant>
<copy todir="${inst.dest.dir}">
<fileset dir="${inst.dir}/post">
<include name="*"/>
</fileset>
</copy>
<exec dir="${inst.dir}/admin/installer/windows/" executable="${InnoSetup}" osfamily="Windows">
<arg value="Freemind.iss"/>
</exec>
<exec dir="${inst.dir}/admin/installer/windows/" executable="wine" os="Linux">
<arg value="${InnoSetup}"/>
<arg value="Freemind.iss"/>
</exec>
<copy todir="${inst.dest.dir}">
<fileset dir="${inst.dir}/admin/installer/windows/Output/">
<include name="*.exe"/>
</fileset>
</copy>
<!--
<delete dir="${inst.dir}" failonerror="false"/>
-->
</target>
<!-- - - - - - - - - - - - - - - - - -
target: create_windows_installer
- - - - - - - - - - - - - - - - - -->
<target name="create_windows_installer">
<ant dir="${inst.windows.installer}" target="${inst.windows.variant}"></ant>
<exec dir="${inst.windows.installer}" executable="wine" os="Linux">
<arg value="/home/foltin/.wine/drive_c/Programme/Inno Setup 5/ISCC.exe"/>
<arg value="Freemind.iss"/>
</exec>
<exec dir="${inst.windows.installer}" executable="wine" os="Mac OS X">
<arg value="/Users/foltin/.wine/drive_c/Programme/Inno Setup 5/ISCC.exe"/>
<arg value="Freemind.iss"/>
</exec>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: installers_chris_mac
- - - - - - - - - - - - - - - - - -->
<target name="installers_chris_mac">
<exec dir="." executable="ssh" os="Linux">
<arg value="foltin@${macName}"/>
<arg value="export JAVA_HOME=`/usr/libexec/java_home` ; cd /tmp ; rm -rf fm_installers ; mkdir fm_installers ; cd fm_installers ; /opt/local/bin/git clone ${gitRoot} .; cd freemind ; ant post"/>
</exec>
<exec dir="." executable="scp" os="Linux">
<arg value="foltin@${macName}:/tmp/fm_installers/post/*.dmg"/>
<arg value="${inst.dest.dir}/"/>
</exec>
</target>
<!-- =================================
target: installers, for Chris' computers
================================= -->
<target name="installers_chris" depends="" description="--> Creates all installers. This is a task that only works on Chris laptops. But it should be informative to others who want to build the installers">
<property name="gitRoot" value="git://git.code.sf.net/p/freemind/code"/>
<property name="macName" value="mahler.local"/>
<property name="inst.dir" location="/tmp/fm_installer"/>
<property name="inst.dest.dir" location="../installers"/>
<property name="inst.windows.installer" location="${inst.dir}/admin/installer/windows"/>
<mkdir dir="${inst.dest.dir}"/>
<delete dir="${inst.dir}" failonerror="false"/>
<mkdir dir="${inst.dir}"/>
<exec dir="." executable="git">
<arg value="clone"/>
<arg value="${gitRoot}"/>
<arg value="${inst.dir}/"/>
</exec>
<copy todir="${inst.dir}/freemind" file="${freemind.buildnumber.file}"></copy>
<ant dir="${inst.dir}/freemind" target="post" inheritall="false"></ant>
<copy todir="${inst.dest.dir}">
<fileset dir="${inst.dir}/post">
<include name="*"/>
</fileset>
</copy>
<copy todir="${inst.windows.installer}">
<fileset dir="../admin/installer/windows/">
<include name="jre_installer.exe"/>
<include name="jre/**"/>
</fileset>
</copy>
<property name="freemind.version" value="${ver}"/>
<antcall target="create_windows_installer">
<param name="inst.windows.variant" value="installer"/>
</antcall>
<antcall target="create_windows_installer">
<param name="inst.windows.variant" value="installer_min"/>
</antcall>
<antcall target="create_windows_installer">
<param name="inst.windows.variant" value="installer_java_installer_embedded"/>
</antcall>
<copy todir="${inst.dest.dir}">
<fileset dir="${inst.windows.installer}/Output/">
<include name="*.exe"/>
</fileset>
</copy>
<antcall target="installers_chris_mac"></antcall>
<delete dir="${inst.dir}" failonerror="false"/>
</target>
</project>