forked from pablobs/filebot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
1034 lines (861 loc) · 42.3 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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<project name="filebot" default="fatjar" xmlns:ivy="antlib:org.apache.ivy.ant">
<property file="profile.properties" />
<property file="source/net/filebot/Settings.properties" />
<property name="title" value="${application.name}" />
<property name="version" value="${application.version}" />
<tstamp>
<format property="tstamp.date" pattern="yyyy-MM-dd" />
</tstamp>
<tstamp>
<format property="tstamp.year" pattern="yyyy" />
</tstamp>
<!-- define source dirs -->
<property name="dir.source" location="${basedir}/source" />
<property name="dir.test" location="${basedir}/test" />
<property name="dir.build" location="${basedir}/build" />
<property name="dir.dist" location="${basedir}/dist" />
<property name="dir.lib" location="${basedir}/lib" />
<property name="dir.website" location="${basedir}/website" />
<property name="dir.installer" location="${basedir}/installer" />
<!-- define output paths -->
<property name="path.fatjar" location="${dir.dist}/${title}_${version}.jar" />
<property name="path.appbundle.tar" location="${dir.dist}/${title}_${version}-brew.tar.bz2" />
<property name="path.source.zip" location="${dir.dist}/filebot-${version}-src.zip" />
<property name="basedir.release" location="${basedir}/release" />
<property name="dir.release" location="${basedir.release}/${title}_${version}" />
<property name="dir.cache" location="${basedir}/cache/${title}_${version}" />
<target name="resolve" description="Retrieve dependencies with Apache Ivy">
<delete dir="${dir.lib}/ivy" />
<ivy:retrieve pattern="${dir.lib}/ivy/[type]/[artifact].[ext]" />
<antcall target="resolve-import-native">
<param name="arch" value="mac-x86_64" />
<param name="arch.jna" value="darwin" />
<param name="arch.7zj" value="Mac-x86_64" />
</antcall>
<antcall target="resolve-import-native">
<param name="arch" value="win32-x64" />
<param name="arch.jna" value="win32-x86-64" />
<param name="arch.7zj" value="Windows-amd64" />
</antcall>
<antcall target="resolve-import-native">
<param name="arch" value="win32-x86" />
<param name="arch.jna" value="win32-x86/" />
<param name="arch.7zj" value="Windows-x86" />
</antcall>
<antcall target="resolve-import-native">
<param name="arch" value="linux-amd64" />
<param name="arch.jna" value="linux-x86-64" />
<param name="arch.7zj" value="Linux-amd64" />
</antcall>
<antcall target="resolve-import-native">
<param name="arch" value="linux-i686" />
<param name="arch.jna" value="linux-x86" />
<param name="arch.7zj" value="Linux-i386" />
</antcall>
<antcall target="resolve-import-native">
<param name="arch" value="linux-arm" />
<param name="arch.jna" value="linux-arm" />
<param name="arch.7zj" value="Linux-arm" />
</antcall>
</target>
<target name="resolve-import-native">
<unzip src="${dir.lib}/ivy/jar/jna.jar" dest="${dir.lib}/native/${arch}" overwrite="yes">
<patternset>
<include name="**/${arch.jna}/*.dll" />
<include name="**/${arch.jna}/*.so" />
<include name="**/${arch.jna}/*.jnilib" />
</patternset>
<chainedmapper>
<flattenmapper />
<compositemapper>
<globmapper from="*.jnilib" to="*.dylib" />
<identitymapper />
</compositemapper>
</chainedmapper>
</unzip>
<unzip src="${dir.lib}/ivy/jar/sevenzipjbinding-all-platforms.jar" dest="${dir.lib}/native/${arch}" overwrite="yes">
<patternset>
<include name="**/${arch.7zj}/*.dll" />
<include name="**/${arch.7zj}/*.so" />
<include name="**/${arch.7zj}/*.dylib" />
</patternset>
<chainedmapper>
<flattenmapper />
<compositemapper>
<globmapper from="lib*.dll" to="*.dll" />
<identitymapper />
</compositemapper>
</chainedmapper>
</unzip>
</target>
<path id="jars.classpath">
<fileset dir="${dir.lib}" includes="**/*.jar" excludes="**/*-jdk14.jar" />
</path>
<target name="jar" depends="build">
<!-- create dist dir -->
<mkdir dir="${dir.dist}" />
<!-- main jar -->
<jar destfile="${dir.dist}/filebot.jar">
<manifest>
<attribute name="Build-Date" value="${tstamp.date}" />
<attribute name="Build-Revision" value="${revision}" />
<attribute name="Application-Name" value="${title}" />
<attribute name="Application-Version" value="${version}" />
<attribute name="Main-Class" value="net.filebot.Main" />
</manifest>
<fileset dir="${dir.build}" excludes="**/*Test*" />
</jar>
<!-- extra jar containing all the unit tests -->
<jar destfile="${dir.dist}/filebot-test.jar">
<fileset dir="${dir.build}" includes="**/*Test*" />
</jar>
<!-- source as zip -->
<zip destfile="${path.source.zip}">
<fileset dir="source" />
</zip>
</target>
<target name="fatjar" depends="resolve, jar" description="Merge all class files into a single executable jar file">
<jar destfile="${path.fatjar}" filesetmanifest="merge" duplicate="fail" index="yes">
<!-- include main jar -->
<zipfileset src="${dir.dist}/filebot.jar" />
<!-- include libs -->
<zipfileset src="${dir.lib}/ivy/bundle/json-io.jar">
<include name="com/cedarsoftware/util/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/glazedlists_java15.jar">
<include name="ca/odell/glazedlists/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/miglayout-core.jar">
<include name="net/miginfocom/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/miglayout-swing.jar">
<include name="net/miginfocom/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/rsyntaxtextarea.jar">
<include name="org/fife/**" />
</zipfileset>
<zipfileset src="${dir.lib}/jars/simmetrics.jar">
<include name="uk/ac/shef/wit/simmetrics/**" />
</zipfileset>
<zipfileset src="${dir.lib}/jars/xmlrpc.jar">
<include name="redstone/xmlrpc/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/bundle/args4j.jar">
<include name="org/kohsuke/args4j/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/xz.jar">
<include name="org/tukaani/xz/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/ehcache.jar">
<include name="META-INF/services/**" />
<include name="net/sf/ehcache/**" />
<include name="org/terracotta/**" />
<include name="ehcache-failsafe.xml" />
<include name="build-info.properties" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/slf4j-api.jar">
<include name="org/slf4j/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/slf4j-jdk14.jar">
<include name="org/slf4j/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/commons-io.jar">
<include name="org/apache/commons/io/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/icu4j.jar">
<include name="com/ibm/icu/**" />
</zipfileset>
<zipfileset src="${dir.lib}/jars/jacksum.jar">
<include name="jonelo/jacksum/adapt/**" />
<include name="jonelo/jacksum/algorithm/**" />
<include name="jonelo/sugar/util/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/groovy-all.jar">
<include name="groovy*/**" />
<include name="org/codehaus/groovy/**" />
<include name="META-INF/dgminfo" />
<include name="META-INF/services/**" />
<include name="META-INF/*.properties" />
<!-- filebot already includes it's own extension modules -->
<exclude name="META-INF/services/org.codehaus.groovy.runtime.ExtensionModule" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/sevenzipjbinding.jar">
<include name="net/sf/sevenzipjbinding/**" />
</zipfileset>
<zipfileset src="${dir.lib}/jars/ObjCBridge.jar">
<include name="ca/weblite/**" />
<include name="com/sun/jna/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/commons-vfs2.jar">
<include name="org/apache/commons/vfs2/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/commons-logging.jar">
<include name="org/apache/commons/logging/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/junrar.jar">
<include name="com/github/junrar/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/language-detector.jar">
<include name="be/frma/langguess/**" />
<include name="com/cybozu/labs/langdetect/**" />
<include name="com/optimaize/langdetect/**" />
<include name="languages/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/bundle/guava.jar">
<include name="com/google/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/streamex.jar">
<include name="one/util/streamex/**" />
</zipfileset>
<!-- include classes and native libraries -->
<zipfileset src="${dir.lib}/ivy/jar/jna.jar">
<include name="com/sun/jna/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/jna-platform.jar">
<include name="com/sun/jna/platform/**" />
</zipfileset>
<!-- libraries used in external scripts -->
<zipfileset src="${dir.lib}/ivy/jar/jsoup.jar">
<include name="org/jsoup/**" />
</zipfileset>
<!-- Ivy for @Grapes automatic dependency management -->
<zipfileset src="${dir.lib}/ivy/jar/ivy.jar">
<include name="org/apache/ivy/**" />
</zipfileset>
<!-- AntBuilder including dependencies for ant-javamail, ant-commons-net and ant-jsch -->
<zipfileset src="${dir.lib}/ivy/jar/ant.jar">
<include name="org/apache/tools/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/ant-launcher.jar">
<include name="org/apache/tools/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/ant-commons-net.jar">
<include name="org/apache/tools/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/ant-jsch.jar">
<include name="org/apache/tools/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/ant-javamail.jar">
<include name="org/apache/tools/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/commons-net.jar">
<include name="org/apache/commons/net/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/jsch.jar">
<include name="com/jcraft/jsch/**" />
</zipfileset>
<zipfileset src="${dir.lib}/ivy/jar/mail.jar">
<include name="javax/mail/**" />
<include name="com/sun/mail/**" />
<include name="META-INF/*mail*" />
</zipfileset>
</jar>
</target>
<target name="appbundle" description="Build an OSX application bundle">
<taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpathref="jars.classpath" />
<bundleapp minimumsystemversion="10.8" outputdirectory="${dir.dist}" name="${title}" displayname="${title}" shortversion="${version}" identifier="net.sourceforge.FileBot" mainclassname="net.filebot.Main" icon="${dir.installer}/appbundle/filebot.icns" copyright="${tstamp.year} Reinhard Pointner" applicationcategory="public.app-category.productivity" highresolutioncapable="true" supportsautomaticgraphicsswitching="true">
<classpath file="${path.fatjar}" />
<librarypath dir="${dir.lib}/native/mac-x86_64" />
<arch name="x86_64" />
<option value="-Dnet.filebot.UserFiles.fileChooser=COCOA" />
<option value="-Dapplication.deployment=app" />
<option value="-Dapplication.update=auto" />
<option value="-Dunixfs=false" />
<option value="-DuseExtendedFileAttributes=true" />
<option value="-DuseCreationDate=false" />
<option value="-Djava.net.useSystemProxies=true" />
<option value="-Dsun.net.client.defaultConnectTimeout=10000" />
<option value="-Dsun.net.client.defaultReadTimeout=60000" />
<option value="-Dfile.encoding=UTF-8" />
<option value="-Djna.nosys=true" />
<option value="-Djna.library.path=$APP_ROOT/Contents/MacOS" />
<option value="-Djava.library.path=$APP_ROOT/Contents/MacOS" />
<option value="-Dnet.filebot.AcoustID.fpcalc=$APP_ROOT/Contents/MacOS/fpcalc" />
<option value="-Xdock:name=${title}" />
<option value="-Xdock:icon=Contents/Resources/filebot.icns" />
<option value="-Dapple.laf.useScreenMenuBar=true" />
<bundledocument role="viewer" handlerRank="none" contentTypes="public.movie" name="Video file" />
<bundledocument role="viewer" handlerRank="none" contentTypes="public.audio" name="Audio file" />
<bundledocument role="viewer" handlerRank="none" contentTypes="public.folder" name="Media folder" />
</bundleapp>
<!-- application bundle folder as .tar -->
<tar destfile="${path.appbundle.tar}" compression="bzip2" longfile="gnu">
<tarfileset dir="${dir.dist}" includes="${title}.app/**" excludes="**/MacOS/**" />
<tarfileset dir="${dir.dist}" includes="${title}.app/**/**.dylib" />
<!-- IMPORTANT application stub must be executable!! -->
<tarfileset dir="${dir.dist}" includes="${title}.app/**/**Launcher" filemode="755" />
<tarfileset dir="${dir.dist}" includes="${title}.app/**/fpcalc" filemode="755" />
<tarfileset prefix="${title}.app/Contents/MacOS" dir="${dir.installer}/appbundle" includes="*.sh" filemode="755" />
</tar>
</target>
<target name="appbundle-maspkg-core">
<antcall target="appbundle-maspkg">
<param name="application.name" value="FileBot" />
<param name="application.executable" value="FileBot" />
<param name="application.identifier" value="net.filebot.FileBot" />
<param name="application.icon" value="${dir.installer}/appbundle/filebot.icns" />
<param name="application.cert.appbundle" value="3rd Party Mac Developer Application: Point Planck Limited" />
<param name="application.cert.installer" value="3rd Party Mac Developer Installer: Point Planck Limited" />
<param name="application.mode" value="Rename|Episodes|SFV|Filter|List" />
<param name="application.help" value="show" />
</antcall>
</target>
<target name="appbundle-maspkg-subtitles">
<antcall target="appbundle-maspkg">
<param name="application.name" value="FileBot Subtitles" />
<param name="application.executable" value="FileBotSubtitles" />
<param name="application.identifier" value="net.filebot.subtitles" />
<param name="application.icon" value="${dir.installer}/appbundle/subtitles.icns" />
<param name="application.cert.appbundle" value="Developer ID Application: Point Planck Limited" />
<param name="application.cert.installer" value="Developer ID Installer: Point Planck Limited" />
<param name="application.mode" value="Subtitles" />
<param name="application.help" value="skip" />
</antcall>
</target>
<target name="appbundle-maspkg" depends="update, fatjar">
<taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpathref="jars.classpath" />
<property name="path.app" value="${application.name}.app" />
<property name="path.pkg" value="${application.executable}_${version}_r${revision}.pkg" />
<property name="jre.version" value="jdk1.8.0_92.jdk" />
<property name="jre.path" value="/Library/Java/JavaVirtualMachines/${jre.version}/Contents/Home" />
<bundleapp minimumsystemversion="10.8" executablename="${application.executable}AppLauncher" version="${revision}" outputdirectory="${dir.dist}" name="${application.name}" displayname="${application.name}" shortversion="${version}" identifier="${application.identifier}" mainclassname="net.filebot.Main" icon="${application.icon}" copyright="${tstamp.year} Point Planck" applicationcategory="public.app-category.utilities" highresolutioncapable="true" supportsautomaticgraphicsswitching="true">
<classpath file="${path.fatjar}" />
<librarypath dir="${dir.lib}/native/mac-x86_64" />
<arch name="x86_64" />
<runtime dir="${jre.path}" />
<argument value="--mode" />
<argument value="${application.mode}" />
<!-- WORKING_DIR is sandbox data folder -->
<option value="-Dapplication.dir=./Library/Application Support/User Data" />
<option value="-Dapplication.cache=./Library/Caches/ehcache.disk.store" />
<option value="-Djava.io.tmpdir=./Library/Caches/java.io.tmpdir" />
<option value="-Dnet.filebot.UserFiles.fileChooser=COCOA" />
<option value="-Dapplication.name=${application.name}" />
<option value="-Dapplication.help=${application.help}" />
<option value="-Dapplication.deployment=mas" />
<option value="-Dapplication.update=skip" />
<option value="-Dunixfs=false" />
<option value="-DuseExtendedFileAttributes=true" />
<option value="-DuseCreationDate=false" />
<option value="-Djava.net.useSystemProxies=true" />
<option value="-Dsun.net.client.defaultConnectTimeout=10000" />
<option value="-Dsun.net.client.defaultReadTimeout=60000" />
<option value="-Dfile.encoding=UTF-8" />
<option value="-Djna.nosys=true" />
<option value="-Djna.nounpack=true" />
<option value="-Djna.boot.library.name=jnidispatch" />
<option value="-Djna.boot.library.path=$APP_ROOT/Contents/MacOS" />
<option value="-Djna.library.path=$APP_ROOT/Contents/MacOS" />
<option value="-Djava.library.path=$APP_ROOT/Contents/MacOS" />
<option value="-Dnet.filebot.AcoustID.fpcalc=$APP_ROOT/Contents/MacOS/fpcalc" />
<option value="-Dapple.laf.useScreenMenuBar=true" />
<bundledocument role="viewer" handlerRank="none" contentTypes="public.movie" name="Video file" />
<bundledocument role="viewer" handlerRank="none" contentTypes="public.audio" name="Audio file" />
<bundledocument role="viewer" handlerRank="none" contentTypes="public.folder" name="Media folder" />
</bundleapp>
<!-- fix code signing and submission issues -->
<delete verbose="yes">
<fileset dir="${dir.dist}/${path.app}/Contents/PlugIns">
<include name="**/libjfxmedia_qtkit.dylib" />
<include name="**/Contents/Info.plist" />
<include name="**/Contents/MacOS/libjli.dylib" />
</fileset>
</delete>
<copy verbose="yes" failonerror="yes" overwrite="yes" file="/Library/Java/JavaVirtualMachines/${jre.version}/Contents/Info.plist" tofile="${dir.dist}/${path.app}/Contents/PlugIns/${jre.version}/Contents/Info.plist" />
<copy verbose="yes" failonerror="yes" overwrite="yes" file="/Library/Java/JavaVirtualMachines/${jre.version}/Contents/MacOS/libjli.dylib" tofile="${dir.dist}/${path.app}/Contents/PlugIns/${jre.version}/Contents/MacOS/libjli.dylib" />
<!-- fix permissions -->
<chmod verbose="yes" dir="${dir.dist}" includes="**/fpcalc" perm="755" />
<chmod verbose="yes" dir="${dir.dist}/${path.app}/Contents/PlugIns" perm="+rw" />
<!-- JRE sign all jars, dylibs and executables -->
<property name="codesign.opts" value="--verbose=4 --force --sign '${application.cert.appbundle}'" />
<property name="codesign.entitlements" value="--entitlements '${dir.installer}/appbundle/FileBot.entitlements'" />
<property name="codesign.entitlements.inherit" value="--entitlements '${dir.installer}/appbundle/inherit.entitlements'" />
<apply executable="codesign">
<arg line="${codesign.opts} ${codesign.entitlements.inherit}" />
<srcfile />
<fileset dir="${dir.dist}/${path.app}/Contents/PlugIns">
<include name="**/jspawnhelper" />
<include name="**/*.dylib" />
<include name="**/*.jar" />
</fileset>
</apply>
<!-- sign cmdline tool first -->
<exec dir="${dir.dist}/${path.app}" executable="codesign">
<arg line="${codesign.opts} ${codesign.entitlements.inherit} Contents/MacOS/fpcalc" />
</exec>
<!-- APP sign all jars, dylibs and executables -->
<apply executable="codesign">
<arg line="${codesign.opts} ${codesign.entitlements}" />
<srcfile />
<fileset dir="${dir.dist}/${path.app}/Contents">
<include name="MacOS/*.dylib" />
<include name="Java/*.jar" />
</fileset>
</apply>
<!-- sign app with entitlements -->
<exec dir="${dir.dist}" executable="codesign">
<arg line="${codesign.opts} ${codesign.entitlements} '${path.app}/Contents/PlugIns/${jre.version}'" />
</exec>
<exec dir="${dir.dist}" executable="codesign">
<arg line="${codesign.opts} ${codesign.entitlements} '${path.app}'" />
</exec>
<!-- verify signature & build pkg -->
<exec dir="${dir.dist}" executable="codesign" failonerror="on">
<arg line="--verify '${path.app}/Contents/PlugIns/${jre.version}'" />
</exec>
<exec dir="${dir.dist}" executable="codesign" failonerror="on">
<arg line="--verify '${path.app}'" />
</exec>
<exec dir="${dir.dist}" executable="productbuild" failonerror="on">
<arg line="--component '${path.app}' /Applications --sign '${application.cert.installer}' ${path.pkg}" />
</exec>
<!-- store this build in releases -->
<mkdir dir="${dir.release}" />
<copy todir="${dir.release}" file="${dir.dist}/${path.pkg}" verbose="yes" />
</target>
<target name="ubuntu-debsrc" depends="update, fatjar">
<property name="jre.version" value="jdk-8u92" />
<property name="jre.dir" value="${basedir}/jre" />
<property name="path.tarbin" location="${dir.dist}/filebot-${version}-r${revision}-tarbin.tar.gz" />
<property name="path.debsrc" location="${dir.dist}/filebot-${version}-r${revision}-debsrc.tar.gz" />
<property name="dir.debsrc" location="${dir.dist}/debian-source-package/filebot/filebot-${version}" />
<!-- collect binary content -->
<tar destfile="${path.tarbin}" compression="gzip" longfile="gnu">
<tarfileset fullpath="i386/filebot/FileBot.jar" file="${path.fatjar}" />
<tarfileset fullpath="amd64/filebot/FileBot.jar" file="${path.fatjar}" />
<tarfileset prefix="i386/filebot" dir="${dir.lib}/native/linux-i686" includes="*.so" />
<tarfileset prefix="amd64/filebot" dir="${dir.lib}/native/linux-amd64" includes="*.so" />
<tarfileset prefix="i386/filebot/bin" file="${dir.installer}/ubuntu/filebot.sh" filemode="755" />
<tarfileset prefix="amd64/filebot/bin" file="${dir.installer}/ubuntu/filebot.sh" filemode="755" />
<tarfileset prefix="i386/filebot" dir="${dir.lib}/native/linux-i686" includes="fpcalc" filemode="755" />
<tarfileset prefix="amd64/filebot" dir="${dir.lib}/native/linux-amd64" includes="fpcalc" filemode="755" />
<tarfileset fullpath="i386/filebot/filebot.desktop" file="${dir.installer}/ubuntu/filebot.desktop" />
<tarfileset fullpath="amd64/filebot/filebot.desktop" file="${dir.installer}/ubuntu/filebot.desktop" />
<tarfileset fullpath="i386/filebot/filebot.svg" file="${dir.installer}/icons/icon.svg" />
<tarfileset fullpath="amd64/filebot/filebot.svg" file="${dir.installer}/icons/icon.svg" />
<!-- Include Java 8 JRE -->
<tarfileset prefix="i386/filebot/jre" dir="${jre.dir}/${jre.version}-linux-i586/jre" excludes="bin/**" />
<tarfileset prefix="i386/filebot/jre" dir="${jre.dir}/${jre.version}-linux-i586/jre" includes="bin/java" filemode="755" />
<tarfileset prefix="amd64/filebot/jre" dir="${jre.dir}/${jre.version}-linux-x64/jre" excludes="bin/**" />
<tarfileset prefix="amd64/filebot/jre" dir="${jre.dir}/${jre.version}-linux-x64/jre" includes="bin/java" filemode="755" />
</tar>
<!-- build debian source package for application binaries -->
<copy todir="${dir.debsrc}">
<fileset dir="${dir.installer}/ubuntu" includes="debian/**" />
</copy>
<untar src="${path.tarbin}" dest="${dir.debsrc}" compression="gzip" />
<!-- restore permissions -->
<chmod perm="755" type="file">
<fileset dir="${dir.debsrc}">
<include name="**/bin/**" />
<include name="**/fpcalc" />
</fileset>
</chmod>
<!-- debuild -S -->
<exec dir="${dir.debsrc}" executable="debuild" />
<!-- tar cvzf filebot-4.5.2-debsrc.tar.gz *.dsc *.changes *.tar.gz -->
<tar destfile="${path.debsrc}" compression="gzip">
<tarfileset dir="${dir.debsrc}/.." includes="*.dsc, *.changes, *.tar.*" />
</tar>
<!-- store this build in releases -->
<mkdir dir="${dir.release}" />
<copy todir="${dir.release}" file="${path.debsrc}" verbose="yes" />
</target>
<target name="deb" description="Build debian package for i686 and amd64">
<taskdef name="deb" classname="com.googlecode.ant_deb_task.Deb" classpathref="jars.classpath" />
<antcall target="deb-arch">
<param name="arch" value="i686" />
<!-- arch i686 not allowed by deb specification, must be i386 for 32-bit x86 systems -->
<param name="deb.arch" value="i386" />
</antcall>
<antcall target="deb-arch">
<param name="arch" value="amd64" />
<param name="deb.arch" value="amd64" />
</antcall>
</target>
<target name="deb-arch">
<!-- stage created .deb files in a temporary folder -->
<property name="deb.staging" location="${dir.dist}/deb" />
<mkdir dir="${deb.staging}" />
<deb debfilenameproperty="staging.file.deb" todir="${deb.staging}" package="filebot" version="${version}" architecture="${deb.arch}" section="misc" homepage="http://www.filebot.net/" priority="optional" postinst="${dir.installer}/deb/postinst.sh" prerm="${dir.installer}/deb/prerm.sh">
<maintainer name="Reinhard Pointner" email="[email protected]" />
<description synopsis="The ultimate TV and Movie Renamer">FileBot is the ultimate tool for renaming your movies, tv shows or anime and even downloading subtitles. It's smart, streamlined for simplicity and just works. Putting the super-efficient UI aside, it's also got a full-featured command-line interface and scripting engine for all sorts of automation. Anything is possible.</description>
<tarfileset fullpath="usr/share/filebot/FileBot.jar" file="${path.fatjar}" />
<tarfileset prefix="usr/share/filebot" dir="${dir.lib}/native/linux-${arch}" includes="*.so" />
<tarfileset prefix="usr/share/filebot" file="${dir.lib}/native/linux-${arch}/fpcalc" filemode="755" />
<tarfileset prefix="usr/share/filebot" file="${dir.installer}/icons/icon.svg" />
<tarfileset prefix="usr/share/filebot/bin" file="${dir.installer}/deb/filebot.sh" filemode="755" />
<tarfileset prefix="usr/share/applications" file="${dir.installer}/deb/FileBot.desktop" />
</deb>
<move tofile="${dir.dist}/filebot_${version}_${deb.arch}.deb" file="${staging.file.deb}" overwrite="no" failonerror="yes" />
<delete dir="${deb.staging}" />
</target>
<target name="ipkg" description="Build ipkg package">
<taskdef name="deb" classname="com.googlecode.ant_deb_task.Deb" classpathref="jars.classpath" />
<!-- stage created .deb files in a temporary folder -->
<property name="ipkg.staging" location="${dir.dist}/deb-ipkg" />
<mkdir dir="${ipkg.staging}" />
<deb debfilenameproperty="staging.file.deb" todir="${ipkg.staging}" package="filebot" version="${version}" architecture="noarch" section="misc" homepage="http://www.filebot.net/" priority="optional" postinst="${dir.installer}/ipkg/postinst.sh" prerm="${dir.installer}/ipkg/prerm.sh">
<maintainer name="Reinhard Pointner" email="[email protected]" />
<description synopsis="The ultimate TV and Movie Renamer">FileBot is the ultimate tool for renaming your movies, tv shows or anime and even downloading subtitles. It's smart, streamlined for simplicity and just works. Putting the super-efficient UI aside, it's also got a full-featured command-line interface and scripting engine for all sorts of automation. Anything is possible.</description>
<tarfileset fullpath="opt/share/filebot/FileBot.jar" file="${path.fatjar}" />
<tarfileset prefix="opt/share/filebot/bin" file="${dir.installer}/ipkg/filebot.sh" filemode="755" />
</deb>
<move tofile="${dir.dist}/filebot_${version}_noarch.ipk" file="${staging.file.deb}" overwrite="no" failonerror="yes" />
<delete dir="${ipkg.staging}" />
</target>
<target name="msi" description="Build Windows Installer for x86 and x64">
<antcall target="msi-arch">
<param name="arch" value="x86" />
<param name="libgcc_name" value="gcc_s_seh-1.dll" />
</antcall>
<antcall target="msi-arch">
<param name="arch" value="x64" />
<param name="libgcc_name" value="gcc_s_seh-1.dll" />
</antcall>
</target>
<target name="msi-arch">
<property name="jnidispatch" location="${dir.lib}/native/win32-${arch}/jnidispatch.dll" />
<property name="mediainfo" location="${dir.lib}/native/win32-${arch}/MediaInfo.dll" />
<property name="lib7z_binding" location="${dir.lib}/native/win32-${arch}/7-Zip-JBinding.dll" />
<property name="libgcc_path" location="${dir.lib}/native/win32-${arch}/${libgcc_name}" />
<property name="fpcalc_path" location="${dir.lib}/native/win32-${arch}/fpcalc.exe" />
<property name="installer" location="${dir.dist}/FileBot_${version}_${arch}.msi" />
<exec executable="candle.exe" dir="${dir.installer}/msi" failonerror="true">
<arg line="filebot-wix.xml -out ${dir.dist}/msi.wixobj -darch=${arch} -dreleaseversion=${version} -dfatjar=${path.fatjar} -djnidispatch=${jnidispatch} -dmediainfo=${mediainfo} -dlib7z_binding=${lib7z_binding} -dlibgcc_name=${libgcc_name} -dlibgcc_path=${libgcc_path} -dfpcalc_path=${fpcalc_path}" />
</exec>
<exec executable="light.exe" dir="${dir.installer}/msi" failonerror="true">
<arg line="${dir.dist}/msi.wixobj -sval -ext WixUIExtension -out ${installer}" />
</exec>
<exec executable="signtool.exe" dir="${dir.installer}/msi" failonerror="true">
<arg line="sign /t http://timestamp.verisign.com/scripts/timstamp.dll /v /a ${installer}" />
</exec>
</target>
<target name="portable" description="Portable application package">
<mkdir dir="${dir.dist}/portable" />
<copy file="${path.fatjar}" tofile="${dir.dist}/portable/FileBot.jar" />
<copy todir="${dir.dist}/portable">
<fileset dir="${dir.installer}/portable" includes="*.exe, *.ini, *.cmd, *.sh" />
</copy>
<zip destfile="${dir.dist}/FileBot_${version}-portable.zip">
<zipfileset dir="${dir.dist}/portable" includes="*.jar, *.exe, *.ini, *.cmd" />
<zipfileset dir="${dir.dist}/portable" includes="*.sh" filemode="755" />
</zip>
</target>
<target name="spk" description="Synology NAS package">
<taskdef name="spk" classname="net.filebot.ant.spk.PackageTask" classpathref="jars.classpath" />
<spk destdir="${dir.dist}" name="filebot" version="${version}" arch="noarch">
<info name="displayname" value="FileBot" />
<info name="description" value="FileBot is the ultimate tool for organizing and renaming your movies, TV shows or anime, as well as downloading subtitles and artwork. It's smart and just works." />
<info name="maintainer" value="FileBot" />
<info name="maintainer_url" value="http://www.filebot.net/" />
<info name="distributor" value="FileBot" />
<info name="distributor_url" value="http://www.filebot.net/" />
<info name="support_url" value="https://www.filebot.net/forums/viewforum.php?f=13" />
<info name="helpurl" value="http://www.filebot.net/cli.html" />
<info name="firmware" value="5.0" />
<info name="startable" value="no" />
<info name="silent_install" value="yes" />
<info name="silent_uninstall" value="yes" />
<info name="silent_upgrade" value="yes" />
<info name="thirdparty" value="yes" />
<info name="start_dep_services" value="ssh" />
<info name="install_dep_packages" value="oracle-java" />
<icon size="72" file="${dir.installer}/icons/icon72.png" />
<icon size="256" file="${dir.installer}/icons/icon256.png" />
<scripts dir="${dir.installer}/spk/scripts" filemode="755" />
<package dir="${dir.installer}/spk/package" includes="*.sh" filemode="755" />
<package file="${path.fatjar}" fullpath="FileBot.jar" />
<codesign secring="${dir.installer}/gpg/secring.gpg" keyid="${gpg.key}" password="${gpg.pwd}" />
</spk>
</target>
<target name="webstart" depends="jar" description="Build and compress jars used for webstart deployment">
<!-- create dirs -->
<mkdir dir="${dir.dist}/webstart" />
<!-- copy jnlp descriptors and icons -->
<copy todir="${dir.dist}/webstart">
<fileset dir="${dir.installer}/webstart" />
<fileset dir="${dir.installer}/icons" />
</copy>
<!-- copy jars -->
<copy todir="${dir.dist}/webstart">
<fileset dir="${dir.lib}" includes="*.jar" excludes="jna.jar" />
</copy>
<!-- copy jna.jar without native libs -->
<jar destfile="${dir.dist}/webstart/jna.jar">
<zipfileset src="${dir.lib}/jna.jar" includes="**/*.class" />
</jar>
<!-- create mediainfo jar as seperate jar and use as trigger for lazy loading the native libs -->
<jar destfile="${dir.dist}/webstart/mediainfo.jar">
<fileset dir="${dir.build}" includes="net/filebot/mediainfo/**" />
</jar>
<!-- create indexed main jar -->
<jar destfile="${dir.dist}/webstart/filebot.jar" index="yes">
<fileset dir="${dir.build}" excludes="**/*Test*, net/filebot/mediainfo/**" />
<indexjars>
<!-- IMPORTANT if groovy is indexed things break during runtime!! -->
<fileset dir="${dir.dist}/webstart" includes="**/*.jar" excludes="filebot.jar, groovy.jar" />
</indexjars>
</jar>
<!-- create native lib jars -->
<antcall target="webstart-nativelib">
<param name="arch" value="win32-x86" />
</antcall>
<antcall target="webstart-nativelib">
<param name="arch" value="win32-x64" />
</antcall>
<antcall target="webstart-nativelib">
<param name="arch" value="linux-i386" />
</antcall>
<antcall target="webstart-nativelib">
<param name="arch" value="linux-amd64" />
</antcall>
<antcall target="webstart-nativelib">
<param name="arch" value="mac-x86_64" />
</antcall>
<!-- sign all jars -->
<apply executable="pack200">
<!-- workaround for bug 6575373, see http://bugs.sun.com/view_bug.do?bug_id=6575373 -->
<arg line="--segment-limit=-1" />
<arg line="--repack" />
<srcfile />
<fileset dir="${dir.dist}/webstart" includes="**/*.jar" />
</apply>
<signjar alias="filebot" keystore="filebot.keystore" storepass="secret">
<fileset id="signjar" dir="${dir.dist}/webstart" includes="**/*.jar" />
</signjar>
<!-- pack200 all jars -->
<apply executable="pack200" dest="${dir.dist}/webstart">
<!-- workaround for bug 6575373, see http://bugs.sun.com/view_bug.do?bug_id=6575373 -->
<arg line="--segment-limit=-1" />
<targetfile />
<srcfile />
<fileset dir="${dir.dist}/webstart" includes="*.jar" />
<mapper type="glob" from="*.jar" to="*.jar.pack.gz" />
</apply>
</target>
<target name="webstart-nativelib">
<!-- create temp dir -->
<mkdir dir="${dir.dist}/webstart/native/${arch}" />
<!-- copy native libs to temp dir -->
<copy todir="${dir.dist}/webstart/native/${arch}" flatten="true">
<zipfileset src="${dir.lib}/jna.jar" includes="com/sun/jna/${arch}/*" />
<fileset dir="${dir.lib}/native">
<include name="${arch}/**.dll" />
<include name="${arch}/**.dylib" />
<include name="${arch}/**.so" />
</fileset>
</copy>
<!-- create native lib jar -->
<jar destfile="${dir.dist}/webstart/native/${arch}.jar" basedir="${dir.dist}/webstart/native/${arch}" />
<!-- delete temp dir -->
<delete dir="${dir.dist}/webstart/native/${arch}" />
</target>
<target name="build">
<!-- create build dir -->
<mkdir dir="${dir.build}" />
<!-- compile -->
<javac srcdir="${dir.source}:${dir.test}" destdir="${dir.build}" target="1.8" source="1.8" encoding="utf-8" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false">
<classpath>
<fileset dir="${dir.lib}" includes="**/*.jar" />
</classpath>
</javac>
<!-- copy resources -->
<copy todir="${dir.build}">
<fileset dir="${dir.source}">
<exclude name="**/*.java" />
</fileset>
</copy>
<!-- update application properties -->
<replace dir="${dir.build}" encoding="UTF-8" summary="yes">
<include name="**/*.properties" />
<replacefilter token="@{revision}" value="${revision}" />
<replacefilter token="@{version}" value="${version}" />
</replace>
</target>
<target name="clean">
<delete dir="${dir.dist}" />
<delete dir="${dir.build}" />
</target>
<target name="test" depends="jar">
<junit printsummary="yes" fork="true">
<classpath>
<fileset dir="${dir.dist}" includes="*.jar" />
<fileset dir="${dir.lib}" includes="**/*.jar" />
</classpath>
<formatter type="plain" />
<test name="net.filebot.AllTests" outfile="test-report" />
</junit>
</target>
<target name="test-fatjar" depends="fatjar">
<junit printsummary="yes" fork="true" includeantruntime="true" newenvironment="true">
<classpath>
<pathelement location="${path.fatjar}" />
<pathelement location="${dir.dist}/filebot-test.jar" />
<pathelement location="${dir.lib}/ivy/jar/ant-junit.jar" />
<pathelement location="${dir.lib}/ivy/jar/junit.jar" />
<pathelement location="${dir.lib}/ivy/jar/hamcrest-core.jar" />
</classpath>
<formatter type="plain" />
<test name="net.filebot.AllTests" outfile="test-report" />
</junit>
</target>
<target name="update">
<exec executable="git" failonerror="true">
<arg line="reset --hard" />
</exec>
<exec executable="git" failonerror="true">
<arg line="pull" />
</exec>
<exec executable="git" outputproperty="revision" failonerror="true">
<arg line="rev-list --count master" />
</exec>
<echo>Revision: ${revision}</echo>
</target>
<target name="stage-release" depends="resolve, update, fatjar, portable, spk, ipkg, deb, msi, appbundle">
<delete dir="${dir.release}" />
<mkdir dir="${dir.release}" />
<!-- prepare release packages -->
<copy todir="${dir.release}" preservelastmodified="yes" verbose="yes">
<path path="${path.fatjar}" />
<fileset dir="${dir.dist}">
<include name="*.tar.bz2" />
<include name="*.deb" />
<include name="*.ipk" />
<include name="*.msi" />
<include name="*.spk" />
<include name="*-portable.zip" />
</fileset>
</copy>
<checksum algorithm="SHA-256" pattern="{0} {1}" todir="${dir.cache}/sha">
<fileset dir="${dir.release}" />
</checksum>
<concat destfile="${dir.release}/README.md" overwrite="true" eol="unix" outputencoding="UTF-8">
<fileset file="${dir.installer}/ant/digest.header.md" />
<fileset dir="${dir.cache}/sha" />
<fileset file="${dir.installer}/ant/digest.footer.md" />
</concat>
</target>
<target name="deploy-release" depends="stage-release" description="Upload to SourceForge.net FRS">
<scp todir="${deploy.release}" trust="yes" verbose="true" sftp="true" keyfile="${deploy.keyfile}">
<!-- make sure to upload README.md first -->
<fileset dir="${basedir.release}" includes="**/README.md">
<date datetime="${tstamp.date}" pattern="yyyy-MM-dd" when="after" />
</fileset>
</scp>
<scp todir="${deploy.release}" trust="yes" verbose="true" sftp="true" keyfile="${deploy.keyfile}">
<!-- upload starting with parent folders so scp will create the release folder for us -->
<fileset dir="${basedir.release}" excludes="**/README.md">
<date datetime="${tstamp.date}" pattern="yyyy-MM-dd" when="after" />
</fileset>
</scp>
</target>
<target name="deploy-website">
<!-- copy static website resources -->
<copy todir="${dir.dist}/website" preservelastmodified="yes" verbose="yes">
<fileset dir="${dir.website}">
<include name=".htaccess" />
<include name="*.html" />
<include name="*.php" />
<include name="*.json" />
<include name="*.xml" />
<include name="*.css" />
<include name="*.js" />
<include name="*.png" />
<include name="*.ico" />
<include name="*.txt" />
<include name="syno/**" />
<include name="images/**" />
<include name="screenshots/**" />
<include name="getting-started/**" />
</fileset>
</copy>
<!-- copy files and resolve ant variables -->
<echo message="Replace Ant variables" />
<copy todir="${dir.dist}/website" overwrite="yes" encoding="UTF-8" verbose="true">
<fileset dir="${dir.website}">
<include name="*.html" />
<include name="*.php" />
</fileset>
<filterset begintoken="@{" endtoken="}">
<propertyset>
<propertyref builtin="all" />
</propertyset>
</filterset>
</copy>
<!-- upload -->
<scp todir="${deploy.website}" trust="yes" verbose="true" sftp="true" keyfile="${deploy.keyfile}">
<fileset dir="${dir.dist}/website">
<modified>
<param name="cache.cachefile" value="${dir.cache}/scp.properties" />
</modified>
</fileset>
</scp>
</target>
<target name="deploy-synology" description="Update Synology Package Source">
<taskdef name="package-source" classname="net.filebot.ant.spk.RepositoryTask" classpathref="jars.classpath" />
<mkdir dir="${dir.dist}/website/syno" />
<!-- merge all filebot related packages into a single package source file -->
<package-source file="${dir.dist}/website/syno/index.json">
<keyring file="${dir.installer}/gpg/FileBot.pub" />
<spk file="${dir.release}/filebot-${version}-noarch.spk">
<info name="link" value="http://downloads.sourceforge.net/project/filebot/filebot/FileBot_${version}/filebot-${version}-noarch.spk" />
<thumbnail url="http://app.filebot.net/syno/filebot-thumbnail.png" />
<snapshot url="http://app.filebot.net/syno/filebot-snapshot.png" />
</spk>
<source url="https://raw.githubusercontent.com/filebot/filebot-node/master/spksrc.json" />
<source url="https://raw.githubusercontent.com/rednoah/java-installer/master/spksrc.json" />
<source url="https://raw.githubusercontent.com/rednoah/ant-installer/master/spksrc.json" />
</package-source>
<!-- upload -->
<scp todir="${deploy.website}/syno" trust="yes" verbose="true" sftp="true" keyfile="${deploy.keyfile}">
<fileset dir="${dir.dist}/website/syno">
<include name="*.json" />
</fileset>
</scp>
</target>
<target name="deploy-chocolatey" description="Update Chocolatey Package Source">
<!-- prepare sha1 checksums -->
<checksum property="x86.msi.sha256" file="${dir.release}/FileBot_${version}_x86.msi" algorithm="SHA-256" />
<checksum property="x64.msi.sha256" file="${dir.release}/FileBot_${version}_x64.msi" algorithm="SHA-256" />
<!-- replace variables for new release -->
<copy todir="${dir.dist}/chocolatey" overwrite="yes" encoding="UTF-8" verbose="true">
<fileset dir="${dir.installer}/chocolatey">
<include name="**/*.ps1" />
<include name="**/*.nuspec" />
</fileset>
<filterset begintoken="@{" endtoken="}">
<propertyset>
<propertyref builtin="all" />
</propertyset>
</filterset>
</copy>
<!-- chocolatey pack and push -->
<exec executable="chocolatey.exe" dir="${dir.dist}\chocolatey" failonerror="true">