2014-08-01 11:47:39 +00:00
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2017-02-09 16:18:24 +00:00
<project name= "filebot" default= "fatjar" xmlns:ivy= "antlib:org.apache.ivy.ant" >
2014-08-01 11:47:39 +00:00
<!-- define source dirs -->
<property name= "dir.source" location= "${basedir}/source" />
<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" />
2016-11-04 20:19:30 +00:00
<!-- import property files -->
<property file= "${basedir}/profile.properties" />
<property file= "${dir.installer}/ant/ant.properties" />
<property file= "${dir.source}/net/filebot/Settings.properties" />
<property name= "release" value= "${application.name}_${application.version}" />
<property name= "version" value= "${application.version}" />
2014-08-01 11:47:39 +00:00
<!-- define output paths -->
2017-01-03 19:46:30 +00:00
<property name= "dir.cache" location= "${basedir}/cache" />
2016-11-04 20:19:30 +00:00
<property name= "dir.release" location= "${basedir}/release/${release}" />
<property name= "path.fatjar" location= "${dir.dist}/${release}.jar" />
2014-08-01 11:47:39 +00:00
2016-11-04 20:19:30 +00:00
<!-- timestamp variables -->
<tstamp prefix= "tstamp" >
<format property= "date" pattern= "yyyy-MM-dd" />
<format property= "year" pattern= "yyyy" />
</tstamp>
2016-09-17 06:53:14 +00:00
2014-08-01 11:47:39 +00:00
2016-11-04 20:19:30 +00:00
<!-- copy and replace ant variables macro -->
2016-11-04 14:39:19 +00:00
<macrodef name= "copy-replace" >
<attribute name= "todir" />
<element name= "filesets" implicit= "yes" />
<sequential >
2016-11-04 20:19:30 +00:00
<copy todir= "@{todir}" encoding= "utf-8" overwrite= "yes" verbose= "yes" >
2016-11-04 14:39:19 +00:00
<filesets />
<filterset begintoken= "@{" endtoken= "}" >
<propertyset >
<propertyref builtin= "all" />
</propertyset>
</filterset>
</copy>
</sequential>
</macrodef>
2015-05-18 07:03:05 +00:00
<target name= "resolve" description= "Retrieve dependencies with Apache Ivy" >
<delete dir= "${dir.lib}/ivy" />
<ivy:retrieve pattern= "${dir.lib}/ivy/[type]/[artifact].[ext]" />
2016-03-23 14:57:52 +00:00
<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" >
2016-12-16 07:45:19 +00:00
<param name= "arch" value= "linux-armv7l" />
2016-03-23 14:57:52 +00:00
<param name= "arch.jna" value= "linux-arm" />
2016-12-16 07:45:19 +00:00
<param name= "arch.7zj" value= "linux-arm" />
</antcall>
<antcall target= "resolve-import-native" >
<param name= "arch" value= "linux-armv8" />
<param name= "arch.jna" value= "linux-aarch64" />
<param name= "arch.7zj" value= "linux-aarch64" />
2016-03-23 14:57:52 +00:00
</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>
2015-05-18 07:03:05 +00:00
</target>
2014-08-01 11:47:39 +00:00
<target name= "jar" depends= "build" >
2017-03-06 06:06:04 +00:00
<jar destfile= "${dir.dist}/lib/filebot.jar" compress= "no" >
2016-05-12 14:15:19 +00:00
<fileset dir= "${dir.build}" />
2014-08-01 11:47:39 +00:00
<manifest >
2016-04-21 11:57:01 +00:00
<attribute name= "Build-Date" value= "${tstamp.date}" />
<attribute name= "Build-Revision" value= "${revision}" />
2016-11-04 20:19:30 +00:00
<attribute name= "Main-Class" value= "${main.class}" />
2014-08-01 11:47:39 +00:00
</manifest>
</jar>
</target>
2016-08-13 16:17:06 +00:00
<target name= "fatjar" depends= "jar" description= "Build executable jar" >
2017-02-12 13:15:40 +00:00
<jar destfile= "${path.fatjar}" filesetmanifest= "merge" duplicate= "fail" compress= "no" >
2014-08-01 11:47:39 +00:00
<!-- include main jar -->
2017-03-06 05:55:52 +00:00
<zipfileset src= "${dir.dist}/lib/filebot.jar" />
2014-08-01 11:47:39 +00:00
2017-02-12 13:15:40 +00:00
<!-- include core libraries -->
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/args4j.jar" >
2017-02-12 13:15:40 +00:00
<include name= "org/kohsuke/args4j/**" />
2014-08-01 11:47:39 +00:00
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/ehcache.jar" >
2017-02-12 13:15:40 +00:00
<include name= "META-INF/services/**" />
<include name= "net/sf/ehcache/**" />
<include name= "org/terracotta/**" />
<include name= "ehcache-failsafe.xml" />
<include name= "build-info.properties" />
2014-08-01 11:47:39 +00:00
</zipfileset>
2017-02-12 13:15:40 +00:00
<!-- include UI libraries -->
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/miglayout-core.jar" >
2014-08-01 11:47:39 +00:00
<include name= "net/miginfocom/**" />
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/miglayout-swing.jar" >
2014-08-01 11:47:39 +00:00
<include name= "net/miginfocom/**" />
</zipfileset>
2017-03-19 19:27:50 +00:00
<zipfileset src= "${dir.dist}/lib/glazedlists_java16.jar" >
2017-02-12 13:15:40 +00:00
<include name= "ca/odell/glazedlists/**" />
2014-08-01 11:47:39 +00:00
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/controlsfx.jar" >
2017-02-12 13:15:40 +00:00
<include name= "org/controlsfx/dialog/**" />
<include name= "impl/org/controlsfx/i18n/**" />
<include name= "controlsfx.properties" />
2014-08-06 12:03:16 +00:00
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/rsyntaxtextarea.jar" >
2017-02-12 13:15:40 +00:00
<include name= "org/fife/**" />
2014-08-01 11:47:39 +00:00
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/lanterna.jar" >
2017-02-12 13:15:40 +00:00
<include name= "com/googlecode/lanterna/**" />
<include name= "**/*.properties" />
2014-08-01 11:47:39 +00:00
</zipfileset>
2017-02-12 13:15:40 +00:00
<!-- include IO libraries -->
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/xz.jar" >
2014-08-01 11:47:39 +00:00
<include name= "org/tukaani/xz/**" />
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/json-io.jar" >
2017-02-12 13:15:40 +00:00
<include name= "com/cedarsoftware/util/**" />
2014-08-01 11:47:39 +00:00
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/xmlrpc.jar" >
2017-02-12 13:15:40 +00:00
<include name= "redstone/xmlrpc/**" />
2014-08-01 11:47:39 +00:00
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/sevenzipjbinding.jar" >
2017-02-12 13:15:40 +00:00
<include name= "net/sf/sevenzipjbinding/**" />
2014-08-01 11:47:39 +00:00
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/commons-io.jar" >
2014-08-01 11:47:39 +00:00
<include name= "org/apache/commons/io/**" />
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/commons-vfs2.jar" >
2017-02-12 13:15:40 +00:00
<include name= "org/apache/commons/vfs2/**" />
2014-08-01 11:47:39 +00:00
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/junrar.jar" >
2017-02-12 13:15:40 +00:00
<include name= "com/github/junrar/**" />
2014-08-01 11:47:39 +00:00
</zipfileset>
2017-02-12 13:15:40 +00:00
<!-- include native libraries -->
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/ObjCBridge.jar" >
2015-05-18 08:29:04 +00:00
<include name= "ca/weblite/**" />
2014-08-06 12:03:16 +00:00
<include name= "com/sun/jna/**" />
2014-08-01 11:47:39 +00:00
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/jna.jar" >
2017-02-12 13:15:40 +00:00
<include name= "com/sun/jna/**" />
2014-08-01 11:47:39 +00:00
2017-02-12 13:15:40 +00:00
<!-- exclude native libraries -->
<exclude name= "**/*.a" />
<exclude name= "**/*.so" />
<exclude name= "**/*.dll" />
<exclude name= "**/*.dylib" />
<exclude name= "**/*.jnilib" />
2015-06-04 10:12:56 +00:00
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/jna-platform.jar" >
2017-02-12 13:15:40 +00:00
<include name= "com/sun/jna/platform/**" />
2015-06-04 10:12:56 +00:00
</zipfileset>
2017-02-12 13:15:40 +00:00
<!-- include extra libraries -->
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/guava.jar" >
2017-02-12 13:15:40 +00:00
<include name= "com/google/**" />
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/streamex.jar" >
2017-02-12 13:15:40 +00:00
<include name= "one/util/streamex/**" />
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/icu4j.jar" >
2017-02-12 13:15:40 +00:00
<include name= "com/ibm/icu/**" />
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/simmetrics.jar" >
2017-02-12 13:15:40 +00:00
<include name= "uk/ac/shef/wit/simmetrics/**" />
2015-06-04 10:12:56 +00:00
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/language-detector.jar" >
2016-01-31 16:22:36 +00:00
<include name= "be/frma/langguess/**" />
<include name= "com/cybozu/labs/langdetect/**" />
<include name= "com/optimaize/langdetect/**" />
2016-01-31 16:13:04 +00:00
<include name= "languages/**" />
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/metadata-extractor.jar" >
2017-02-24 20:05:07 +00:00
<include name= "com/drew/**" />
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/xmpcore.jar" >
2017-02-24 20:05:07 +00:00
<include name= "com/adobe/xmp/**" />
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/jacksum.jar" >
2017-02-12 13:15:40 +00:00
<include name= "jonelo/jacksum/adapt/**" />
<include name= "jonelo/jacksum/algorithm/**" />
<include name= "jonelo/sugar/util/**" />
2016-01-31 16:13:04 +00:00
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/commons-logging.jar" >
2017-02-12 13:15:40 +00:00
<include name= "org/apache/commons/logging/**" />
2016-02-06 12:23:59 +00:00
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/slf4j-api.jar" >
2017-02-12 13:15:40 +00:00
<include name= "org/slf4j/**" />
2016-05-08 06:54:56 +00:00
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/slf4j-jdk14.jar" >
2017-02-12 13:15:40 +00:00
<include name= "org/slf4j/**" />
2016-11-24 20:13:39 +00:00
</zipfileset>
2017-02-12 13:15:40 +00:00
<!-- include Groovy libraries -->
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/groovy-all.jar" >
2017-02-12 13:15:40 +00:00
<include name= "groovy*/**" />
<include name= "org/codehaus/groovy/**" />
<include name= "META-INF/dgminfo" />
<include name= "META-INF/services/**" />
<include name= "META-INF/*.properties" />
2016-11-26 11:02:39 +00:00
2017-02-12 13:15:40 +00:00
<!-- filebot already includes it's own extension modules -->
<exclude name= "META-INF/services/org.codehaus.groovy.runtime.ExtensionModule" />
2014-08-06 12:03:16 +00:00
</zipfileset>
2017-02-12 13:15:40 +00:00
<!-- Ivy for @Grapes automatic dependency management -->
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/ivy.jar" >
2017-02-12 13:15:40 +00:00
<include name= "org/apache/ivy/**" />
2014-08-01 11:47:39 +00:00
</zipfileset>
2014-08-06 12:03:16 +00:00
<!-- libraries used in external scripts -->
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/jsoup.jar" >
2014-08-06 12:03:16 +00:00
<include name= "org/jsoup/**" />
2014-08-01 11:47:39 +00:00
</zipfileset>
<!-- AntBuilder including dependencies for ant - javamail, ant - commons - net and ant - jsch -->
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/ant.jar" >
2014-08-01 11:47:39 +00:00
<include name= "org/apache/tools/**" />
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/ant-launcher.jar" >
2014-08-01 11:47:39 +00:00
<include name= "org/apache/tools/**" />
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/ant-commons-net.jar" >
2014-08-01 11:47:39 +00:00
<include name= "org/apache/tools/**" />
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/ant-jsch.jar" >
2014-08-01 11:47:39 +00:00
<include name= "org/apache/tools/**" />
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/ant-javamail.jar" >
2014-08-01 11:47:39 +00:00
<include name= "org/apache/tools/**" />
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/commons-net.jar" >
2014-08-01 11:47:39 +00:00
<include name= "org/apache/commons/net/**" />
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/jsch.jar" >
2014-08-01 11:47:39 +00:00
<include name= "com/jcraft/jsch/**" />
</zipfileset>
2017-03-04 10:14:14 +00:00
<zipfileset src= "${dir.dist}/lib/mail.jar" >
2014-08-01 11:47:39 +00:00
<include name= "javax/mail/**" />
<include name= "com/sun/mail/**" />
<include name= "META-INF/*mail*" />
</zipfileset>
</jar>
</target>
2016-09-19 08:32:49 +00:00
<target name= "appbundle" description= "Build Mac application bundle" depends= "revision" >
2017-03-10 20:37:52 +00:00
<bundleapp outputdirectory= "${dir.dist}" executablename= "filebot.launcher" hidedockicon= "true" minimumsystemversion= "${mac.version}" jvmrequired= "${jvm.version}" name= "${application.name}" displayname= "${application.name} ${version}" version= "${revision}" shortversion= "${version}" identifier= "${package.identifier}.Command" mainclassname= "${main.class}" icon= "${dir.installer}/appbundle/filebot.icns" copyright= "${tstamp.year} ${package.developer}" applicationcategory= "${mac.application.category}" highresolutioncapable= "true" supportsautomaticgraphicsswitching= "true" debug= "true" >
2014-08-01 11:47:39 +00:00
<classpath file= "${path.fatjar}" />
<librarypath dir= "${dir.lib}/native/mac-x86_64" />
2016-09-19 06:17:09 +00:00
<librarypath dir= "${dir.installer}/appbundle/MacOS" />
2014-10-10 20:14:59 +00:00
<arch name= "x86_64" />
2015-05-10 07:29:54 +00:00
<option value= "-Dnet.filebot.UserFiles.fileChooser=COCOA" />
2014-08-01 11:47:39 +00:00
<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= "-Dfile.encoding=UTF-8" />
2014-08-01 17:41:31 +00:00
<option value= "-Djna.nosys=true" />
2014-08-01 11:47:39 +00:00
<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" />
2016-11-04 20:19:30 +00:00
<option value= "-Xdock:name=${application.name}" />
2014-08-01 11:47:39 +00:00
<option value= "-Xdock:icon=Contents/Resources/filebot.icns" />
<option value= "-Dapple.laf.useScreenMenuBar=true" />
2016-03-19 18:00:25 +00:00
2016-03-19 20:38:57 +00:00
<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" />
2014-08-01 11:47:39 +00:00
</bundleapp>
2017-02-09 16:18:24 +00:00
<!-- application bundle folder as tar -->
<tar destfile= "${dir.dist}/${release}-darwin.tar.xz" compression= "xz" longfile= "posix" encoding= "utf-8" >
<tarfileset dir= "${dir.dist}" includes= "${application.name}.app/**" excludes= "**/MacOS/**" />
<tarfileset dir= "${dir.dist}" includes= "${application.name}.app/**/**.dylib" />
2016-09-17 06:53:14 +00:00
2017-02-09 16:18:24 +00:00
<tarfileset dir= "${dir.dist}" includes= "${application.name}.app/**/fpcalc" filemode= "755" />
<tarfileset dir= "${dir.dist}" includes= "${application.name}.app/**/**.sh" filemode= "755" />
</tar>
2014-08-01 11:47:39 +00:00
</target>
2015-12-14 09:21:31 +00:00
<target name= "appbundle-maspkg-core" >
<antcall target= "appbundle-maspkg" >
<param name= "application.name" value= "FileBot" />
2016-11-04 20:19:30 +00:00
<param name= "application.executable" value= "filebot.launcher" />
2016-11-15 13:14:21 +00:00
<param name= "application.identifier" value= "${package.identifier}" />
2015-12-14 09:21:31 +00:00
<param name= "application.icon" value= "${dir.installer}/appbundle/filebot.icns" />
2016-11-04 20:19:30 +00:00
<param name= "application.cert.appbundle" value= "3rd Party Mac Developer Application: ${package.company}" />
<param name= "application.cert.installer" value= "3rd Party Mac Developer Installer: ${package.company}" />
2016-05-03 19:06:58 +00:00
<!-- MAS does not allow subtitle apps -->
2016-03-19 18:49:48 +00:00
<param name= "application.mode" value= "Rename|Episodes|SFV|Filter|List" />
2016-05-03 19:06:58 +00:00
<!-- libjfxwebkit.dylib cannot be deployed on the MAS due to deprecated dependencies -->
2016-05-03 19:49:14 +00:00
<param name= "application.help" value= "ask" />
2015-12-14 09:21:31 +00:00
</antcall>
2014-08-01 11:47:39 +00:00
</target>
2016-01-22 10:06:35 +00:00
2015-12-14 09:21:31 +00:00
<target name= "appbundle-maspkg-subtitles" >
<antcall target= "appbundle-maspkg" >
2016-01-14 07:24:24 +00:00
<param name= "application.name" value= "FileBot Subtitles" />
2016-11-04 20:19:30 +00:00
<param name= "application.executable" value= "filebot.subtitles.launcher" />
2016-11-15 13:14:21 +00:00
<param name= "application.identifier" value= "${package.identifier}.Subtitles" />
2015-12-14 09:21:31 +00:00
<param name= "application.icon" value= "${dir.installer}/appbundle/subtitles.icns" />
2016-11-04 20:19:30 +00:00
<param name= "application.cert.appbundle" value= "Developer ID Application: ${package.company}" />
<param name= "application.cert.installer" value= "Developer ID Installer: ${package.company}" />
2015-12-14 09:58:56 +00:00
<param name= "application.mode" value= "Subtitles" />
<param name= "application.help" value= "skip" />
2015-12-14 09:21:31 +00:00
</antcall>
</target>
2014-08-01 11:47:39 +00:00
2015-12-12 12:06:13 +00:00
2016-09-19 08:32:49 +00:00
<target name= "appbundle-maspkg" depends= "revision" >
2016-11-13 22:32:28 +00:00
<property name= "path.app" location= "${dir.dist}/${application.name}.app" />
<property name= "path.pkg" location= "${dir.dist}/${application.name}_${version}_r${revision}.pkg" />
2016-11-13 20:17:52 +00:00
2016-11-13 22:32:28 +00:00
<property name= "path.app.jre" location= "${path.app}/Contents/PlugIns/jre1.${jre.major}.0_${jre.build}.jre" />
<property name= "jre.path" location= "${dir.cache}/jre1.${jre.major}.0_${jre.build}.jre/Contents/Home" />
2016-11-13 21:41:07 +00:00
<!-- fetch latest JRE -->
<exec executable= "get-java.sh" dir= "${dir.cache}" failonerror= "yes" />
2017-04-01 18:53:40 +00:00
<untar src= "${dir.cache}/jre-${jre.major}u${jre.build}-macosx-x64.tar.gz" dest= "${dir.cache}" compression= "gzip" >
2017-04-01 18:50:41 +00:00
<patternset >
2016-11-13 21:41:07 +00:00
<exclude name= "**/bin/**" />
<exclude name= "**/man/**" />
<!-- webkit uses deprecate font libraries which is not allowed in the app store -->
<exclude name= "**/libjfxmedia_qtkit.dylib" />
<exclude name= "**/libjfxwebkit.dylib" />
2017-04-01 18:50:41 +00:00
</patternset>
</untar>
2015-12-14 09:21:31 +00:00
2017-02-20 11:29:52 +00:00
<!-- MAS validation is a bit buggy and requires even libraries and frameworks to have a unique CFBundleIdentifier Collision -->
2017-02-20 14:09:16 +00:00
<replace file= "${jre.path}/../Info.plist" token= "com.oracle.java.${jre.major}u${jre.build}.jre" value= "${application.identifier}.jre" encoding= "UTF-8" />
2017-02-20 11:29:52 +00:00
2016-11-04 20:19:30 +00:00
<bundleapp jvmrequired= "${jvm.version}" minimumsystemversion= "${mac.version}" outputdirectory= "${dir.dist}" executablename= "${application.executable}" name= "${application.name}" displayname= "${application.name}" version= "${revision}" shortversion= "${version}" identifier= "${application.identifier}" mainclassname= "${main.class}" icon= "${application.icon}" copyright= "${tstamp.year} ${package.company}" applicationcategory= "${mac.application.category}" highresolutioncapable= "true" supportsautomaticgraphicsswitching= "true" debug= "true" >
2017-03-06 05:55:52 +00:00
<classpath dir= "${dir.dist}/lib" />
2015-12-12 12:06:13 +00:00
<librarypath dir= "${dir.lib}/native/mac-x86_64" />
2016-09-19 06:17:09 +00:00
2015-12-12 12:06:13 +00:00
<arch name= "x86_64" />
<runtime dir= "${jre.path}" />
2015-12-14 09:47:29 +00:00
<argument value= "--mode" />
<argument value= "${application.mode}" />
2015-12-12 12:06:13 +00:00
<!-- WORKING_DIR is sandbox data folder -->
2016-11-13 22:32:28 +00:00
<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" />
2015-12-12 12:06:13 +00:00
<option value= "-Dnet.filebot.UserFiles.fileChooser=COCOA" />
2015-12-14 09:21:31 +00:00
<option value= "-Dapplication.name=${application.name}" />
2015-12-14 09:58:56 +00:00
<option value= "-Dapplication.help=${application.help}" />
2015-12-12 12:06:13 +00:00
<option value= "-Dapplication.deployment=mas" />
<option value= "-Dapplication.update=skip" />
<option value= "-DuseExtendedFileAttributes=true" />
<option value= "-DuseCreationDate=false" />
<option value= "-Djava.net.useSystemProxies=true" />
<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" />
2016-11-13 22:32:28 +00:00
2015-12-12 12:06:13 +00:00
<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" />
2016-03-19 18:45:08 +00:00
2016-03-19 20:38:57 +00:00
<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" />
2015-12-12 12:06:13 +00:00
</bundleapp>
2016-11-13 22:32:28 +00:00
<!-- remove unused language resources -->
2016-11-13 20:17:52 +00:00
<delete verbose= "yes" includeEmptyDirs= "yes" >
2016-11-13 22:32:28 +00:00
<fileset dir= "${path.app}/Contents/Resources" >
<include name= "**.lproj/**" />
2016-11-13 20:17:52 +00:00
<exclude name= "en.lproj/**" />
</fileset>
</delete>
2016-11-11 22:12:11 +00:00
2016-11-13 22:32:28 +00:00
<!-- fix broken symlink -->
<copy file= "${jre.path}/lib/jli/libjli.dylib" tofile= "${path.app.jre}/Contents/MacOS/libjli.dylib" overwrite= "yes" verbose= "yes" failonerror= "yes" />
<!-- fix permissions (fpcalc and jspawnhelper be executable and signed with inherit entitlements) -->
<chmod perm= "+x" >
<fileset dir= "${path.app}" >
<include name= "**/jspawnhelper" />
<include name= "**/fpcalc" />
<include name= "**/*.sh" />
</fileset>
</chmod>
2016-11-11 22:12:11 +00:00
2015-12-12 12:06:13 +00:00
<!-- JRE sign all jars, dylibs and executables -->
2016-11-13 22:32:28 +00:00
<property name= "sign" value= "--verbose --force --sign '${application.cert.appbundle}'" />
<property name= "entitlements" value= "--entitlements '${dir.installer}/appbundle/FileBot.entitlements'" />
<property name= "entitlements.inherit" value= "--entitlements '${dir.installer}/appbundle/inherit.entitlements'" />
<!-- sign helper tools with inherit entitlements -->
<apply executable= "codesign" parallel= "yes" failonerror= "yes" >
<arg line= "${sign} ${entitlements.inherit}" />
<fileset dir= "${path.app}" >
2016-11-13 20:34:35 +00:00
<include name= "**/jspawnhelper" />
2016-11-13 22:32:28 +00:00
<include name= "**/fpcalc" />
2016-11-13 21:00:02 +00:00
<include name= "**/*.dylib" />
<include name= "**/*.jar" />
2016-11-13 22:32:28 +00:00
<include name= "**/*.sh" />
2016-11-11 22:12:11 +00:00
</fileset>
</apply>
2016-11-13 22:32:28 +00:00
<!-- sign frameworks -->
<exec executable= "codesign" failonerror= "yes" >
<arg line= "${sign} ${entitlements.inherit} '${path.app.jre}'" />
2016-11-13 21:00:02 +00:00
</exec>
2016-11-13 22:32:28 +00:00
<!-- sign app -->
<exec executable= "codesign" failonerror= "yes" >
<arg line= "${sign} ${entitlements} '${path.app}'" />
2015-12-12 12:06:13 +00:00
</exec>
2016-11-13 22:32:28 +00:00
<!-- verify signature -->
<exec executable= "codesign" failonerror= "yes" >
<arg line= "--verbose --deep --verify '${path.app}'" />
2016-11-13 21:00:02 +00:00
</exec>
2016-11-13 22:32:28 +00:00
<!-- build package -->
<exec executable= "productbuild" failonerror= "yes" >
<arg line= "--component '${path.app}' /Applications '${path.pkg}' --sign '${application.cert.installer}'" />
2015-12-12 12:06:13 +00:00
</exec>
2016-09-19 09:09:47 +00:00
<!-- store as release build -->
2016-11-13 22:32:28 +00:00
<copy todir= "${dir.release}" file= "${path.pkg}" verbose= "yes" />
2015-12-12 12:06:13 +00:00
</target>
2016-09-19 08:32:49 +00:00
<target name= "snap" depends= "revision" >
2017-03-23 16:01:57 +00:00
<copy todir= "${dir.dist}/snap/filebot/usr/lib/filebot/java" >
2017-03-23 13:22:22 +00:00
<fileset dir= "${dir.dist}/lib" includes= "*.jar" />
</copy>
2016-11-24 20:26:32 +00:00
<!-- include native binaries that are not available via apt -->
2017-03-23 16:01:57 +00:00
<copy todir= "${dir.dist}/snap/filebot/usr/lib/filebot/amd64" >
2017-03-23 13:22:22 +00:00
<fileset dir= "${dir.lib}/native/linux-amd64" includes= "libjnidispatch.so, lib7-Zip-JBinding.so" />
2016-08-05 17:37:16 +00:00
</copy>
2016-08-05 17:10:36 +00:00
<!-- copy files and resolve ant variables -->
2017-03-23 16:01:57 +00:00
<copy-replace todir= "${dir.dist}/snap" >
2017-03-23 16:03:00 +00:00
<fileset dir= "${dir.installer}/snap" />
2016-11-04 14:39:19 +00:00
</copy-replace>
2017-03-23 16:01:57 +00:00
<chmod perm= "+x" file= "${dir.dist}/snap/filebot/filebot.sh" />
2016-08-05 17:10:36 +00:00
2017-03-23 16:01:57 +00:00
<exec executable= "snapcraft" dir= "${dir.dist}/snap" failonerror= "yes" >
2016-08-05 17:10:36 +00:00
<arg line= "snap" />
</exec>
</target>
2016-09-19 08:32:49 +00:00
<target name= "deb" description= "Build Debian Linux packages" depends= "revision" >
2014-08-01 11:47:39 +00:00
<antcall target= "deb-arch" >
2016-11-07 07:11:57 +00:00
<param name= "arch" value= "amd64" />
<param name= "deb.arch" value= "amd64" />
2014-08-01 11:47:39 +00:00
</antcall>
2016-11-07 07:11:57 +00:00
2017-02-15 19:35:29 +00:00
<!-- arch i686 not allowed by deb specification, must be i386 for 32 - bit x86 systems -->
2014-08-01 11:47:39 +00:00
<antcall target= "deb-arch" >
2016-11-07 07:11:57 +00:00
<param name= "arch" value= "i686" />
<param name= "deb.arch" value= "i386" />
2014-08-01 11:47:39 +00:00
</antcall>
2015-05-22 06:37:43 +00:00
2017-02-15 19:35:29 +00:00
<!-- arch armv7l not allowed by deb specification, must be armhf for 32 - bit armv7l systems -->
2016-11-03 22:46:00 +00:00
<antcall target= "deb-arch" >
2017-02-07 13:50:37 +00:00
<param name= "arch" value= "armv7l" />
<param name= "deb.arch" value= "armhf" />
2016-11-03 22:46:00 +00:00
</antcall>
2014-08-01 11:47:39 +00:00
</target>
2016-11-03 22:46:00 +00:00
<target name= "deb-arch" >
2017-02-07 13:50:37 +00:00
<property name= "dir.staging" location= "${dir.dist}/deb/${arch}" />
2016-11-03 22:46:00 +00:00
2016-11-04 14:39:19 +00:00
<copy-replace todir= "${dir.staging}" >
2017-02-07 13:50:37 +00:00
<fileset dir= "${dir.installer}/deb" />
2016-11-04 14:39:19 +00:00
</copy-replace>
2016-11-03 22:46:00 +00:00
2017-02-14 16:23:17 +00:00
<!-- jdeb does not support tarfileset fullpath attribute (see https://github.com/tcurdt/jdeb/issues/245) -->
<copy file= "${path.fatjar}" tofile= "${dir.staging}/FileBot.jar" />
2017-02-15 19:35:29 +00:00
<jdeb destfile= "${dir.dist}/${package.name}_${version}_${deb.arch}.deb" control= "${dir.staging}/control" compression= "xz" verbose= "true" >
2017-02-14 16:23:17 +00:00
<tarfileset prefix= "/usr/share/filebot" dir= "${dir.staging}" includes= "*.jar" />
2017-02-14 15:48:04 +00:00
<tarfileset prefix= "/usr/share/filebot" dir= "${dir.staging}" includes= "*.sh" filemode= "755" />
2017-02-14 16:23:17 +00:00
<tarfileset prefix= "/usr/share/filebot" dir= "${dir.lib}/native/linux-${arch}" includes= "fpcalc" filemode= "755" />
<tarfileset prefix= "/usr/share/filebot" dir= "${dir.lib}/native/linux-${arch}" includes= "*.so" />
2017-02-14 15:48:04 +00:00
<tarfileset prefix= "/usr/share/icons/hicolor/scalable/apps" dir= "${dir.installer}/icons" includes= "filebot.svg" />
2017-02-14 17:03:27 +00:00
<tarfileset prefix= "/usr/share" dir= "${dir.staging}/share" includes= "**/*.desktop" />
2016-11-03 22:46:00 +00:00
</jdeb>
2014-08-01 11:47:39 +00:00
</target>
2016-09-19 08:32:49 +00:00
<target name= "appx" description= "Build Windows 10 package" depends= "revision" >
2016-09-19 07:41:40 +00:00
<copy todir= "${dir.dist}/appx" >
2017-03-20 07:33:36 +00:00
<fileset dir= "${dir.installer}/appx" excludes= "*.xml, *.ini, *.url" />
2016-09-19 07:41:40 +00:00
<fileset dir= "${dir.lib}/native/win32-x64" />
2016-09-19 08:50:10 +00:00
</copy>
2017-03-12 09:21:11 +00:00
<copy todir= "${dir.dist}/appx/lib" >
<fileset dir= "${dir.dist}/lib" includes= "*.jar" />
</copy>
<!-- copy files and resolve ant variables -->
<copy-replace todir= "${dir.dist}/appx" >
<fileset dir= "${dir.installer}/appx" includes= "*.xml, *.ini" excludes= "*.l4j.xml" />
</copy-replace>
2016-11-02 19:50:39 +00:00
2016-11-02 19:58:03 +00:00
<!-- fetch latest JRE -->
2016-11-02 22:40:11 +00:00
<exec executable= "powershell" dir= "${dir.cache}" failonerror= "yes" >
2016-11-11 22:12:11 +00:00
<arg line= "get-java" />
2016-11-02 19:50:39 +00:00
</exec>
2017-04-01 18:53:40 +00:00
<untar src= "${dir.cache}/jre-${jre.major}u${jre.build}-windows-x64.tar.gz" dest= "${dir.dist}/appx/jre" compression= "gzip" >
2016-09-19 08:50:10 +00:00
<cutdirsmapper dirs= "1" />
2017-04-01 18:53:40 +00:00
</untar>
2017-03-06 06:57:22 +00:00
2016-09-19 07:41:40 +00:00
2016-12-01 01:44:12 +00:00
<exec executable= "makepri" dir= "${dir.dist}/appx" failonerror= "yes" >
2016-12-01 01:58:28 +00:00
<arg line= "createconfig /o /pv 10.0.0 /cf priconfig.xml /dq en-US" />
2016-12-01 01:44:12 +00:00
</exec>
<exec executable= "makepri" dir= "${dir.dist}/appx" failonerror= "yes" >
2016-12-01 01:58:28 +00:00
<arg line= "new /o /pr . /cf priconfig.xml /in ${microsoft.application.name}" />
2016-12-01 01:44:12 +00:00
</exec>
2016-09-19 07:41:40 +00:00
<exec executable= "makeappx" dir= "${dir.dist}" failonerror= "yes" >
2016-11-16 22:45:16 +00:00
<arg line= "pack /v /o /d appx /p ${release}_r${revision}.appx" />
2016-09-19 07:41:40 +00:00
</exec>
</target>
2016-09-19 08:32:49 +00:00
<target name= "msi" description= "Build Windows Installer packages" depends= "revision" >
2014-08-01 11:47:39 +00:00
<antcall target= "msi-arch" >
2016-11-07 07:11:57 +00:00
<param name= "arch" value= "x64" />
2014-08-01 11:47:39 +00:00
</antcall>
<antcall target= "msi-arch" >
2016-11-07 07:11:57 +00:00
<param name= "arch" value= "x86" />
2014-08-01 11:47:39 +00:00
</antcall>
</target>
2015-04-05 07:15:43 +00:00
2014-08-01 11:47:39 +00:00
<target name= "msi-arch" >
2016-11-04 20:19:30 +00:00
<property name= "dir.staging" location= "${dir.dist}/msi/${arch}" />
<copy todir= "${dir.staging}" >
<fileset dir= "${dir.installer}/msi" includes= "*.exe, *.rtf, *.bmp" />
</copy>
<copy todir= "${dir.staging}" >
<fileset dir= "${dir.lib}/native/win32-${arch}" />
</copy>
<copy todir= "${dir.staging}" >
<fileset dir= "${dir.installer}/icons" includes= "*.ico" />
</copy>
<copy-replace todir= "${dir.staging}" >
2016-11-05 17:17:58 +00:00
<fileset dir= "${dir.installer}/msi" includes= "*.wix, *.ini, *.properties" />
2016-11-04 20:19:30 +00:00
</copy-replace>
<exec executable= "candle" dir= "${dir.staging}" failonerror= "true" >
<arg line= "filebot.wix -out msi.wixobj" />
2014-08-01 11:47:39 +00:00
</exec>
2016-11-04 20:19:30 +00:00
<exec executable= "light" dir= "${dir.staging}" failonerror= "true" >
<arg line= "msi.wixobj -sval -ext WixUIExtension -out ${dir.dist}/${release}_${arch}.msi" />
2014-08-01 11:47:39 +00:00
</exec>
</target>
2016-09-19 08:32:49 +00:00
<target name= "portable" description= "Build portable package" depends= "revision" >
2017-02-09 16:18:24 +00:00
<tar destfile= "${dir.dist}/${release}-portable.tar.xz" compression= "xz" longfile= "posix" encoding= "utf-8" >
<tarfileset file= "${path.fatjar}" fullpath= "FileBot.jar" />
2017-04-13 09:54:09 +00:00
<tarfileset dir= "${dir.installer}/portable" includes= "*.exe, *.ini, *.cmd, *.pub" />
2017-02-09 16:18:24 +00:00
<tarfileset dir= "${dir.installer}/portable" includes= "*.sh" filemode= "755" />
<!-- include native libraries for all supported platforms -->
<tarfileset prefix= "lib/armv7l" dir= "${dir.lib}/native/linux-armv7l" includes= "*.so" />
2017-04-03 08:03:08 +00:00
<tarfileset prefix= "lib/aarch64" dir= "${dir.lib}/native/linux-armv8" includes= "*.so" />
2017-02-09 16:18:24 +00:00
<tarfileset prefix= "lib/i686" dir= "${dir.lib}/native/linux-i686" includes= "*.so" />
<tarfileset prefix= "lib/x86_64" dir= "${dir.lib}/native/linux-amd64" includes= "*.so" />
</tar>
2014-08-01 11:47:39 +00:00
</target>
2016-09-19 08:32:49 +00:00
<target name= "spk" description= "Build Synology NAS package" depends= "revision" >
2016-11-04 20:19:30 +00:00
<spk destdir= "${dir.dist}" name= "${package.name}" version= "${version}" arch= "noarch" compression= "xz" >
<info name= "displayname" value= "${application.name}" />
<info name= "description" value= "${package.description}" />
<info name= "maintainer" value= "${package.project}" />
<info name= "maintainer_url" value= "${package.homepage}" />
<info name= "distributor" value= "${package.project}" />
<info name= "distributor_url" value= "${package.homepage}" />
<info name= "support_url" value= "${link.help.synology}" />
<info name= "helpurl" value= "${link.help.manpage}" />
2016-10-25 19:55:57 +00:00
<info name= "firmware" value= "6.0" />
2015-05-16 04:52:25 +00:00
<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" />
2016-09-29 11:00:58 +00:00
2016-09-29 11:37:23 +00:00
<!-- Dependencies are troublesome for some users because they cannot be skipped or ignored (i.e. DSM does not support optional or recommended dependencies) -->
2016-09-29 11:00:58 +00:00
<!-- <info name="start_dep_services" value="ssh" /> -->
<!-- <info name="install_dep_packages" value="oracle - java" /> -->
2014-08-01 11:47:39 +00:00
<icon size= "72" file= "${dir.installer}/icons/icon72.png" />
2015-05-03 15:57:56 +00:00
<icon size= "256" file= "${dir.installer}/icons/icon256.png" />
2015-05-05 13:48:16 +00:00
2014-08-01 11:47:39 +00:00
<scripts dir= "${dir.installer}/spk/scripts" filemode= "755" />
2015-05-16 05:35:51 +00:00
<package dir= "${dir.installer}/spk/package" includes= "*.sh" filemode= "755" />
<package file= "${path.fatjar}" fullpath= "FileBot.jar" />
2016-12-16 08:26:34 +00:00
<!-- include native libraries for all supported platforms -->
2016-12-16 11:32:05 +00:00
<package prefix= "lib/armv7l" dir= "${dir.lib}/native/linux-armv7l" includes= "*.so" />
<package prefix= "lib/armv8" dir= "${dir.lib}/native/linux-armv8" includes= "*.so" />
<package prefix= "lib/i686" dir= "${dir.lib}/native/linux-i686" includes= "*.so" />
<package prefix= "lib/x86_64" dir= "${dir.lib}/native/linux-amd64" includes= "*.so" />
2016-12-16 08:26:34 +00:00
2015-11-07 13:33:42 +00:00
<codesign secring= "${dir.installer}/gpg/secring.gpg" keyid= "${gpg.key}" password= "${gpg.pwd}" />
2014-08-01 11:47:39 +00:00
</spk>
</target>
2016-08-13 16:11:37 +00:00
<target name= "build" depends= "revision" >
2017-03-04 10:14:14 +00:00
<!-- copy dependencies -->
<copy todir= "${dir.dist}/lib" flatten= "yes" verbose= "yes" >
<fileset dir= "${dir.lib}/ivy/jar" >
<include name= "ehcache.jar" />
<include name= "miglayout-core.jar" />
<include name= "miglayout-swing.jar" />
2017-03-19 19:27:50 +00:00
<include name= "glazedlists_java16.jar" />
2017-03-04 10:14:14 +00:00
<include name= "controlsfx.jar" />
<include name= "rsyntaxtextarea.jar" />
<include name= "lanterna.jar" />
<include name= "xz.jar" />
<include name= "sevenzipjbinding.jar" />
<include name= "commons-io.jar" />
<include name= "commons-vfs2.jar" />
<include name= "junrar.jar" />
<include name= "jna.jar" />
<include name= "jna-platform.jar" />
<include name= "streamex.jar" />
<include name= "icu4j.jar" />
<include name= "language-detector.jar" />
<include name= "metadata-extractor.jar" />
<include name= "xmpcore.jar" />
<include name= "commons-logging.jar" />
<include name= "slf4j-api.jar" />
<include name= "slf4j-jdk14.jar" />
<include name= "groovy-all.jar" />
<include name= "ivy.jar" />
<include name= "jsoup.jar" />
<include name= "ant.jar" />
<include name= "ant-launcher.jar" />
<include name= "ant-commons-net.jar" />
<include name= "ant-jsch.jar" />
<include name= "ant-javamail.jar" />
<include name= "commons-net.jar" />
<include name= "jsch.jar" />
<include name= "mail.jar" />
</fileset>
<fileset dir= "${dir.lib}/ivy/bundle" >
<include name= "args4j.jar" />
<include name= "json-io.jar" />
<include name= "guava.jar" />
</fileset>
<fileset dir= "${dir.lib}/jars" >
<include name= "xmlrpc.jar" />
<include name= "ObjCBridge.jar" />
<include name= "simmetrics.jar" />
<include name= "jacksum.jar" />
</fileset>
</copy>
2014-08-01 11:47:39 +00:00
<!-- compile -->
2017-03-04 10:14:14 +00:00
<javac srcdir= "${dir.source}" destdir= "${dir.build}" target= "${jvm.version}" source= "${jvm.version}" encoding= "utf-8" debug= "yes" debuglevel= "lines,vars,source" includeAntRuntime= "no" >
2014-08-01 11:47:39 +00:00
<classpath >
2017-03-04 10:14:14 +00:00
<fileset dir= "${dir.dist}/lib" />
2014-08-01 11:47:39 +00:00
</classpath>
2017-03-04 10:14:14 +00:00
<!-- compile - time dependencies -->
<classpath path= "${dir.lib}/jars/AppleJavaExtensions.jar" />
2014-08-01 11:47:39 +00:00
</javac>
2017-03-04 10:14:14 +00:00
<!-- copy property files -->
<copy-replace todir= "${dir.build}" >
<fileset dir= "${dir.source}" includes= "**/*.properties" />
</copy-replace>
2014-08-01 11:47:39 +00:00
<!-- copy resources -->
<copy todir= "${dir.build}" >
<fileset dir= "${dir.source}" >
<exclude name= "**/*.java" />
2016-11-04 14:39:19 +00:00
<exclude name= "**/*.properties" />
2014-08-01 11:47:39 +00:00
</fileset>
</copy>
</target>
2016-08-05 16:35:35 +00:00
<target name= "clean" description= "Delete build folders" >
2014-08-01 11:47:39 +00:00
<delete dir= "${dir.dist}" />
<delete dir= "${dir.build}" />
</target>
2017-02-08 15:18:27 +00:00
<target name= "website-docs" depends= "revision" >
2017-02-08 15:32:45 +00:00
<javadoc destdir= "${dir.dist}/website/docs" linksource= "yes" access= "public" classpathref= "lib.classpath" encoding= "UTF-8" charset= "UTF-8" windowtitle= "${application.name}" noindex= "yes" nohelp= "yes" notree= "yes" nodeprecated= "yes" nonavbar= "yes" >
2017-02-08 15:18:27 +00:00
<fileset dir= "${dir.source}" includesfile= "${dir.website}/docs/includes.fileset" />
<doctitle > ${application.name} ${application.version}</doctitle>
<bottom > ${application.name} ${application.version} (r${revision}) built on ${tstamp.date}</bottom>
<link href= "http://docs.oracle.com/javase/${jre.major}/docs/api/" />
<link href= "http://docs.groovy-lang.org/latest/html/api/" />
</javadoc>
</target>
2016-09-19 09:09:47 +00:00
<target name= "revision" depends= "init" >
2016-04-20 16:57:03 +00:00
<exec executable= "git" outputproperty= "revision" failonerror= "true" >
<arg line= "rev-list --count master" />
</exec>
<echo > Revision: ${revision}</echo>
2014-08-01 11:47:39 +00:00
</target>
2016-09-19 09:09:47 +00:00
<target name= "init" >
<mkdir dir= "${dir.build}" />
<mkdir dir= "${dir.dist}" />
<mkdir dir= "${dir.release}" />
2016-09-20 06:40:38 +00:00
<mkdir dir= "${dir.cache}" />
2016-09-19 09:09:47 +00:00
2016-09-19 08:32:49 +00:00
<path id= "lib.classpath" >
<fileset dir= "${dir.lib}" includes= "**/*.jar" excludes= "**/*-jdk14.jar" />
</path>
<taskdef resource= "net/filebot/ant/spk/antlib.xml" classpathref= "lib.classpath" />
2016-11-03 22:46:00 +00:00
<taskdef resource= "org/vafer/jdeb/ant/antlib.xml" classpathref= "lib.classpath" />
2016-09-19 08:32:49 +00:00
<taskdef name= "bundleapp" classname= "com.oracle.appbundler.AppBundlerTask" classpathref= "lib.classpath" />
</target>
2017-02-07 13:50:37 +00:00
<target name= "stage-release" depends= "fatjar, spk, deb, portable, appbundle, msi" >
2016-09-19 09:09:47 +00:00
<!-- ensure clean release dir -->
2014-08-01 11:47:39 +00:00
<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}" >
2016-09-17 06:53:14 +00:00
<include name= "*.tar.xz" />
<include name= "*.msi" />
2014-08-01 11:47:39 +00:00
<include name= "*.deb" />
<include name= "*.spk" />
</fileset>
</copy>
2015-06-15 19:25:17 +00:00
2017-01-03 19:46:30 +00:00
<checksum algorithm= "SHA-256" pattern= "{0} {1}" todir= "${dir.cache}/${release}" fileext= ".sha256" >
2015-06-15 19:25:17 +00:00
<fileset dir= "${dir.release}" />
</checksum>
2016-11-04 20:19:30 +00:00
<concat destfile= "${dir.release}/README.md" overwrite= "true" eol= "unix" outputencoding= "utf-8" >
2016-11-06 16:58:55 +00:00
<fileset file= "${dir.installer}/ant/digest.head.md" />
2017-01-03 19:46:30 +00:00
<fileset dir= "${dir.cache}/${release}" includes= "*.sha256" />
2016-11-06 16:58:55 +00:00
<fileset file= "${dir.installer}/ant/digest.tail.md" />
2015-06-15 19:25:17 +00:00
</concat>
2014-08-01 11:47:39 +00:00
</target>
2016-08-05 16:35:35 +00:00
<target name= "deploy-release" depends= "stage-release" description= "Upload release files to SourceForge.net FRS" >
2016-11-02 22:40:11 +00:00
<!-- make sure to upload README.md first -->
2016-04-03 20:11:52 +00:00
<scp todir= "${deploy.release}" trust= "yes" verbose= "true" sftp= "true" keyfile= "${deploy.keyfile}" >
2016-11-02 22:40:11 +00:00
<fileset dir= "${dir.release}/.." includes= "**/README.md" >
2016-01-30 20:07:06 +00:00
<date datetime= "${tstamp.date}" pattern= "yyyy-MM-dd" when= "after" />
2015-11-14 19:25:06 +00:00
</fileset>
</scp>
2016-11-02 22:40:11 +00:00
<!-- upload starting with parent folders so scp will create the release folder for us -->
2016-04-03 20:11:52 +00:00
<scp todir= "${deploy.release}" trust= "yes" verbose= "true" sftp= "true" keyfile= "${deploy.keyfile}" >
2016-11-02 22:40:11 +00:00
<fileset dir= "${dir.release}/.." excludes= "**/README.md" >
2016-01-30 20:07:06 +00:00
<date datetime= "${tstamp.date}" pattern= "yyyy-MM-dd" when= "after" />
2014-08-01 11:47:39 +00:00
</fileset>
</scp>
</target>
2017-02-08 15:18:27 +00:00
<target name= "deploy-website" description= "Upload website resources" depends= "revision" >
2016-10-19 05:41:04 +00:00
<!-- copy image resources -->
<copy todir= "${dir.dist}/website/resources" preservelastmodified= "yes" verbose= "yes" flatten= "true" >
2016-10-19 05:43:08 +00:00
<fileset dir= "${dir.source}/net/filebot/resources" >
<include name= "*.png" />
2016-10-19 05:41:04 +00:00
</fileset>
</copy>
2015-05-10 07:29:54 +00:00
<!-- copy static website resources -->
2015-06-05 07:35:50 +00:00
<copy todir= "${dir.dist}/website" preservelastmodified= "yes" verbose= "yes" >
2014-08-01 11:47:39 +00:00
<fileset dir= "${dir.website}" >
2016-04-03 04:41:20 +00:00
<include name= ".htaccess" />
2015-05-10 07:29:54 +00:00
<include name= "*.html" />
<include name= "*.php" />
2014-08-01 11:47:39 +00:00
<include name= "*.json" />
<include name= "*.xml" />
<include name= "*.css" />
<include name= "*.js" />
<include name= "*.png" />
<include name= "*.ico" />
2014-10-07 15:16:46 +00:00
<include name= "*.txt" />
2016-04-03 04:51:39 +00:00
<include name= "syno/**" />
2014-12-22 16:10:07 +00:00
<include name= "images/**" />
<include name= "screenshots/**" />
2015-05-09 09:56:35 +00:00
<include name= "getting-started/**" />
2014-08-01 11:47:39 +00:00
</fileset>
</copy>
2015-05-16 04:52:25 +00:00
2015-05-10 07:29:54 +00:00
<!-- copy files and resolve ant variables -->
2016-11-04 14:39:19 +00:00
<copy-replace todir= "${dir.dist}/website" >
2015-05-10 07:29:54 +00:00
<fileset dir= "${dir.website}" >
<include name= "*.html" />
<include name= "*.php" />
</fileset>
2016-11-04 14:39:19 +00:00
</copy-replace>
2014-08-01 11:47:39 +00:00
2016-04-03 04:41:20 +00:00
<!-- upload -->
2016-04-03 20:11:52 +00:00
<scp todir= "${deploy.website}" trust= "yes" verbose= "true" sftp= "true" keyfile= "${deploy.keyfile}" >
2016-04-03 04:41:20 +00:00
<fileset dir= "${dir.dist}/website" >
<modified >
2017-01-03 19:46:30 +00:00
<param name= "cache.cachefile" value= "${dir.cache}/scp.cache" />
2016-04-03 04:41:20 +00:00
</modified>
</fileset>
</scp>
</target>
2016-11-24 23:03:32 +00:00
<target name= "deploy-synology" description= "Update Synology Package Source" depends= "init" >
2016-04-03 04:51:39 +00:00
<mkdir dir= "${dir.dist}/website/syno" />
2016-04-03 04:41:20 +00:00
2015-10-06 18:37:27 +00:00
<!-- merge all filebot related packages into a single package source file -->
2015-05-20 09:52:11 +00:00
<package-source file= "${dir.dist}/website/syno/index.json" >
<keyring file= "${dir.installer}/gpg/FileBot.pub" />
2016-11-04 20:19:30 +00:00
<spk file= "${dir.release}/${package.name}-${version}-noarch.spk" >
2017-03-17 12:47:43 +00:00
<info name= "link" value= "https://downloads.sourceforge.net/project/filebot/filebot/${release}/${package.name}-${version}-noarch.spk" />
<thumbnail url= "https://app.filebot.net/syno/filebot-thumbnail.png" />
<snapshot url= "https://app.filebot.net/syno/filebot-snapshot.png" />
2015-05-20 09:52:11 +00:00
</spk>
2015-12-09 16:42:54 +00:00
<source url= "https://raw.githubusercontent.com/filebot/filebot-node/master/spksrc.json" />
<source url= "https://raw.githubusercontent.com/rednoah/java-installer/master/spksrc.json" />
2015-12-09 23:30:12 +00:00
<source url= "https://raw.githubusercontent.com/rednoah/ant-installer/master/spksrc.json" />
2015-05-20 09:52:11 +00:00
</package-source>
2014-08-01 11:47:39 +00:00
<!-- upload -->
2016-04-03 20:11:52 +00:00
<scp todir= "${deploy.website}/syno" trust= "yes" verbose= "true" sftp= "true" keyfile= "${deploy.keyfile}" >
2016-04-03 04:51:39 +00:00
<fileset dir= "${dir.dist}/website/syno" >
<include name= "*.json" />
</fileset>
2014-08-01 11:47:39 +00:00
</scp>
</target>
2016-04-03 04:41:20 +00:00
<target name= "deploy-chocolatey" description= "Update Chocolatey Package Source" >
2015-06-02 11:52:45 +00:00
<!-- prepare sha1 checksums -->
2016-11-04 20:19:30 +00:00
<checksum property= "x86.msi.sha256" file= "${dir.release}/${release}_x86.msi" algorithm= "SHA-256" />
<checksum property= "x64.msi.sha256" file= "${dir.release}/${release}_x64.msi" algorithm= "SHA-256" />
2015-06-02 11:46:12 +00:00
2014-08-01 11:47:39 +00:00
<!-- replace variables for new release -->
2016-11-04 14:39:19 +00:00
<copy-replace todir= "${dir.dist}/chocolatey" >
2015-06-02 11:52:45 +00:00
<fileset dir= "${dir.installer}/chocolatey" >
<include name= "**/*.ps1" />
<include name= "**/*.nuspec" />
</fileset>
2016-11-04 14:39:19 +00:00
</copy-replace>
2014-08-01 11:47:39 +00:00
2015-06-02 11:52:45 +00:00
<!-- chocolatey pack and push -->
2016-11-04 20:19:30 +00:00
<exec executable= "chocolatey" dir= "${dir.dist}/chocolatey" failonerror= "true" >
2016-11-06 08:20:48 +00:00
<arg line= "pack" />
2014-08-01 11:47:39 +00:00
</exec>
2016-11-04 20:19:30 +00:00
<exec executable= "chocolatey" dir= "${dir.dist}/chocolatey" failonerror= "true" >
2016-11-06 08:20:48 +00:00
<arg line= "push ${package.name}.${version}.nupkg" />
2014-08-01 11:47:39 +00:00
</exec>
</target>
2016-10-19 05:57:42 +00:00
<target name= "upload-data" description= "Upload data files" depends= "init" >
2017-03-21 10:20:23 +00:00
<scp todir= "${deploy.website}/data" trust= "yes" verbose= "true" sftp= "true" keyfile= "${deploy.keyfile}" >
<fileset dir= "${dir.website}/data" >
<include name= ".htaccess" />
<include name= "*.txt.xz" />
2016-05-26 19:07:05 +00:00
<modified >
2017-01-03 19:46:30 +00:00
<param name= "cache.cachefile" value= "${dir.cache}/scp.cache" />
2016-05-26 19:07:05 +00:00
</modified>
2014-08-01 11:47:39 +00:00
</fileset>
</scp>
</target>
2016-08-13 16:11:37 +00:00
<target name= "deploy-beta-jar" depends= "fatjar" description= "Build and deploy the latest jar" >
2017-02-10 08:02:48 +00:00
<xz src= "${path.fatjar}" destfile= "${path.fatjar}.xz" />
2016-10-24 17:48:59 +00:00
<scp file= "${path.fatjar}.xz" remoteTofile= "${deploy.release}/HEAD/filebot-r${revision}.jar.xz" trust= "yes" verbose= "true" sftp= "true" keyfile= "${deploy.keyfile}" />
<scp file= "${path.fatjar}.xz" remoteTofile= "${deploy.release}/HEAD/FileBot.jar.xz" trust= "yes" verbose= "true" sftp= "true" keyfile= "${deploy.keyfile}" />
2014-08-01 11:47:39 +00:00
</target>
2016-08-05 16:35:35 +00:00
<target name= "deploy-beta-release" description= "Build and deploy the latest release files" >
2016-04-03 04:41:20 +00:00
<input addproperty= "mark" message= "Mark:" />
2014-08-01 11:47:39 +00:00
<antcall target= "deploy-release" >
2016-11-04 20:19:30 +00:00
<param name= "dir.release" location= "${dir.dist}/beta/release/${release}_${mark}" />
<param name= "dir.cache" location= "${dir.dist}/beta/cache/${release}_${mark}" />
2016-11-02 23:16:23 +00:00
<param name= "deploy.release" value= "${deploy.release}/HEAD" />
2014-08-01 11:47:39 +00:00
</antcall>
</target>
</project>