-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
1523 lines (1278 loc) · 62.7 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
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
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!-- Build BEAST 2. It is also used by Hudson BEAST_2 project. JUnit test is available for this build. -->
<project basedir="." default="build_jar_all_BEAST" name="BUILD_BEAST_2"
xmlns:fx="javafx:com.sun.javafx.tools.ant">
<description>
Build BEAST 2.
Also used by Hudson BEAST_2 project.
JUnit test is available for this build.
$Id: build_BEAST_2.xml $
</description>
<!-- set global properties for this build -->
<property name="beastapp" location="../BEAST.app"/>
<property name="src" location="${beastapp}/src"/>
<property name="build" location="${beastapp}/build" />
<property name="lib" location="${beastapp}/lib" />
<property name="doc" location="${beastapp}/doc" />
<property name="dist" location="${beastapp}/build/dist" />
<property name="test" location="${beastapp}/test" />
<property name="beast2" location="../beast2.7"/>
<property name="beast2lib" location="${beast2}/lib" />
<property name="beast2build" location="${beast2}/build" />
<property name="main_class_BEASTLauncher" value="beast.app.util.BeastLauncher" />
<property name="report" value="build/junitreport" />
<path id="classpath">
<fileset dir="${lib}" includes="jam.jar"/>
<fileset dir="${lib}/junit" includes="assertj-swing-junit-3.17.1.jar"/>
<fileset dir="${lib}/junit" includes="assertj-core-3.20.2.jar"/>
<fileset dir="${lib}/junit" includes="assertj-swing-3.17.1.jar"/>
<fileset dir="${beast2lib}" includes="beagle.jar"/>
<fileset dir="${beast2lib}" includes="colt.jar"/>
<fileset dir="${beast2lib}" includes="antlr-runtime-4.10.1.jar"/>
<fileset dir="${beast2lib}" includes="commons-math3-3.6.1.jar" />
<fileset dir="${beast2lib}/junit" includes="junit-platform-console-standalone-1.8.2.jar"/>
<path location="${beast2build}"/>
<path location="${build}"/>
</path>
<!-- start -->
<target name="init">
<echo message="${ant.project.name}: ${ant.file}" />
<available file="${beastapp}/version.xml" property="versionAvailable"/>
<fail unless="versionAvailable">
** Required file version.xml does not exist. **
</fail>
<!-- Read package name and version from xml file -->
<xmlproperty file="${beastapp}/version.xml" prefix="fromVersionFile" />
<property name="version" value="${fromVersionFile.package(version)}" />
<echo message="Version: ${version}" />
</target>
<target name="clean">
<delete dir="${build}" />
</target>
<!-- clean previous build, and then compile Java source code, and Juint test -->
<target name="build_all_BEAST" depends="clean,compile-all,junit" description="Clean and Build all run-time stuff">
</target>
<!-- clean previous build, compile Java source code, and Junit test, and make the beast.jar -->
<target name="build_jar_all_BEAST"
depends="clean,compile-all,junit,dist_all_BEAST"
description="Clean and Build all run-time stuff">
</target>
<!-- No JUnit Test, clean previous build, compile Java source code, and make the beast.jar -->
<target name="build_jar_all_BEAST_NoJUnitTest"
depends="clean,compile-all,dist_all_BEAST"
description="Clean and Build all run-time stuff">
</target>
<!-- compile Java source code -->
<target name="compile-all" depends="init,beast.app,test.beast">
<echo>Building BEAST.app</echo>
<echo message="Successfully compiled." />
</target>
<target name="beast.app" depends="init">
<mkdir dir="${beastapp}/build" />
<javac
srcdir="${beastapp}/src"
destdir="${build}"
classpathref="classpath"
fork="true"
memoryinitialsize="256m"
memorymaximumsize="1024m"
includeAntRuntime='false'>
<include name="beast/**/**" />
</javac>
<jar jarfile="${build}/dist/BEAST.app.jar">
<manifest>
<attribute name="Built-By" value="${user.name}" />
</manifest>
<fileset dir="${build}">
<include name="beast/app/**/*.class" />
<include name="beast/app/**/*.properties" />
<include name="beast/app/**/*.png" />
</fileset>
</jar>
<jar jarfile="${dist}/BEAST.app.src.jar">
<fileset dir="${beastapp}/src">
<include name="beast/app/**/*.java" />
</fileset>
</jar>
</target>
<target name="test.beast" depends="init">
<javac
srcdir="${beastapp}/test"
destdir="${build}"
classpathref="classpath"
fork="true"
memoryinitialsize="256m"
memorymaximumsize="1024m"
includeAntRuntime='false'>
<include name="test/**/**" />
</javac>
<jar jarfile="${build}/dist/test.beast.jar">
<manifest>
<attribute name="Built-By" value="${user.name}" />
</manifest>
<fileset dir="${build}">
<include name="test/beast/**/*.class" />
<include name="test/beast/**/*.properties" />
<include name="test/beast/**/*.png" />
</fileset>
</jar>
<jar jarfile="${dist}/beast.test.src.jar">
<fileset dir="${beastapp}/src">
<include name="test/**/*.java" />
</fileset>
</jar>
</target>
<!-- make the beast.jar -->
<target name="dist_all_BEAST" depends="compile-all" description="create BEAST jar">
<!-- create BEAST.app package -->
<mkdir dir="${release_dir}/package/beast.app/" />
<mkdir dir="${release_dir}/package/beast.app/lib" />
<copy file="${dist}/BEAST.app.src.jar" todir="${release_dir}/package/beast.app/"/>
<copy file="${dist}/BEAST.app.jar" todir="${release_dir}/package/beast.app/lib/"/>
<copy file="${beastapp}/version.xml" todir="${release_dir}/package/beast.app/"/>
<jar jarfile="${release_dir}/package/BEAST.app.package.v${version}.zip">
<fileset dir="${release_dir}/package/beast.app">
<include name="version.xml" />
<include name="lib/BEAST.app.jar" />
<include name="BEAST.app.src.jar" />
</fileset>
<fileset dir="${beastapp}">
<include name="templates/*.xml" />
<include name="examples/*.*" />
<include name="examples/nexus/*.*" />
</fileset>
</jar>
</target>
<!-- run beast.jar -->
<target name="run_BEAST">
<java jar="${dist}/beast.jar" fork="true" />
</target>
<!-- JUnit test -->
<target name="junit">
<pathconvert property="classpathProp" refid="classpath"/>
<echo>Classpath is ${classpathProp}</echo>
<java classpathref="classpath" classname="org.junit.platform.console.ConsoleLauncher" fork="true" failonerror="true">
<arg line="-p test.beast.base"/>
<arg line="-p test.beast.core"/>
<arg line="-p test.beast.evolution"/>
<arg line="-p test.beast.math"/>
<arg line="-p test.beast.statistic"/>
<arg line="-p test.beast.util"/>
<arg line="-N test.beast.util.XMLParserTest"/>
<arg line="--reports-dir build/junitreport"/>
</java>
<junitreport todir="build/junitreport">
<fileset dir="build/junitreport">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="build/junitreport"/>
</junitreport>
</target>
<target name="junitreport">
<junitreport todir="${report}">
<fileset dir="${report}" includes="*.xml" />
<report format="frames" todir="${report}" />
</junitreport>
<echo message="JUnit test report finished." />
</target>
<!-- Target for Travis-CI with non-zero exit status on test failure. -->
<target name="travis" depends="clean, compile-all, junit, junitb">
<fail if="junitfailed" message="One or more CORE BEAST tests failed."/>
<fail if="junitbfailed" message="One or more BEAUTI tests failed."/>
</target>
<!-- testing beauti gui-->
<target name="junitb">
<mkdir dir="${report}" />
<junit printsummary="yes" failureproperty="junitbfailed">
<!--showoutput='yes'-->
<classpath>
<path id="assertj.classpath">
<fileset dir="${lib}" includes="junit-4.8.2.jar"/>
<fileset dir="${lib}" includes="beagle.jar"/>
<fileset dir="${lib}" includes="jam.jar"/>
<fileset dir="${lib}" includes="colt.jar"/>
<fileset dir="${lib}" includes="fest.jar"/>
<fileset dir="${lib}" includes="antlr-runtime-4.10.1.jar"/>
<fileset dir="build/dist" includes="BEAST.base.jar" />
<fileset dir="build/dist" includes="BEAST.app.jar" />
<fileset dir="build/dist" includes="launcher.jar" />
<fileset dir="build/dist" includes="test.beast.jar" />
<fileset dir="${lib}" includes="assertj-swing-junit-3.17.1.jar"/>
<fileset dir="${lib}" includes="assertj-core-3.20.2.jar"/>
<fileset dir="${lib}" includes="assertj-swing-3.17.1.jar"/>
</path>
<!--
<path location="${build}" />
-->
</classpath>
<formatter type="xml" />
<batchtest fork="yes" todir="${report}">
<fileset dir="beast.app/test">
<include name="test/beast/app/beauti/**/*Test.java"/>
</fileset>
</batchtest>
</junit>
<echo message="JUnit test finished." />
</target>
<!-- Release -->
<!--
<property name="version" value="2.6.6" />
-->
<property name="release_dir" value="release" />
<property name="copyright" value="Beast 2 development team 2011-2022" />
<property name="BEAST_name" value="BEAST" />
<property name="beast_name" value="beast" />
<property name="BEAUti_name" value="BEAUti" />
<property name="TreeAnnotator_name" value="TreeAnnotator" />
<property name="LogCombiner_name" value="LogCombiner" />
<property name="LogAnalyser_name" value="LogAnalyser" />
<property name="AppLauncher_name" value="AppLauncher" />
<property name="common_dir" value="${release_dir}/common" />
<property name="Mac_dir" value="${release_dir}/Mac" />
<property name="Linux_dir" value="${release_dir}/Linux" />
<property name="Windows_dir" value="${release_dir}/Windows" />
<property name="beast1_dir" value="${common_dir}/beast1" />
<property name="tools_dir" value="${common_dir}/tools" />
<property name="Mac_package_dir" value="${Mac_dir}/${BEAST_name}" />
<property name="Mac_bundle_dir" value="${Mac_package_dir}/${BEAST_name}" />
<property name="Linux_package_dir" value="${Linux_dir}/${beast_name}" />
<property name="Windows_package_dir" value="${Windows_dir}/${BEAST_name}" />
<taskdef name="jsign" classname="net.jsign.JsignTask" classpath="${beast2}/lib/jsign-3.1.jar"/>
<!-- Need to either install Launch4j under {BEAST workspace}/${release}
or install it in the default directory and change the location of launch4j.dir -->
<!--depends="build_jar_all_BEAST_NoJUnitTest"-->
<target name="windows"
description="release Windows version of BEAST, BEAUTI, TreeAnnotator, LogCombiner">
<input message="Keystore password : " addproperty="storepass"><!-- same as UoA password --></input>
<delete dir="${Windows_package_dir}" />
<!-- Create the release directory -->
<mkdir dir="${Windows_package_dir}" />
<property name="launch4j.dir" location="../launch4j" />
<taskdef name="launch4j"
classname="net.sf.launch4j.ant.Launch4jTask"
classpath="${launch4j.dir}/launch4j.jar :${launch4j.dir}/lib/xstream.jar" />
<copy todir="${Windows_package_dir}/examples/">
<fileset dir="examples/">
<include name="*.xml" />
<include name="nexus/**" />
<exclude name="benchmark/**" />
</fileset>
</copy>
<mkdir dir="${Windows_package_dir}/bat" />
<copy todir="${Windows_package_dir}/bat/">
<fileset dir="${Windows_dir}/bat">
<include name="*.bat" />
</fileset>
</copy>
<!--<copy todir="${Windows_package_dir}/native">
<fileset dir="${common_dir}/native"/>
</copy>
<copy todir="${Windows_package_dir}/doc">
<fileset dir="${common_dir}/doc" />
</copy>
<copy todir="${Windows_package_dir}/bin">
<fileset dir="${Windows_dir}/scripts"/>
</copy>
-->
<copy file="${dist}/launcher.jar" todir="${Windows_package_dir}/lib" />
<copy file="${dist}/beast.jar" todir="${Windows_package_dir}/lib" />
<copy file="${dist}/beast.src.jar" todir="${Windows_package_dir}/lib" />
<!-- <copy file="${dist}/beast-beagle.jar" todir="${Windows_package_dir}/lib"/>
<copy todir="${Windows_package_dir}/lib">
<fileset dir="${Windows_dir}/lib"/>
</copy>-->
<copy file="${common_dir}/VERSION HISTORY.txt" todir="${Windows_package_dir}" />
<copy file="${common_dir}/README.txt" todir="${Windows_package_dir}" />
<copy file="${common_dir}/LICENSE.txt" todir="${Windows_package_dir}" />
<!-- BEAUTi v?.?.?.exe -->
<launch4j configFile="${Windows_dir}/BEAUti_launch4j.xml"
jar="${dist}/launcher.jar"
outfile="${Windows_package_dir}/${BEAUti_name}.exe"
fileVersion="${version}.0"
txtFileVersion="${version}"
productVersion="${version}.0"
txtProductVersion="${version}" >
<!-- to bunle a JRE, copy the desired JRE to folder ../jre
(so java.exe is in ../jre/bin/) and uncomment following fragment
TODO: needs testing
<jre>
<path>../jre</path>
</jre>
-->
</launch4j>
<jsign file="${Windows_package_dir}/${BEAUti_name}.exe"
name="BEAUti"
url="http://beast2.org"
keystore="keystore.pfx"
alias="http://beast2.org"
storepass="${storepass}"
tsaurl="http://timestamp.comodoca.com/authenticode"/>
<!-- BEAST v?.?.?.exe -->
<launch4j configFile="${Windows_dir}/BEAST_launch4j.xml"
jar="${dist}/launcher.jar"
outfile="${Windows_package_dir}/${BEAST_name}.exe"
fileVersion="${version}.0"
txtFileVersion="${version}"
productVersion="${version}.0"
txtProductVersion="${version}" />
<jsign file="${Windows_package_dir}/${BEAST_name}.exe"
name="BEAST"
url="http://beast2.org"
keystore="keystore.pfx"
alias="http://beast2.org"
storepass="${storepass}"
tsaurl="http://timestamp.comodoca.com/authenticode"/>
<!--<launch4j configFile="${Windows_dir}/TreeStat_launch4j.xml"
jar="${dist}/beast.jar"
outfile="${Windows_package_dir}/${TreeStat_name}.exe"
fileVersion="${version}.0"
txtFileVersion="${version}"
productVersion="${version}.0"
txtProductVersion="${version}"/>-->
<!-- LogAnalyser v?.?.?.exe
<launch4j configFile="${Windows_dir}/LogAnalyser_launch4j.xml"
jar="${dist}/beast.jar"
outfile="${Windows_package_dir}/${LogAnalyser_name}v${version}.exe"
fileVersion="${version}.0"
txtFileVersion="${version}"
productVersion="${version}.0"
txtProductVersion="${version}"/> -->
<launch4j configFile="${Windows_dir}/LogCombiner_launch4j.xml"
jar="${dist}/launcher.jar"
outfile="${Windows_package_dir}/${LogCombiner_name}.exe"
fileVersion="${version}.0"
txtFileVersion="${version}"
productVersion="${version}.0"
txtProductVersion="${version}"/>
<jsign file="${Windows_package_dir}/${LogCombiner_name}.exe"
name="LogCombiner"
url="http://beast2.org"
keystore="keystore.pfx"
alias="http://beast2.org"
storepass="${storepass}"
tsaurl="http://timestamp.comodoca.com/authenticode"/>
<launch4j configFile="${Windows_dir}/TreeAnnotator_launch4j.xml"
jar="${dist}/launcher.jar"
outfile="${Windows_package_dir}/TreeAnnotator.exe"
fileVersion="${version}.0"
txtFileVersion="${version}"
productVersion="${version}.0"
txtProductVersion="${version}"/>
<jsign file="${Windows_package_dir}/TreeAnnotator.exe"
name="TreeAnnotator"
url="http://beast2.org"
keystore="keystore.pfx"
alias="http://beast2.org"
storepass="${storepass}"
tsaurl="http://timestamp.comodoca.com/authenticode"/>
<launch4j configFile="${tools_dir}/DensiTree_launch4j.xml"
jar="${tools_dir}/DensiTree.jar"
outfile="${Windows_package_dir}/DensiTree.exe"
fileVersion="2.0.0.0"
txtFileVersion="2.0.0.0"
productVersion="2.0.0.0"
txtProductVersion="2.0.0.0" />
<jsign file="${Windows_package_dir}/DensiTree.exe"
name="DensiTree"
url="http://beast2.org"
keystore="keystore.pfx"
alias="http://beast2.org"
storepass="${storepass}"
tsaurl="http://timestamp.comodoca.com/authenticode"/>
<launch4j configFile="${Windows_dir}/AppLauncher_launch4j.xml"
jar="${dist}/launcher.jar"
outfile="${Windows_package_dir}/AppLauncher.exe"
fileVersion="${version}.0"
txtFileVersion="${version}"
productVersion="${version}.0"
txtProductVersion="${version}"/>
<jsign file="${Windows_package_dir}/AppLauncher.exe"
name="AppLauncher"
url="http://beast2.org"
keystore="keystore.pfx"
alias="http://beast2.org"
storepass="${storepass}"
tsaurl="http://timestamp.comodoca.com/authenticode"/>
<copy todir="${Windows_package_dir}/templates/">
<fileset dir="templates/" />
</copy>
<!--
<copy file="${beast1_dir}/LogCombiner.exe" todir="${Windows_package_dir}" />
<copy file="${beast1_dir}/TreeAnnotator.exe" todir="${Windows_package_dir}" />
-->
<zip destfile="${Windows_dir}/${BEAST_name}.v${version}.zip">
<zipfileset dir="${Windows_package_dir}" prefix="${BEAST_name}" />
</zip>
<copy file="${Windows_dir}/${BEAST_name}.v${version}.zip" todir="../../tmp/" />
<echo message="Windows version release is finished." />
</target>
<!-- Need to either install Launch4j under {BEAST workspace}/${release}
or install it in the default directory and change the location of launch4j.dir -->
<!--depends="build_jar_all_BEAST_NoJUnitTest"-->
<target name="windowsjre"
description="release Windows version of BEAST, BEAUTI, TreeAnnotator, LogCombiner">
<input message="Keystore password : " addproperty="storepass"><!-- same as UoA password --></input>
<delete dir="${Windows_package_dir}" />
<!-- Create the release directory -->
<mkdir dir="${Windows_package_dir}" />
<property name="launch4j.dir" location="../launch4j" />
<taskdef name="launch4j"
classname="net.sf.launch4j.ant.Launch4jTask"
classpath="${launch4j.dir}/launch4j.jar :${launch4j.dir}/lib/xstream.jar" />
<copy todir="${Windows_package_dir}/examples/">
<fileset dir="examples/">
<include name="*.xml" />
<include name="nexus/**" />
<exclude name="benchmark/**" />
</fileset>
</copy>
<copy todir="${Windows_package_dir}/jre">
<fileset dir="../jdk8u212-b04-jre" />
</copy>
<mkdir dir="${Windows_package_dir}/bat" />
<copy todir="${Windows_package_dir}/bat/">
<fileset dir="${Windows_dir}/bat">
<include name="*.bat" />
</fileset>
</copy>
<!--<copy todir="${Windows_package_dir}/native">
<fileset dir="${common_dir}/native"/>
</copy>
<copy todir="${Windows_package_dir}/doc">
<fileset dir="${common_dir}/doc" />
</copy>
<copy todir="${Windows_package_dir}/bin">
<fileset dir="${Windows_dir}/scripts"/>
</copy>
-->
<copy file="${dist}/launcher.jar" todir="${Windows_package_dir}/lib" />
<copy file="${dist}/beast.jar" todir="${Windows_package_dir}/lib" />
<copy file="${dist}/beast.src.jar" todir="${Windows_package_dir}/lib" />
<!-- <copy file="${dist}/beast-beagle.jar" todir="${Windows_package_dir}/lib"/>
<copy todir="${Windows_package_dir}/lib">
<fileset dir="${Windows_dir}/lib"/>
</copy>-->
<copy file="${common_dir}/VERSION HISTORY.txt" todir="${Windows_package_dir}" />
<copy file="${common_dir}/README.txt" todir="${Windows_package_dir}" />
<copy file="${common_dir}/LICENSE.txt" todir="${Windows_package_dir}" />
<!-- BEAUTi v?.?.?.exe -->
<launch4j configFile="${Windows_dir}/BEAUti_launch4j_jre.xml"
jar="${dist}/launcher.jar"
outfile="${Windows_package_dir}/${BEAUti_name}.exe"
fileVersion="${version}.0"
txtFileVersion="${version}"
productVersion="${version}.0"
txtProductVersion="${version}" >
<!-- to bunle a JRE, copy the desired JRE to folder ../jre
(so java.exe is in ../jre/bin/) and uncomment following fragment
TODO: needs testing
<jre>
<path>../jre</path>
</jre>
-->
</launch4j>
<jsign file="${Windows_package_dir}/${BEAUti_name}.exe"
name="BEAUti"
url="http://beast2.org"
keystore="keystore.pfx"
alias="http://beast2.org"
storepass="${storepass}"
tsaurl="http://timestamp.comodoca.com/authenticode"/>
<!-- BEAST v?.?.?.exe -->
<launch4j configFile="${Windows_dir}/BEAST_launch4j_jre.xml"
jar="${dist}/launcher.jar"
outfile="${Windows_package_dir}/${BEAST_name}.exe"
fileVersion="${version}.0"
txtFileVersion="${version}"
productVersion="${version}.0"
txtProductVersion="${version}" />
<jsign file="${Windows_package_dir}/${BEAST_name}.exe"
name="BEAST"
url="http://beast2.org"
keystore="keystore.pfx"
alias="http://beast2.org"
storepass="${storepass}"
tsaurl="http://timestamp.comodoca.com/authenticode"/>
<!--<launch4j configFile="${Windows_dir}/TreeStat_launch4j.xml"
jar="${dist}/beast.jar"
outfile="${Windows_package_dir}/${TreeStat_name}.exe"
fileVersion="${version}.0"
txtFileVersion="${version}"
productVersion="${version}.0"
txtProductVersion="${version}"/>-->
<!-- LogAnalyser v?.?.?.exe
<launch4j configFile="${Windows_dir}/LogAnalyser_launch4j_jre.xml"
jar="${dist}/beast.jar"
outfile="${Windows_package_dir}/${LogAnalyser_name}v${version}.exe"
fileVersion="${version}.0"
txtFileVersion="${version}"
productVersion="${version}.0"
txtProductVersion="${version}"/> -->
<launch4j configFile="${Windows_dir}/LogCombiner_launch4j_jre.xml"
jar="${dist}/launcher.jar"
outfile="${Windows_package_dir}/${LogCombiner_name}.exe"
fileVersion="${version}.0"
txtFileVersion="${version}"
productVersion="${version}.0"
txtProductVersion="${version}"/>
<jsign file="${Windows_package_dir}/${LogCombiner_name}.exe"
name="LogCombiner"
url="http://beast2.org"
keystore="keystore.pfx"
alias="http://beast2.org"
storepass="${storepass}"
tsaurl="http://timestamp.comodoca.com/authenticode"/>
<launch4j configFile="${Windows_dir}/TreeAnnotator_launch4j_jre.xml"
jar="${dist}/launcher.jar"
outfile="${Windows_package_dir}/TreeAnnotator.exe"
fileVersion="${version}.0"
txtFileVersion="${version}"
productVersion="${version}.0"
txtProductVersion="${version}"/>
<jsign file="${Windows_package_dir}/TreeAnnotator.exe"
name="TreeAnnotator"
url="http://beast2.org"
keystore="keystore.pfx"
alias="http://beast2.org"
storepass="${storepass}"
tsaurl="http://timestamp.comodoca.com/authenticode"/>
<launch4j configFile="${tools_dir}/DensiTree_launch4j_jre.xml"
jar="${tools_dir}/DensiTree.jar"
outfile="${Windows_package_dir}/DensiTree.exe"
fileVersion="2.0.0.0"
txtFileVersion="2.0.0.0"
productVersion="2.0.0.0"
txtProductVersion="2.0.0.0" />
<jsign file="${Windows_package_dir}/DensiTree.exe"
name="DensiTree"
url="http://beast2.org"
keystore="keystore.pfx"
alias="http://beast2.org"
storepass="${storepass}"
tsaurl="http://timestamp.comodoca.com/authenticode"/>
<launch4j configFile="${Windows_dir}/AppLauncher_launch4j_jre.xml"
jar="${dist}/launcher.jar"
outfile="${Windows_package_dir}/AppLauncher.exe"
fileVersion="${version}.0"
txtFileVersion="${version}"
productVersion="${version}.0"
txtProductVersion="${version}"/>
<jsign file="${Windows_package_dir}/AppLauncher.exe"
name="AppLauncher"
url="http://beast2.org"
keystore="keystore.pfx"
alias="http://beast2.org"
storepass="${storepass}"
tsaurl="http://timestamp.comodoca.com/authenticode"/>
<copy todir="${Windows_package_dir}/templates/">
<fileset dir="templates/" />
</copy>
<!--
<copy file="${beast1_dir}/LogCombiner.exe" todir="${Windows_package_dir}" />
<copy file="${beast1_dir}/TreeAnnotator.exe" todir="${Windows_package_dir}" />
-->
<zip destfile="${Windows_dir}/${BEAST_name}_with_JRE.v${version}.zip">
<zipfileset dir="${Windows_package_dir}" prefix="${BEAST_name}" />
</zip>
<copy file="${Windows_dir}/${BEAST_name}_with_JRE.v${version}.zip" todir="../../tmp/" />
<echo message="Windows version release is finished." />
</target>
<target name="linux"
depends="compile-all,dist_all_BEAST"
description="release Linux/Unix version of BEAST, BEAUTI, TreeAnnotator, LogCombiner">
<delete dir="${Linux_package_dir}" />
<!-- Create the release directory -->
<mkdir dir="${Linux_package_dir}" />
<copy todir="${Linux_package_dir}/bin">
<fileset dir="${Linux_dir}/bin" />
</copy>
<chmod dir="${Linux_package_dir}/bin" perm="755" includes="**/**" />
<copy todir="${Linux_package_dir}/examples/">
<fileset dir="${beast2}/beast.app/examples/">
<include name="*.xml" />
<include name="nexus/**" />
<exclude name="benchmark/**" />
</fileset>
</copy>
<copy file="${beast2}/beast.base/version.xml" tofile="${Linux_package_dir}/beast.base.version.xml" />
<copy file="${beast2}/beast.app/version.xml" tofile="${Linux_package_dir}/beast.app.version.xml" />
<copy file="${common_dir}/icons/beast.png" todir="${Linux_package_dir}/images" />
<copy file="${common_dir}/icons/beauti.png" todir="${Linux_package_dir}/images" />
<!-- <copy file="${common_dir}/icons/utility.png" todir="${Linux_package_dir}/images" />
-->
<copy file="${dist}/launcher.jar" todir="${Linux_package_dir}/lib" />
<copy file="${dist}/BEAST.base.jar" todir="${Linux_package_dir}/lib" />
<copy file="${dist}/BEAST.base.src.jar" todir="${Linux_package_dir}/lib" />
<copy file="${dist}/BEAST.app.jar" todir="${Linux_package_dir}/lib" />
<copy file="${dist}/BEAST.app.src.jar" todir="${Linux_package_dir}/lib" />
<!-- <copy file="${dist}/beast-beagle.jar" todir="${Linux_package_dir}/lib"/>
<copy todir="${Linux_package_dir}/lib">
<fileset dir="${Linux_dir}/lib" />
</copy>-->
<!--
<copy file="${beast1_dir}/beast161.jar" todir="${Linux_package_dir}/lib" />
<copy file="${tools_dir}/treeannotator.jar" todir="${Linux_package_dir}/lib" />
-->
<copy file="${tools_dir}/DensiTree.jar" todir="${Linux_package_dir}/lib" />
<copy file="${tools_dir}/DensiTree.png" todir="${Linux_package_dir}/images" />
<copy todir="${Linux_package_dir}/templates/">
<fileset dir="${beast2}/beast.app/templates/" />
</copy>
<copy file="${common_dir}/VERSION HISTORY.txt" todir="${Linux_package_dir}" />
<copy file="${common_dir}/README.txt" todir="${Linux_package_dir}" />
<copy file="${common_dir}/LICENSE.txt" todir="${Linux_package_dir}" />
<!-- Only works under Unix or NonStop Kernel (Tandem) -->
<!-- <chmod dir="${Linux_package_dir}/bin" perm="755" includes="**/**"/>
<tar destfile="${Linux_dir}/${BEAST_name}v${version}.tgz" compression="gzip">
<tarfileset dir="${Linux_package_dir}" prefix="${BEAST_name}v${version}"/>
</tar>-->
<!-- [ANT Bug 550] the tar task change the mode of the executables files, have to tar manaully -->
<echo message="Have to tar manaully, because [ANT Bug 550] the tar task change the mode of the executables files." />
<!-- tar -cvzf BEASTv1.x.x.tgz BEASTv2.x.x/ -->
<!-- cksum BEASTv2.x.x.tgz -->
<!-- tar -xvzf BEASTv2.x.x.tgz -->
<echo message="Linux/Unix version release is finished." />
<echo message="cd release/Linux"/>
<echo message="tar fcz BEAST.v${version}.tgz beast"/>
<echo message="cp BEAST.v${version}.tgz ~/tmp"/>
</target>
<!-- depends="build_jar_all_BEAST_NoJUnitTest"-->
<target name="linuxjre"
description="release Linux/Unix version of BEAST, BEAUTI, TreeAnnotator, LogCombiner">
<delete dir="${Linux_package_dir}" />
<!-- Create the release directory -->
<mkdir dir="${Linux_package_dir}" />
<copy todir="${Linux_package_dir}/bin">
<fileset dir="${Linux_dir}/jrebin" />
</copy>
<chmod dir="${Linux_package_dir}/bin" perm="755" includes="**/**" />
<exec executable="cp">
<arg line="-R ../jdk8u282-b08-jre ${Linux_package_dir}/jre1.8.0_282"/>
</exec>
<!--<copy todir="${Linux_package_dir}/doc">
<fileset dir="${common_dir}/doc" />
</copy>-->
<copy todir="${Linux_package_dir}/examples/">
<fileset dir="examples/">
<include name="*.xml" />
<include name="nexus/**" />
<exclude name="benchmark/**" />
</fileset>
</copy>
<copy file="${common_dir}/icons/beast.png" todir="${Linux_package_dir}/images" />
<copy file="${common_dir}/icons/beauti.png" todir="${Linux_package_dir}/images" />
<!-- <copy file="${common_dir}/icons/utility.png" todir="${Linux_package_dir}/images" />
-->
<copy file="${dist}/launcher.jar" todir="${Linux_package_dir}/lib" />
<copy file="${dist}/beast.jar" todir="${Linux_package_dir}/lib" />
<copy file="${dist}/beast.src.jar" todir="${Linux_package_dir}/lib" />
<!-- <copy file="${dist}/beast-beagle.jar" todir="${Linux_package_dir}/lib"/>
<copy todir="${Linux_package_dir}/lib">
<fileset dir="${Linux_dir}/lib" />
</copy>-->
<!--
<copy file="${beast1_dir}/beast161.jar" todir="${Linux_package_dir}/lib" />
<copy file="${tools_dir}/treeannotator.jar" todir="${Linux_package_dir}/lib" />
-->
<copy file="${tools_dir}/DensiTree.jar" todir="${Linux_package_dir}/lib" />
<copy file="${tools_dir}/DensiTree.png" todir="${Linux_package_dir}/images" />
<copy todir="${Linux_package_dir}/templates/">
<fileset dir="templates/" />
</copy>
<copy file="${common_dir}/VERSION HISTORY.txt" todir="${Linux_package_dir}" />
<copy file="${common_dir}/README.txt" todir="${Linux_package_dir}" />
<copy file="${common_dir}/LICENSE.txt" todir="${Linux_package_dir}" />
<!-- Only works under Unix or NonStop Kernel (Tandem) -->
<!-- <chmod dir="${Linux_package_dir}/bin" perm="755" includes="**/**"/>
<tar destfile="${Linux_dir}/${BEAST_name}v${version}.tgz" compression="gzip">
<tarfileset dir="${Linux_package_dir}" prefix="${BEAST_name}v${version}"/>
</tar>-->
<!-- [ANT Bug 550] the tar task change the mode of the executables files, have to tar manaully -->
<echo message="Have to tar manaully, because [ANT Bug 550] the tar task change the mode of the executables files." />
<!-- tar -cvzf BEASTv1.x.x.tgz BEASTv2.x.x/ -->
<!-- cksum BEASTv2.x.x.tgz -->
<!-- tar -xvzf BEASTv2.x.x.tgz -->
<echo message="Linux/Unix version release is finished." />
<echo message="cd release/Linux"/>
<echo message="tar fcz BEAST.v${version}.tgz beast"/>
<echo message="cp BEAST.v${version}.tgz ~/tmp"/>
</target>
<!-- Define the appbundler task -->
<!-- <taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpath="${beast2}/lib/bundler/appbundler-1.0.jar"/>-->
<taskdef name="jarbundler" classname="com.ultramixer.jarbundler.JarBundler" classpath="${beast2}/lib/bundler/jarbundler-core-3.3.0.jar"/>
<!--property name="AppleSigner" value="Developer ID Application: Alexei Drummond (6M6Y6L7RUP)" /-->
<!--<property name="AppleSigner" value="Developer ID Application: Remco Bouckaert (LHFJWE5U63)" />-->
<property name="AppleSigner" value="Developer ID Application: Walter Xie (27V5YMX65C)" />
<property name="jvm_version" value="1.8+"/>
<!-- Create the app bundle -->
<target name="bundle">
<copy file="${dist}/launcher.jar" todir="${Mac_package_dir}/lib" />
<copy file="${dist}/beast.jar" todir="${Mac_package_dir}/lib" />
<copy file="${dist}/beast.src.jar" todir="${Mac_package_dir}/lib" />
<!-- <copy file="${dist}/beast-beagle.jar" todir="${Mac_package_dir}/lib"/>
<copy todir="${Mac_package_dir}/lib">
<fileset dir="${Mac_dir}/lib" />
</copy> -->
<copy file="${common_dir}/VERSION HISTORY.txt" todir="${Mac_package_dir}" />
<copy file="${common_dir}/README.txt" todir="${Mac_package_dir}" />
<copy file="${common_dir}/LICENSE.txt" todir="${Mac_package_dir}" />
<echo message="Creating BEAST.app ..." />
<!-- create a jar bundle for the mac -->
<jarbundler dir="${Mac_package_dir}"
name="${BEAST_name}"
mainclass="beast.app.beastapp.BeastLauncher"
stubfile="${stubfile}"
useJavaXKey="true"
icon="${common_dir}/icons/beast.icns"
jvmversion="${jvm_version}"
vmoptions="-Xmx8g -Duser.language=en"
arguments="-window -working -options"
highresolutioncapable="true"
version="${version}"
copyright="${BEAST_name}, ${copyright}"
bundleid="beast.app.beastapp.BeastMain">
<javaproperty name="apple.laf.useScreenMenuBar" value="true"/>
<javaproperty name="java.library.path" value="$JAVAROOT:/usr/local/lib"/>
<jarfileset dir="${Mac_package_dir}/lib">
<include name="**/launcher.jar"/>
<!-- <include name="**/beast.jar"/>-->
<!-- <include name="**/beast-beagle.jar"/>-->
</jarfileset>
</jarbundler>
<echo message="Creating BEAUti.app ..." />
<jarbundler dir="${Mac_package_dir}"
name="${BEAUti_name}"
mainclass="beast.app.beauti.BeautiLauncher"
stubfile="${stubfile}"
useJavaXKey="true"
icon="${common_dir}/icons/beauti.icns"
jvmversion="${jvm_version}"
vmoptions="-Xmx8g -Duser.language=en -Xdock:name="BEAUti""
arguments="-capture"
highresolutioncapable="true"
version="${version}"
copyright="${BEAUti_name}, ${copyright}"
bundleid="beast.app.beauti.Beauti">
<javaproperty name="apple.laf.useScreenMenuBar" value="true"/>
<javaproperty name="java.library.path" value="$JAVAROOT:/usr/local/lib"/>
<jarfileset dir="${Mac_package_dir}/lib">
<include name="**/launcher.jar"/>
</jarfileset>
</jarbundler>
<echo message="Creating LogCombiner.app ..." />
<jarbundler dir="${Mac_package_dir}"
name="${LogCombiner_name}"
mainclass="beast.app.tools.LogCombinerLauncher"
stubfile="${stubfile}"
useJavaXKey="true"
icon="${common_dir}/icons/utility.icns"
jvmversion="${jvm_version}"
vmoptions="-Xmx8g -Duser.language=en"
arguments=""
highresolutioncapable="true"
version="${version}"
copyright="${LogCombiner_name}, ${copyright}"
bundleid="beast.app.tools.LogCombiner">
<javaproperty name="apple.laf.useScreenMenuBar" value="true"/>
<javaproperty name="java.library.path" value="$JAVAROOT:/usr/local/lib"/>
<jarfileset dir="${Mac_package_dir}/lib">
<include name="**/launcher.jar"/>
</jarfileset>
</jarbundler>
<echo message="Creating TreeAnnotator.app ..." />
<jarbundler dir="${Mac_package_dir}"
name="${TreeAnnotator_name}"
mainclass="beast.app.treeannotator.TreeAnnotatorLauncher"
stubfile="${stubfile}"
useJavaXKey="true"
icon="${common_dir}/icons/utility.icns"
jvmversion="${jvm_version}"
vmoptions="-Xmx8g -Duser.language=en"
arguments=""
highresolutioncapable="true"
version="${version}"
copyright="${TreeAnnotator_name}, ${copyright}"
bundleid="beast.app.treeannotator.TreeAnnotator">
<javaproperty name="apple.laf.useScreenMenuBar" value="true"/>
<javaproperty name="java.library.path" value="$JAVAROOT:/usr/local/lib"/>
<jarfileset dir="${Mac_package_dir}/lib">
<include name="**/launcher.jar"/>
</jarfileset>
</jarbundler>
<echo message="Creating AppLauncher_name.app ..." />
<jarbundler dir="${Mac_package_dir}"
name="${AppLauncher_name}"
mainclass="beast.app.tools.AppLauncherLauncher"
stubfile="${stubfile}"
useJavaXKey="true"
icon="${common_dir}/icons/utility.icns"
jvmversion="${jvm_version}"
vmoptions="-Xmx8g -Duser.language=en"
arguments=""
highresolutioncapable="true"
version="${version}"
copyright="${AppLauncher_name}, ${copyright}"
bundleid="beast.app.tools.AppLauncher">
<javaproperty name="apple.laf.useScreenMenuBar" value="true"/>
<javaproperty name="java.library.path" value="$JAVAROOT:/usr/local/lib"/>
<jarfileset dir="${Mac_package_dir}/lib">
<include name="**/launcher.jar"/>
</jarfileset>
</jarbundler>
<echo message="Creating DensiTree.app ..." />
<jarbundler dir="${Mac_package_dir}"
name="DensiTree"
mainclass="viz.DensiTree"
stubfile="${stubfile}"
useJavaXKey="true"
icon="${tools_dir}/DensiTree.icns"
jvmversion="${jvm_version}"
vmoptions="-Xmx8g -Duser.language=en"
arguments=""
highresolutioncapable="true"
version="${version}"
copyright="DensiTree, http://compevol.auckland.ac.nz/software/DensiTree/"
bundleid="viz.DensiTree">
<javaproperty name="apple.laf.useScreenMenuBar" value="true"/>
<javaproperty name="java.library.path" value="$JAVAROOT:/usr/local/lib"/>
<jarfileset dir="${tools_dir}">
<include name="**/DensiTree.jar"/>
</jarfileset>
</jarbundler>
</target>
<!-- Split from app bundle, because macjre -->
<target name="codesign">
<echo message="codesign BEAST.app ..." />
<!-- code signing -->
<exec executable="codesign">
<arg value="--deep"/>
<arg value="--options=runtime"/>
<arg value="-s"/>
<arg value="${AppleSigner}"/>
<arg value="-v"/>
<arg value="${Mac_package_dir}/${BEAST_name}.app"/>
</exec>