2014-08-01 07:47:39 -04:00
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2018-06-14 02:56:52 -04:00
<project name= "filebot" default= "jar" xmlns:if= "ant:if" xmlns:unless= "ant:unless" xmlns:ivy= "antlib:org.apache.ivy.ant" >
2014-08-01 07:47:39 -04: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 16:19:30 -04:00
<!-- import property files -->
<property file= "${basedir}/profile.properties" />
2018-01-19 15:55:19 -05:00
<property file= "${basedir}/app.properties" />
2016-11-04 16:19:30 -04:00
<property name= "release" value= "${application.name}_${application.version}" />
2014-08-01 07:47:39 -04:00
<!-- define output paths -->
2017-01-03 14:46:30 -05:00
<property name= "dir.cache" location= "${basedir}/cache" />
2016-11-04 16:19:30 -04:00
<property name= "dir.release" location= "${basedir}/release/${release}" />
<property name= "path.fatjar" location= "${dir.dist}/${release}.jar" />
2014-08-01 07:47:39 -04:00
2016-11-04 16:19:30 -04:00
<!-- timestamp variables -->
<tstamp prefix= "tstamp" >
<format property= "date" pattern= "yyyy-MM-dd" />
<format property= "year" pattern= "yyyy" />
</tstamp>
2016-09-17 02:53:14 -04:00
2014-08-01 07:47:39 -04:00
2016-11-04 16:19:30 -04:00
<!-- copy and replace ant variables macro -->
2016-11-04 10:39:19 -04:00
<macrodef name= "copy-replace" >
<attribute name= "todir" />
<element name= "filesets" implicit= "yes" />
<sequential >
2016-11-04 16:19:30 -04:00
<copy todir= "@{todir}" encoding= "utf-8" overwrite= "yes" verbose= "yes" >
2016-11-04 10:39:19 -04:00
<filesets />
<filterset begintoken= "@{" endtoken= "}" >
<propertyset >
<propertyref builtin= "all" />
</propertyset>
</filterset>
</copy>
</sequential>
</macrodef>
2017-04-16 08:11:48 -04:00
<!-- sign with gpg macro -->
<macrodef name= "gpg-sign" >
2017-04-16 09:03:59 -04:00
<attribute name= "detach" default= "no" />
2017-04-16 08:11:48 -04:00
<element name= "filesets" implicit= "yes" />
<sequential >
2017-04-16 09:03:59 -04:00
<apply executable= "gpg" verbose= "yes" >
2017-04-16 13:08:09 -04:00
<arg line= "--verbose --batch --yes --local-user ${package.maintainer} --compress-level 0" />
2017-04-16 09:03:59 -04:00
<arg line= "--armor --detach-sign" if:true= "@{detach}" />
2017-04-16 09:14:41 -04:00
<arg line= "--sign" unless:true= "@{detach}" />
2017-04-16 08:11:48 -04:00
<srcfile />
<filesets />
</apply>
</sequential>
</macrodef>
2017-04-16 13:08:09 -04:00
<!-- deploy release artifacts -->
<macrodef name= "release-deploy" >
<attribute name= "todir" />
<element name= "filesets" implicit= "yes" />
<sequential >
<scp todir= "@{todir}" trust= "yes" verbose= "true" sftp= "true" keyfile= "${deploy.keyfile}" >
<filesets />
</scp>
</sequential>
</macrodef>
2018-06-11 15:20:20 -04:00
<!-- fetch and unpack JRE bundle (64 - bit Windows) -->
2018-06-09 03:06:55 -04:00
<macrodef name= "get-windows-jre" >
2018-06-09 02:44:51 -04:00
<attribute name= "dest" />
<sequential >
<exec executable= "powershell" dir= "${dir.cache}" failonerror= "yes" >
<arg line= "get-java" />
</exec>
2018-06-09 03:06:55 -04:00
<untar src= "${dir.cache}/jre-${jre.version}_windows-x64_bin.tar.gz" dest= "@{dest}" compression= "gzip" >
2018-06-09 02:44:51 -04:00
<patternset >
<exclude name= "**/dtplugin/**" />
<exclude name= "**/plugin2/**" />
</patternset>
<cutdirsmapper dirs= "1" />
</untar>
</sequential>
</macrodef>
2018-06-11 15:20:20 -04:00
<!-- fetch and unpack JRE bundle (64 - bit Mac) -->
<macrodef name= "get-macos-jre" >
<attribute name= "dest" />
<sequential >
<exec executable= "get-java.sh" dir= "${dir.cache}" failonerror= "yes" />
<untar src= "${dir.cache}/jre-${jre.version}_osx-x64_bin.tar.gz" dest= "@{dest}" compression= "gzip" >
2018-06-15 14:48:15 -04:00
<!-- MAS validation does not like certain files included in the JRE -->
2018-06-11 15:20:20 -04:00
<patternset >
<exclude name= "**/deploy/**" />
<exclude name= "**/nibs/**" />
<exclude name= "**/shortcuts/**" />
<!-- libjfxwebkit.dylib has many dependencies to deprecated librararies that cause issues with MAS review -->
<exclude name= "**/libjfxwebkit.dylib" />
</patternset>
<cutdirsmapper dirs= "1" />
</untar>
</sequential>
</macrodef>
2018-06-12 17:59:52 -04:00
<!-- fetch and unpack JRE bundle (64 - bit Linux) -->
<macrodef name= "get-linux-jre" >
<attribute name= "dest" />
<sequential >
<exec executable= "get-java.sh" dir= "${dir.cache}" failonerror= "yes" />
<untar src= "${dir.cache}/jre-${jre.version}_linux-x64_bin.tar.gz" dest= "@{dest}" compression= "gzip" >
<cutdirsmapper dirs= "1" />
</untar>
</sequential>
</macrodef>
2018-06-11 15:20:20 -04:00
2018-06-09 02:44:51 -04:00
2015-05-18 03:03:05 -04: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 10:57:52 -04: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 02:45:19 -05:00
<param name= "arch" value= "linux-armv7l" />
2016-03-23 10:57:52 -04:00
<param name= "arch.jna" value= "linux-arm" />
2016-12-16 02:45:19 -05: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 10:57:52 -04: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 03:03:05 -04:00
</target>
2014-08-01 07:47:39 -04:00
<target name= "jar" depends= "build" >
2018-06-12 09:45:41 -04:00
<jar destfile= "${dir.dist}/lib/filebot.jar" >
2016-05-12 10:15:19 -04:00
<fileset dir= "${dir.build}" />
2014-08-01 07:47:39 -04:00
<manifest >
2016-04-21 07:57:01 -04:00
<attribute name= "Build-Date" value= "${tstamp.date}" />
<attribute name= "Build-Revision" value= "${revision}" />
2014-08-01 07:47:39 -04:00
</manifest>
</jar>
</target>
2015-12-14 04:21:31 -05:00
<target name= "appbundle-maspkg-core" >
<antcall target= "appbundle-maspkg" >
<param name= "application.name" value= "FileBot" />
2016-11-04 16:19:30 -04:00
<param name= "application.executable" value= "filebot.launcher" />
2018-06-16 08:09:28 -04:00
<param name= "application.identifier" value= "${package.identifier}" />
2015-12-14 04:21:31 -05:00
<param name= "application.icon" value= "${dir.installer}/appbundle/filebot.icns" />
2016-11-04 16:19:30 -04: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 15:06:58 -04:00
<!-- MAS does not allow subtitle apps -->
2016-03-19 14:49:48 -04:00
<param name= "application.mode" value= "Rename|Episodes|SFV|Filter|List" />
2016-05-03 15:06:58 -04:00
<!-- libjfxwebkit.dylib cannot be deployed on the MAS due to deprecated dependencies -->
2016-05-03 15:49:14 -04:00
<param name= "application.help" value= "ask" />
2015-12-14 04:21:31 -05:00
</antcall>
2014-08-01 07:47:39 -04:00
</target>
2016-01-22 05:06:35 -05:00
2015-12-14 04:21:31 -05:00
<target name= "appbundle-maspkg-subtitles" >
<antcall target= "appbundle-maspkg" >
2016-01-14 02:24:24 -05:00
<param name= "application.name" value= "FileBot Subtitles" />
2016-11-04 16:19:30 -04:00
<param name= "application.executable" value= "filebot.subtitles.launcher" />
2016-11-15 08:14:21 -05:00
<param name= "application.identifier" value= "${package.identifier}.Subtitles" />
2015-12-14 04:21:31 -05:00
<param name= "application.icon" value= "${dir.installer}/appbundle/subtitles.icns" />
2016-11-04 16:19:30 -04: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 04:58:56 -05:00
<param name= "application.mode" value= "Subtitles" />
<param name= "application.help" value= "skip" />
2015-12-14 04:21:31 -05:00
</antcall>
</target>
2014-08-01 07:47:39 -04:00
2015-12-12 07:06:13 -05:00
2016-09-19 04:32:49 -04:00
<target name= "appbundle-maspkg" depends= "revision" >
2018-06-15 05:05:42 -04:00
<property name= "dir.staging" location= "${dir.dist}/mas" />
2016-11-13 15:17:52 -05:00
2018-06-15 05:05:42 -04:00
<property name= "path.app" location= "${dir.staging}/${application.name}.app" />
<property name= "path.pkg" location= "${dir.staging}/${application.name}_${application.version}_r${revision}.pkg" />
2016-11-13 16:41:07 -05:00
<!-- fetch latest JRE -->
2018-06-15 05:05:42 -04:00
<get-macos-jre dest= "${dir.staging}" />
2018-02-28 04:07:34 -05:00
2018-06-15 05:05:42 -04:00
<bundleapp jvmrequired= "${jvm.version}" minimumsystemversion= "${mac.version}" outputdirectory= "${dir.staging}" executablename= "${application.executable}" name= "${application.name}" displayname= "${application.name}" version= "${revision}" shortversion= "${application.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 00:55:52 -05:00
<classpath dir= "${dir.dist}/lib" />
2015-12-12 07:06:13 -05:00
<librarypath dir= "${dir.lib}/native/mac-x86_64" />
2016-09-19 02:17:09 -04:00
2015-12-12 07:06:13 -05:00
<arch name= "x86_64" />
2018-06-15 05:05:42 -04:00
<runtime dir= "${dir.staging}/jre-${java.version}.jre/Contents/Home" >
2017-10-17 11:09:20 -04:00
<include name= "**/*" />
2017-10-17 11:05:10 -04:00
</runtime>
2015-12-12 07:06:13 -05:00
2015-12-14 04:47:29 -05:00
<argument value= "--mode" />
<argument value= "${application.mode}" />
2015-12-12 07:06:13 -05:00
<!-- WORKING_DIR is sandbox data folder -->
2016-11-13 17:32:28 -05: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 07:06:13 -05:00
<option value= "-Dnet.filebot.UserFiles.fileChooser=COCOA" />
2015-12-14 04:21:31 -05:00
<option value= "-Dapplication.name=${application.name}" />
2015-12-14 04:58:56 -05:00
<option value= "-Dapplication.help=${application.help}" />
2015-12-12 07:06:13 -05: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 17:32:28 -05:00
2015-12-12 07:06:13 -05: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" />
2017-07-20 23:07:58 -04:00
<option value= "-Dapple.awt.application.name=${application.name}" />
2016-03-19 14:45:08 -04:00
2016-03-19 16:38:57 -04: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 07:06:13 -05:00
</bundleapp>
2016-11-13 17:32:28 -05:00
<!-- remove unused language resources -->
2016-11-13 15:17:52 -05:00
<delete verbose= "yes" includeEmptyDirs= "yes" >
2016-11-13 17:32:28 -05:00
<fileset dir= "${path.app}/Contents/Resources" >
<include name= "**.lproj/**" />
2016-11-13 15:17:52 -05:00
<exclude name= "en.lproj/**" />
</fileset>
</delete>
2016-11-11 17:12:11 -05:00
2018-06-15 05:05:42 -04:00
<property name= "path.app.jre" location= "${path.app}/Contents/PlugIns/jre-${jre.version}.jre" />
<!-- MAS validation is a bit buggy and requires even libraries and frameworks to have a unique CFBundleIdentifier Collision -->
<replace file= "${path.app.jre}/Contents/Info.plist" token= "com.oracle.java.${jre.version}.jre" value= "${application.identifier}.jre" encoding= "UTF-8" summary= "true" />
2016-11-13 17:32:28 -05:00
<!-- fix broken symlink -->
2018-06-15 05:05:42 -04:00
<copy file= "${dir.staging}/jre-${java.version}.jre/Contents/Home/lib/jli/libjli.dylib" tofile= "${path.app.jre}/Contents/MacOS/libjli.dylib" overwrite= "yes" verbose= "yes" failonerror= "yes" />
2016-11-13 17:32:28 -05:00
<!-- 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 17:12:11 -05:00
2015-12-12 07:06:13 -05:00
<!-- JRE sign all jars, dylibs and executables -->
2016-11-13 17:32:28 -05: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 15:34:35 -05:00
<include name= "**/jspawnhelper" />
2016-11-13 17:32:28 -05:00
<include name= "**/fpcalc" />
2016-11-13 16:00:02 -05:00
<include name= "**/*.dylib" />
<include name= "**/*.jar" />
2016-11-13 17:32:28 -05:00
<include name= "**/*.sh" />
2016-11-11 17:12:11 -05:00
</fileset>
</apply>
2016-11-13 17:32:28 -05:00
<!-- sign frameworks -->
<exec executable= "codesign" failonerror= "yes" >
<arg line= "${sign} ${entitlements.inherit} '${path.app.jre}'" />
2016-11-13 16:00:02 -05:00
</exec>
2016-11-13 17:32:28 -05:00
<!-- sign app -->
<exec executable= "codesign" failonerror= "yes" >
<arg line= "${sign} ${entitlements} '${path.app}'" />
2015-12-12 07:06:13 -05:00
</exec>
2016-11-13 17:32:28 -05:00
<!-- verify signature -->
<exec executable= "codesign" failonerror= "yes" >
<arg line= "--verbose --deep --verify '${path.app}'" />
2016-11-13 16:00:02 -05:00
</exec>
2016-11-13 17:32:28 -05:00
<!-- build package -->
<exec executable= "productbuild" failonerror= "yes" >
<arg line= "--component '${path.app}' /Applications '${path.pkg}' --sign '${application.cert.installer}'" />
2015-12-12 07:06:13 -05:00
</exec>
2016-09-19 05:09:47 -04:00
<!-- store as release build -->
2016-11-13 17:32:28 -05:00
<copy todir= "${dir.release}" file= "${path.pkg}" verbose= "yes" />
2015-12-12 07:06:13 -05:00
</target>
2018-06-14 02:55:07 -04:00
<target name= "app" depends= "revision" description= "Build Mac app package" >
2018-06-11 15:20:20 -04:00
<property name= "dir.staging" location= "${dir.dist}/app" />
<copy-replace todir= "${dir.staging}/bin" >
<fileset dir= "${dir.installer}/app" includes= "*.sh" />
</copy-replace>
<!-- fetch latest JRE -->
<get-macos-jre dest= "${dir.staging}" />
2018-06-15 08:39:19 -04:00
<bundleapp jvmrequired= "${jvm.version}" minimumsystemversion= "${mac.version}" outputdirectory= "${dir.staging}" executablename= "${package.name}.launcher" name= "${application.name}" displayname= "${application.name}.launcher" version= "${revision}" shortversion= "${application.version}" identifier= "${package.identifier}" mainclassname= "${main.class}" icon= "${dir.installer}/icons/filebot.icns" copyright= "${tstamp.year} ${package.company}" applicationcategory= "${mac.application.category}" highresolutioncapable= "true" supportsautomaticgraphicsswitching= "true" >
2018-06-11 15:20:20 -04:00
<arch name= "x86_64" />
<runtime dir= "${dir.staging}/jre-${java.version}.jre/Contents/Home" >
<include name= "**/*" />
</runtime>
<classpath dir= "${dir.dist}/lib" />
<librarypath dir= "${dir.staging}/bin" />
<librarypath dir= "${dir.lib}/native/mac-x86_64" />
<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" />
2018-06-11 16:33:10 -04:00
<bundledocument extensions= "${license.extension}" icon= "${dir.installer}/icons/filebot.icns" name= "${license.description}" role= "viewer" handlerRank= "owner" contentTypes= "net.filebot.license" />
<typedeclaration extensions= "${license.extension}" icon= "${dir.installer}/icons/filebot.icns" description= "${license.description}" conformsTo= "public.plain-text" identifier= "net.filebot.license" mimeTypes= "${license.mimetype}" />
2018-06-11 15:20:20 -04:00
<option value= "-Dapple.laf.useScreenMenuBar=true" />
<option value= "-Dapple.awt.application.name=${application.name}" />
<option value= "-Dunixfs=false" />
<option value= "-DuseExtendedFileAttributes=true" />
<option value= "-DuseCreationDate=false" />
<option value= "-Djava.net.useSystemProxies=true" />
<option value= "-Djna.nosys=true" />
<option value= "-Djna.nounpack=true" />
<option value= "-Dnet.filebot.UserFiles.fileChooser=COCOA" />
<option value= "-Dapplication.deployment=app" />
<option value= "-Dapplication.help=ask" />
<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= "--illegal-access=permit" />
<option value= "--add-opens=java.base/java.lang=ALL-UNNAMED" />
<option value= "--add-opens=java.base/java.lang.invoke=ALL-UNNAMED" />
<option value= "--add-opens=java.base/java.util=ALL-UNNAMED" />
<option value= "--add-opens=java.base/java.util.function=ALL-UNNAMED" />
<option value= "--add-opens=java.base/java.util.regex=ALL-UNNAMED" />
<option value= "--add-opens=java.base/java.net=ALL-UNNAMED" />
<option value= "--add-opens=java.base/java.io=ALL-UNNAMED" />
<option value= "--add-opens=java.base/java.nio.file=ALL-UNNAMED" />
<option value= "--add-opens=java.base/java.nio.file.attribute=ALL-UNNAMED" />
<option value= "--add-opens=java.base/java.nio.channels=ALL-UNNAMED" />
<option value= "--add-opens=java.base/java.nio.charset=ALL-UNNAMED" />
<option value= "--add-opens=java.base/java.time=ALL-UNNAMED" />
<option value= "--add-opens=java.base/java.time.chrono=ALL-UNNAMED" />
<option value= "--add-opens=java.logging/java.util.logging=ALL-UNNAMED" />
<option value= "--add-opens=java.desktop/java.awt=ALL-UNNAMED" />
</bundleapp>
2018-06-15 08:30:02 -04:00
<!-- fix permissions -->
<chmod perm= "+x" verbose= "yes" >
2018-06-15 08:37:28 -04:00
<fileset dir= "${dir.staging}" >
2018-06-15 08:30:02 -04:00
<include name= "*.app/**/MacOS/filebot.*" />
<include name= "*.app/**/MacOS/fpcalc" />
<include name= "*.app/**/lib/jspawnhelper" />
<include name= "*.app/**/bin/*" />
</fileset>
</chmod>
2018-06-11 15:20:20 -04:00
2018-06-12 09:34:10 -04:00
<tar destfile= "${dir.dist}/${release}.app.tar.xz" compression= "${tar.compression}" longfile= "posix" encoding= "utf-8" >
2018-06-11 15:20:20 -04:00
<tarfileset dir= "${dir.staging}" >
<include name= "*.app/**" />
2018-06-11 16:33:10 -04:00
<exclude name= "*.app/**/MacOS/filebot.*" />
<exclude name= "*.app/**/MacOS/fpcalc" />
<exclude name= "*.app/**/lib/jspawnhelper" />
<exclude name= "*.app/**/bin/*" />
2018-06-11 15:20:20 -04:00
</tarfileset>
<tarfileset dir= "${dir.staging}" filemode= "755" >
<include name= "*.app/**/MacOS/filebot.*" />
<include name= "*.app/**/MacOS/fpcalc" />
<include name= "*.app/**/lib/jspawnhelper" />
<include name= "*.app/**/bin/*" />
</tarfileset>
</tar>
</target>
2018-06-15 08:30:02 -04:00
<target name= "pkg" depends= "revision" description= "Build Mac pkg package" >
<property name= "dir.staging" location= "${dir.dist}/pkg" />
<copy-replace todir= "${dir.staging}" >
<fileset dir= "${dir.installer}/pkg" />
</copy-replace>
2018-06-15 09:09:22 -04:00
<!-- fix permissions -->
<chmod perm= "+x" verbose= "yes" >
<fileset dir= "${dir.staging}/scripts" />
</chmod>
2018-06-15 08:30:02 -04:00
<exec executable= "pkgbuild" dir= "${dir.staging}" failonerror= "yes" >
2018-06-15 08:46:13 -04:00
<arg line= "${package.name}.pkg --component ${dir.dist}/app/${application.name}.app --scripts scripts" />
2018-06-15 08:30:02 -04:00
</exec>
<exec executable= "productbuild" dir= "${dir.staging}" failonerror= "yes" >
2018-06-15 08:44:33 -04:00
<arg line= "${dir.dist}/${release}.pkg --distribution distribution.xml --package-path . --sign 'Developer ID Installer: ${package.company}'" />
2018-06-15 08:30:02 -04:00
</exec>
</target>
2018-06-12 17:59:52 -04:00
<target name= "snap" depends= "revision" >
<property name= "dir.staging" location= "${dir.dist}/snap" />
2018-06-13 05:13:10 -04:00
<property name= "dir.root" location= "${dir.staging}/root" />
2018-06-11 15:20:20 -04:00
2018-06-15 14:48:15 -04:00
<get-linux-jre dest= "${dir.root}/jre" />
2018-06-11 15:20:20 -04:00
2018-06-12 17:59:52 -04:00
<!-- copy files and resolve ant variables -->
<copy-replace todir= "${dir.staging}" >
<fileset dir= "${dir.installer}/snap" />
</copy-replace>
2018-06-15 14:48:15 -04:00
<copy todir= "${dir.root}/filebot/jar" >
2017-03-23 09:22:22 -04:00
<fileset dir= "${dir.dist}/lib" includes= "*.jar" />
</copy>
2018-06-15 14:48:15 -04:00
<copy todir= "${dir.root}/filebot/lib" >
<fileset dir= "${dir.lib}/native/linux-amd64" />
2016-08-05 13:37:16 -04:00
</copy>
2018-06-15 14:48:15 -04:00
<chmod perm= "+x" verbose= "yes" >
<fileset dir= "${dir.root}" includes= "**/bin/**" />
<fileset dir= "${dir.root}" includes= "**/fpcalc" />
</chmod>
2016-08-05 13:37:16 -04:00
2016-08-05 13:10:36 -04:00
</target>
2018-06-14 02:55:07 -04:00
<target name= "deb" description= "Build Debian Linux package" depends= "revision" >
2014-08-01 07:47:39 -04:00
<antcall target= "deb-arch" >
2016-11-07 02:11:57 -05:00
<param name= "arch" value= "amd64" />
<param name= "deb.arch" value= "amd64" />
2014-08-01 07:47:39 -04:00
</antcall>
2016-11-07 02:11:57 -05:00
2017-02-15 14:35:29 -05:00
<!-- arch i686 not allowed by deb specification, must be i386 for 32 - bit x86 systems -->
2018-04-03 02:10:04 -04:00
<!--
2014-08-01 07:47:39 -04:00
<antcall target= "deb-arch" >
2016-11-07 02:11:57 -05:00
<param name= "arch" value= "i686" />
<param name= "deb.arch" value= "i386" />
2014-08-01 07:47:39 -04:00
</antcall>
2018-04-03 02:10:04 -04:00
-->
2015-05-22 02:37:43 -04:00
2017-02-15 14:35:29 -05:00
<!-- arch armv7l not allowed by deb specification, must be armhf for 32 - bit armv7l systems -->
2018-04-03 02:10:04 -04:00
<!--
2016-11-03 18:46:00 -04:00
<antcall target= "deb-arch" >
2017-02-07 08:50:37 -05:00
<param name= "arch" value= "armv7l" />
<param name= "deb.arch" value= "armhf" />
2016-11-03 18:46:00 -04:00
</antcall>
2018-04-03 02:10:04 -04:00
-->
2014-08-01 07:47:39 -04:00
</target>
2016-11-03 18:46:00 -04:00
<target name= "deb-arch" >
2017-02-07 08:50:37 -05:00
<property name= "dir.staging" location= "${dir.dist}/deb/${arch}" />
2016-11-03 18:46:00 -04:00
2016-11-04 10:39:19 -04:00
<copy-replace todir= "${dir.staging}" >
2017-02-07 08:50:37 -05:00
<fileset dir= "${dir.installer}/deb" />
2016-11-04 10:39:19 -04:00
</copy-replace>
2016-11-03 18:46:00 -04:00
2018-06-16 08:09:28 -04:00
<jdeb destfile= "${dir.dist}/${application.name}_${application.version}_${deb.arch}.deb" control= "${dir.staging}/control" compression= "${tar.compression}" verbose= "true" >
2018-04-03 02:31:46 -04:00
<tarfileset prefix= "/usr/share/filebot/bin" dir= "${dir.staging}" includes= "*.sh" filemode= "755" />
2018-06-12 14:23:00 -04:00
<tarfileset prefix= "/usr/share/filebot/jar" dir= "${dir.dist}/lib" />
2018-04-03 02:31:46 -04:00
<tarfileset prefix= "/usr/share/filebot/lib" dir= "${dir.lib}/native/linux-${arch}" includes= "fpcalc" filemode= "755" />
<tarfileset prefix= "/usr/share/filebot/lib" dir= "${dir.lib}/native/linux-${arch}" includes= "*.so" />
2018-06-12 14:23:00 -04:00
2017-02-14 10:48:04 -05:00
<tarfileset prefix= "/usr/share/icons/hicolor/scalable/apps" dir= "${dir.installer}/icons" includes= "filebot.svg" />
2018-06-13 06:10:04 -04:00
<tarfileset prefix= "/usr/share" dir= "${dir.staging}/share" />
2016-11-03 18:46:00 -04:00
</jdeb>
2014-08-01 07:47:39 -04:00
</target>
2016-09-19 04:32:49 -04:00
<target name= "appx" description= "Build Windows 10 package" depends= "revision" >
2017-08-23 06:37:09 -04:00
<antcall target= "appx-arch" >
<param name= "arch" value= "x64" />
<param name= "arch.env" value= "AMD64" />
<param name= "arch.jre" value= "x64" />
</antcall>
2018-06-12 14:23:00 -04:00
<!-- 32 - bit Windows is not supported by Oracle JDK so there are no JRE builds -->
2017-10-05 17:45:22 -04:00
<!--
2017-08-23 06:48:32 -04:00
<antcall target= "appx-arch" >
<param name= "arch" value= "x86" />
<param name= "arch.env" value= "x86" />
<param name= "arch.jre" value= "i586" />
</antcall>
2017-10-05 17:45:22 -04:00
-->
2017-08-23 06:03:29 -04:00
</target>
<target name= "appx-arch" >
<property name= "dir.staging" location= "${dir.dist}/appx/${arch}" />
<copy todir= "${dir.staging}" >
2018-06-09 20:05:14 -04:00
<fileset dir= "${dir.installer}/appx" includes= "*.exe, **/*.png" />
2016-09-19 04:50:10 -04:00
</copy>
2017-08-23 06:03:29 -04:00
<copy todir= "${dir.staging}/lib" >
2018-06-09 20:05:14 -04:00
<fileset dir= "${dir.lib}/native/win32-${arch}" />
</copy>
<copy todir= "${dir.staging}/jar" >
2017-03-12 05:21:11 -04:00
<fileset dir= "${dir.dist}/lib" includes= "*.jar" />
</copy>
<!-- copy files and resolve ant variables -->
2017-08-23 06:03:29 -04:00
<copy-replace todir= "${dir.staging}" >
2017-03-12 05:21:11 -04:00
<fileset dir= "${dir.installer}/appx" includes= "*.xml, *.ini" excludes= "*.l4j.xml" />
</copy-replace>
2016-11-02 15:50:39 -04:00
2016-11-02 15:58:03 -04:00
<!-- fetch latest JRE -->
2018-06-09 03:06:55 -04:00
<get-windows-jre dest= "${dir.staging}/jre" />
2018-02-25 08:38:35 -05:00
<!-- Workaround for VS2013 / CoInitialize hack (see http://mail.openjdk.java.net/pipermail/swing - dev/2018 - February/008323.html) -->
<delete verbose= "yes" >
<fileset dir= "${dir.staging}/jre" includes= "**/*120*.dll" />
</delete>
2017-08-23 06:03:29 -04:00
<!-- package APPX -->
<exec executable= "makepri" dir= "${dir.staging}" failonerror= "yes" >
2016-11-30 20:58:28 -05:00
<arg line= "createconfig /o /pv 10.0.0 /cf priconfig.xml /dq en-US" />
2016-11-30 20:44:12 -05:00
</exec>
2017-08-23 06:03:29 -04:00
<exec executable= "makepri" dir= "${dir.staging}" failonerror= "yes" >
2016-11-30 20:58:28 -05:00
<arg line= "new /o /pr . /cf priconfig.xml /in ${microsoft.application.name}" />
2016-11-30 20:44:12 -05:00
</exec>
2016-09-19 03:41:40 -04:00
<exec executable= "makeappx" dir= "${dir.dist}" failonerror= "yes" >
2017-08-23 06:03:29 -04:00
<arg line= "pack /v /o /d ${dir.staging} /p ${release}_r${revision}_${arch}.appx" />
2016-09-19 03:41:40 -04:00
</exec>
</target>
2018-06-14 02:55:07 -04:00
<target name= "msi" description= "Build Windows Installer package" depends= "revision" >
2018-06-09 19:46:26 -04:00
<property name= "dir.staging" location= "${dir.dist}/msi/x64" />
2016-11-04 16:19:30 -04:00
2018-06-09 02:44:51 -04:00
<!-- 1. prepare application files for heat harvest -->
2018-06-09 19:46:26 -04:00
<get-windows-jre dest= "${dir.staging}/base/jre" />
2018-06-09 01:35:57 -04:00
2018-06-09 19:46:26 -04:00
<copy todir= "${dir.staging}/base/jar" >
2018-06-09 01:35:57 -04:00
<fileset dir= "${dir.dist}/lib" includes= "*.jar" />
2016-11-04 16:19:30 -04:00
</copy>
2018-06-09 19:46:26 -04:00
<copy todir= "${dir.staging}/base/lib" >
<fileset dir= "${dir.lib}/native/win32-x64" />
2016-11-04 16:19:30 -04:00
</copy>
2018-06-09 01:35:57 -04:00
<exec executable= "heat" dir= "${dir.staging}" failonerror= "true" >
2018-06-09 19:46:26 -04:00
<arg line= "dir base -v -srd -gg -dr ApplicationBase -cg ApplicationBase -template fragment -sreg -sfrag -scom -out base.wxs" />
2018-06-09 01:35:57 -04:00
</exec>
<exec executable= "candle" dir= "${dir.staging}" failonerror= "true" >
<arg line= "base.wxs -out base.wixobj" />
</exec>
2018-06-09 02:44:51 -04:00
<!-- 2. prepare installer files and application stub for candle light -->
2016-11-04 16:19:30 -04:00
<copy-replace todir= "${dir.staging}" >
2018-06-09 01:35:57 -04:00
<fileset dir= "${dir.installer}/msi" includes= "*.wix, *.ini" />
2016-11-04 16:19:30 -04:00
</copy-replace>
<exec executable= "candle" dir= "${dir.staging}" failonerror= "true" >
2018-06-09 01:35:57 -04:00
<arg line= "filebot.wix -out filebot.wixobj" />
2014-08-01 07:47:39 -04:00
</exec>
2018-06-09 19:46:26 -04:00
<!-- 3. compile MSI package (use - b to add additional resource folders) -->
2016-11-04 16:19:30 -04:00
<exec executable= "light" dir= "${dir.staging}" failonerror= "true" >
2018-06-10 09:30:42 -04:00
<arg line= "filebot.wixobj base.wixobj -b base -b ${dir.installer}/msi -sval -ext WixUIExtension -out ${dir.dist}/${release}_x64.msi" />
2014-08-01 07:47:39 -04:00
</exec>
</target>
2016-09-19 04:32:49 -04:00
<target name= "portable" description= "Build portable package" depends= "revision" >
2018-06-12 15:25:10 -04:00
<property name= "dir.staging" location= "${dir.dist}/portable" />
<copy-replace todir= "${dir.staging}" >
<fileset dir= "${dir.installer}/portable" includes= "*.sh" />
</copy-replace>
2018-06-12 09:34:10 -04:00
<tar destfile= "${dir.dist}/${release}-portable.tar.xz" compression= "${tar.compression}" longfile= "posix" encoding= "utf-8" >
2018-06-12 15:25:10 -04:00
<tarfileset dir= "${dir.staging}" includes= "*.sh" filemode= "755" />
<tarfileset prefix= "jar" dir= "${dir.dist}/lib" />
2017-02-09 11:18:24 -05:00
<!-- include native libraries for all supported platforms -->
<tarfileset prefix= "lib/armv7l" dir= "${dir.lib}/native/linux-armv7l" includes= "*.so" />
2017-04-03 04:03:08 -04:00
<tarfileset prefix= "lib/aarch64" dir= "${dir.lib}/native/linux-armv8" includes= "*.so" />
2017-02-09 11:18:24 -05: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" />
2017-04-16 08:11:48 -04:00
<!-- include maintainer public key -->
<tarfileset dir= "${dir.installer}/gpg" includes= "maintainer.pub" />
2017-02-09 11:18:24 -05:00
</tar>
2014-08-01 07:47:39 -04:00
</target>
2016-09-19 04:32:49 -04:00
<target name= "spk" description= "Build Synology NAS package" depends= "revision" >
2018-06-12 09:34:10 -04:00
<spk destdir= "${dir.dist}" name= "${package.name}" version= "${application.version}" arch= "noarch" compression= "${tar.compression}" >
2016-11-04 16:19:30 -04:00
<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 15:55:57 -04:00
<info name= "firmware" value= "6.0" />
2015-05-16 00:52:25 -04: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 07:00:58 -04:00
2016-09-29 07:37:23 -04: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 07:00:58 -04:00
<!-- <info name="start_dep_services" value="ssh" /> -->
<!-- <info name="install_dep_packages" value="oracle - java" /> -->
2014-08-01 07:47:39 -04:00
<icon size= "72" file= "${dir.installer}/icons/icon72.png" />
2015-05-03 11:57:56 -04:00
<icon size= "256" file= "${dir.installer}/icons/icon256.png" />
2015-05-05 09:48:16 -04:00
2014-08-01 07:47:39 -04:00
<scripts dir= "${dir.installer}/spk/scripts" filemode= "755" />
2015-05-16 01:35:51 -04:00
<package dir= "${dir.installer}/spk/package" includes= "*.sh" filemode= "755" />
<package file= "${path.fatjar}" fullpath= "FileBot.jar" />
2016-12-16 03:26:34 -05:00
<!-- include native libraries for all supported platforms -->
2016-12-16 06:32:05 -05: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 03:26:34 -05:00
2015-11-07 08:33:42 -05:00
<codesign secring= "${dir.installer}/gpg/secring.gpg" keyid= "${gpg.key}" password= "${gpg.pwd}" />
2014-08-01 07:47:39 -04:00
</spk>
</target>
2016-08-13 12:11:37 -04:00
<target name= "build" depends= "revision" >
2017-03-04 05:14:14 -05: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 15:27:50 -04:00
<include name= "glazedlists_java16.jar" />
2017-03-04 05:14:14 -05: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" />
2017-10-16 16:14:39 -04:00
<include name= "jaxb-api.jar" />
<include name= "jaxb-impl.jar" />
2017-03-04 05:14:14 -05:00
<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" />
2018-06-06 10:58:31 -04:00
<include name= "groovy.jar" />
<include name= "groovy-ant.jar" />
<include name= "groovy-bsf.jar" />
<include name= "groovy-datetime.jar" />
<include name= "groovy-dateutil.jar" />
<include name= "groovy-json.jar" />
<include name= "groovy-jsr223.jar" />
<include name= "groovy-nio.jar" />
<include name= "groovy-sql.jar" />
<include name= "groovy-swing.jar" />
<include name= "groovy-xml.jar" />
2017-03-04 05:14:14 -05:00
<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" />
2018-06-06 12:11:02 -04:00
<include name= "javax.mail.jar" />
2018-06-06 11:48:17 -04:00
<include name= "activation.jar" />
2018-06-08 21:06:57 -04:00
<include name= "bcprov-jdk15on.jar" />
<include name= "bcpg-jdk15on.jar" />
2017-03-04 05:14:14 -05:00
</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 07:47:39 -04:00
<!-- compile -->
2018-02-27 03:47:04 -05:00
<javac srcdir= "${dir.source}" destdir= "${dir.build}" release= "${jvm.version}" encoding= "utf-8" debug= "yes" debuglevel= "lines,vars,source" includeAntRuntime= "no" >
2014-08-01 07:47:39 -04:00
<classpath >
2017-03-04 05:14:14 -05:00
<fileset dir= "${dir.dist}/lib" />
2014-08-01 07:47:39 -04:00
</classpath>
</javac>
2017-03-04 05:14:14 -05:00
<!-- copy property files -->
<copy-replace todir= "${dir.build}" >
<fileset dir= "${dir.source}" includes= "**/*.properties" />
</copy-replace>
2014-08-01 07:47:39 -04:00
<!-- copy resources -->
<copy todir= "${dir.build}" >
<fileset dir= "${dir.source}" >
<exclude name= "**/*.java" />
2016-11-04 10:39:19 -04:00
<exclude name= "**/*.properties" />
2014-08-01 07:47:39 -04:00
</fileset>
</copy>
</target>
2018-06-14 02:55:07 -04:00
<target name= "clean" description= "Delete build artifacts" >
2014-08-01 07:47:39 -04:00
<delete dir= "${dir.dist}" />
<delete dir= "${dir.build}" />
</target>
2017-02-08 10:18:27 -05:00
<target name= "website-docs" depends= "revision" >
2017-02-08 10:32:45 -05: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 10:18:27 -05:00
<fileset dir= "${dir.source}" includesfile= "${dir.website}/docs/includes.fileset" />
<doctitle > ${application.name} ${application.version}</doctitle>
2017-06-02 05:56:50 -04:00
<bottom > ${application.name} ${application.version} (r${revision}) built on ${tstamp.date}</bottom>
2017-10-18 04:45:21 -04:00
<link href= "http://docs.oracle.com/javase/${jre.version}/docs/api/" />
2017-02-08 10:18:27 -05:00
<link href= "http://docs.groovy-lang.org/latest/html/api/" />
</javadoc>
</target>
2016-09-19 05:09:47 -04:00
<target name= "revision" depends= "init" >
2016-04-20 12:57:03 -04:00
<exec executable= "git" outputproperty= "revision" failonerror= "true" >
<arg line= "rev-list --count master" />
</exec>
<echo > Revision: ${revision}</echo>
2014-08-01 07:47:39 -04:00
</target>
2016-09-19 05:09:47 -04:00
<target name= "init" >
<mkdir dir= "${dir.build}" />
<mkdir dir= "${dir.dist}" />
<mkdir dir= "${dir.release}" />
2016-09-20 02:40:38 -04:00
<mkdir dir= "${dir.cache}" />
2016-09-19 05:09:47 -04:00
2016-09-19 04:32:49 -04: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 18:46:00 -04:00
<taskdef resource= "org/vafer/jdeb/ant/antlib.xml" classpathref= "lib.classpath" />
2016-09-19 04:32:49 -04:00
<taskdef name= "bundleapp" classname= "com.oracle.appbundler.AppBundlerTask" classpathref= "lib.classpath" />
</target>
2018-03-07 21:32:43 -05:00
<target name= "stage-release" >
2016-09-19 05:09:47 -04:00
<!-- ensure clean release dir -->
2014-08-01 07:47:39 -04:00
<delete dir= "${dir.release}" />
<mkdir dir= "${dir.release}" />
<!-- prepare release packages -->
2017-04-16 13:08:09 -04:00
<copy todir= "${dir.release}" verbose= "yes" >
2014-08-01 07:47:39 -04:00
<fileset dir= "${dir.dist}" >
2016-09-17 02:53:14 -04:00
<include name= "*.tar.xz" />
<include name= "*.msi" />
2014-08-01 07:47:39 -04:00
<include name= "*.deb" />
<include name= "*.spk" />
</fileset>
</copy>
2015-06-15 15:25:17 -04:00
2017-05-11 08:25:10 -04:00
<!-- require gpg signatures for all installer packages -->
<gpg-sign >
<fileset dir= "${dir.release}" >
<exclude name= "*.spk" />
</fileset>
2017-04-16 13:08:09 -04:00
</gpg-sign>
2017-06-13 08:27:31 -04:00
<checksum algorithm= "SHA-256" pattern= "{0} {1}" todir= "${dir.cache}/${release}/sha" >
2017-04-16 13:08:09 -04:00
<fileset dir= "${dir.release}" >
2017-05-11 08:25:10 -04:00
<include name= "*.gpg" />
2017-04-16 13:08:09 -04:00
<include name= "*.spk" />
</fileset>
2015-06-15 15:25:17 -04:00
</checksum>
2017-06-13 08:27:31 -04:00
<concat destfile= "${dir.release}/README.md" overwrite= "true" eol= "unix" outputencoding= "utf-8" >
2016-11-06 11:58:55 -05:00
<fileset file= "${dir.installer}/ant/digest.head.md" />
2017-06-13 08:27:31 -04:00
<fileset dir= "${dir.cache}/${release}/sha" />
2016-11-06 11:58:55 -05:00
<fileset file= "${dir.installer}/ant/digest.tail.md" />
2015-06-15 15:25:17 -04:00
</concat>
2017-06-08 15:18:24 -04:00
2017-06-13 08:27:31 -04:00
2017-06-08 15:18:24 -04:00
<!-- include source tarball -->
2018-06-12 09:34:10 -04:00
<tar destfile= "${dir.release}/${package.name}-${application.version}-src.tar.xz" compression= "${tar.compression}" longfile= "posix" encoding= "utf-8" >
2017-06-08 15:18:24 -04:00
<tarfileset dir= "${dir.source}" />
</tar>
2014-08-01 07:47:39 -04:00
</target>
2016-08-05 12:35:35 -04:00
<target name= "deploy-release" depends= "stage-release" description= "Upload release files to SourceForge.net FRS" >
2017-06-13 08:58:56 -04:00
<property name= "mirror" location= "${dir.cache}/${release}/FRS" />
<copy todir= "${mirror}/${package.name}/${release}" verbose= "yes" >
<fileset dir= "${dir.release}" >
<include name= "*.gpg" />
<include name= "*.spk" />
<include name= "*-src.tar.xz" />
<include name= "*.md" />
</fileset>
</copy>
<release-deploy todir= "${deploy.release.mirror}" >
<fileset dir= "${mirror}" includes= "**/*.md" />
<fileset dir= "${mirror}" includes= "**/*-src.tar.xz" />
<fileset dir= "${mirror}" includes= "**/*.spk" />
<fileset dir= "${mirror}" includes= "**/*.gpg" />
2017-04-16 13:08:09 -04:00
</release-deploy>
2014-08-01 07:47:39 -04:00
</target>
2018-06-14 02:56:52 -04:00
<target name= "deploy-jar" description= "Build and deploy the latest jar" >
2017-06-13 08:27:31 -04:00
<xz src= "${path.fatjar}" destfile= "${dir.release}/FileBot.jar.xz" />
<gpg-sign >
<fileset dir= "${dir.release}" includes= "*.jar.xz" />
</gpg-sign>
<release-deploy todir= "${deploy.release}/${package.name}/latest" >
<fileset dir= "${dir.release}" includes= "*.jar.xz.gpg" />
</release-deploy>
</target>
<target name= "deploy-synology" description= "Update Synology Package Source" depends= "init" >
<mkdir dir= "${dir.dist}/syno" />
<!-- merge all filebot related packages into a single package source file -->
<package-source file= "${dir.dist}/syno/index.json" >
<keyring file= "${dir.installer}/gpg/FileBot.pub" />
<spk file= "${dir.release}/${package.name}-${application.version}-noarch.spk" >
<info name= "link" value= "https://downloads.sourceforge.net/project/filebot/filebot/${release}/${package.name}-${application.version}-noarch.spk" />
<thumbnail url= "https://www.filebot.net/syno/filebot-thumbnail.png" />
<snapshot url= "https://www.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 -->
<release-deploy todir= "${deploy.release}" >
<fileset dir= "${dir.dist}" includes= "syno/**" />
</release-deploy>
</target>
2017-02-08 10:18:27 -05:00
<target name= "deploy-website" description= "Upload website resources" depends= "revision" >
2016-10-19 01:41:04 -04:00
<!-- copy image resources -->
<copy todir= "${dir.dist}/website/resources" preservelastmodified= "yes" verbose= "yes" flatten= "true" >
2016-10-19 01:43:08 -04:00
<fileset dir= "${dir.source}/net/filebot/resources" >
<include name= "*.png" />
2016-10-19 01:41:04 -04:00
</fileset>
</copy>
2015-05-10 03:29:54 -04:00
<!-- copy static website resources -->
2015-06-05 03:35:50 -04:00
<copy todir= "${dir.dist}/website" preservelastmodified= "yes" verbose= "yes" >
2014-08-01 07:47:39 -04:00
<fileset dir= "${dir.website}" >
2016-04-03 00:41:20 -04:00
<include name= ".htaccess" />
2015-05-10 03:29:54 -04:00
<include name= "*.html" />
<include name= "*.php" />
2014-08-01 07:47:39 -04:00
<include name= "*.json" />
<include name= "*.xml" />
<include name= "*.css" />
<include name= "*.js" />
<include name= "*.png" />
<include name= "*.ico" />
2014-10-07 11:16:46 -04:00
<include name= "*.txt" />
2016-04-03 00:51:39 -04:00
<include name= "syno/**" />
2014-12-22 11:10:07 -05:00
<include name= "images/**" />
<include name= "screenshots/**" />
2015-05-09 05:56:35 -04:00
<include name= "getting-started/**" />
2014-08-01 07:47:39 -04:00
</fileset>
</copy>
2015-05-16 00:52:25 -04:00
2015-05-10 03:29:54 -04:00
<!-- copy files and resolve ant variables -->
2016-11-04 10:39:19 -04:00
<copy-replace todir= "${dir.dist}/website" >
2015-05-10 03:29:54 -04:00
<fileset dir= "${dir.website}" >
<include name= "*.html" />
<include name= "*.php" />
</fileset>
2016-11-04 10:39:19 -04:00
</copy-replace>
2014-08-01 07:47:39 -04:00
2016-04-03 00:41:20 -04:00
<!-- upload -->
2017-04-16 13:08:09 -04:00
<release-deploy todir= "${deploy.website}" >
2016-04-03 00:41:20 -04:00
<fileset dir= "${dir.dist}/website" >
<modified >
2017-01-03 14:46:30 -05:00
<param name= "cache.cachefile" value= "${dir.cache}/scp.cache" />
2016-04-03 00:41:20 -04:00
</modified>
</fileset>
2017-04-16 13:08:09 -04:00
</release-deploy>
2016-04-03 00:41:20 -04:00
</target>
2018-01-19 15:55:19 -05:00
<target name= "eclipse-properties-builder" >
<exec executable= "git" outputproperty= "revision" failonerror= "true" >
<arg line= "rev-list --count master" />
</exec>
<copy-replace todir= "bin" >
<fileset dir= "source" includes= "**/*.properties" />
</copy-replace>
</target>
2014-08-01 07:47:39 -04:00
</project>