2009-05-21 06:00:48 -04:00
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2011-08-26 22:20:40 -04:00
<project name= "filebot" default= "fatjar" >
2012-11-22 23:27:54 -05:00
<!-- include default inputs (optional) -->
<property file= "profile.properties" />
2011-11-09 06:57:54 -05:00
<!-- include application properties -->
2014-04-19 03:03:52 -04:00
<property file= "source/net/filebot/Settings.properties" />
2011-11-09 06:57:54 -05:00
<property name= "title" value= "${application.name}" />
<property name= "version" value= "${application.version}" />
2012-02-26 07:58:16 -05:00
<tstamp >
<format property= "today" pattern= "yyyy-MM-dd" />
</tstamp>
2011-11-09 06:57:54 -05:00
2011-11-08 21:57:10 -05:00
<!-- define source dirs -->
2008-12-31 15:11:27 -05:00
<property name= "dir.source" location= "${basedir}/source" />
<property name= "dir.test" location= "${basedir}/test" />
<property name= "dir.build" location= "${basedir}/build" />
<property name= "dir.dist" location= "${basedir}/dist" />
<property name= "dir.lib" location= "${basedir}/lib" />
2011-08-26 22:20:40 -04:00
<property name= "dir.website" location= "${basedir}/website" />
2010-10-28 08:25:47 -04:00
<property name= "dir.installer" location= "${basedir}/installer" />
2011-11-08 21:57:10 -05:00
<!-- define output paths -->
2010-10-28 08:25:47 -04:00
<property name= "path.fatjar" location= "${dir.dist}/${title}_${version}.jar" />
2011-11-15 07:29:29 -05:00
<property name= "path.appbundle.tar.gz" location= "${dir.dist}/${title}_${version}.app.tar.gz" />
2013-02-04 09:34:39 -05:00
<property name= "path.ubuntu-binary.tar.gz" location= "${dir.dist}/filebot-${version}-ubuntu.tar.gz" />
2010-10-28 08:25:47 -04:00
<property name= "path.source.zip" location= "${dir.dist}/filebot-${version}-src.zip" />
2008-02-13 15:08:06 -05:00
2011-08-26 22:20:40 -04:00
<property name= "deploy.release" value= "web.sourceforge.net:/home/frs/project/f/fi/filebot/filebot" />
<property name= "deploy.website" value= "web.sourceforge.net:htdocs" />
2012-10-11 09:50:37 -04:00
<property name= "deploy.data.frs" value= "web.sourceforge.net:/home/frs/project/f/fi/filebot/data" />
2012-11-22 23:27:54 -05:00
2007-12-23 14:28:04 -05:00
2008-12-31 15:11:27 -05:00
<target name= "jar" depends= "build" >
2008-07-30 18:37:01 -04:00
<!-- create dist dir -->
<mkdir dir= "${dir.dist}" />
2008-12-31 15:11:27 -05:00
<!-- main jar -->
<jar destfile= "${dir.dist}/filebot.jar" >
2011-12-14 07:18:06 -05:00
<manifest >
<attribute name= "Built-By" value= "${user.name}" />
<attribute name= "Built-Date" value= "${today}" />
<attribute name= "Built-Revision" value= "${svn.revision}" />
<attribute name= "Application-Name" value= "${title}" />
<attribute name= "Application-Version" value= "${version}" />
2014-04-19 02:33:08 -04:00
<attribute name= "Main-Class" value= "net.filebot.Main" />
2011-12-14 07:18:06 -05:00
</manifest>
2008-12-31 15:11:27 -05:00
<fileset dir= "${dir.build}" excludes= "**/*Test*" />
</jar>
<!-- extra jar containing all the unit tests -->
<jar destfile= "${dir.dist}/filebot-test.jar" >
<fileset dir= "${dir.build}" includes= "**/*Test*" />
</jar>
2009-08-02 07:51:28 -04:00
2010-10-28 08:25:47 -04:00
<!-- source as zip -->
<zip destfile= "${path.source.zip}" >
2009-08-02 07:51:28 -04:00
<fileset dir= "source" />
<fileset dir= "test" />
</zip>
2008-12-31 15:11:27 -05:00
</target>
2010-10-28 08:25:47 -04:00
<target name= "fatjar" depends= "jar" description= "Merge all class files into a single executable jar file" >
2013-11-07 02:53:07 -05:00
<jar destfile= "${path.fatjar}" filesetmanifest= "merge" duplicate= "fail" index= "yes" >
2009-07-29 18:09:10 -04:00
<!-- include main jar -->
<zipfileset src= "${dir.dist}/filebot.jar" />
2009-07-30 20:27:07 -04:00
2008-06-09 14:41:06 -04:00
<!-- include libs -->
2014-03-18 16:16:39 -04:00
<zipfileset src= "${dir.lib}/xercesMinimal.jar" >
2009-04-11 19:27:10 -04:00
<include name= "org/apache/**" />
<include name= "org/w3c/dom/html/**" />
2007-12-23 14:28:04 -05:00
</zipfileset>
2012-02-26 07:58:16 -05:00
2008-12-31 15:11:27 -05:00
<zipfileset src= "${dir.lib}/nekohtml.jar" >
2009-04-11 19:27:10 -04:00
<include name= "org/cyberneko/html/**" />
2008-02-13 15:08:06 -05:00
</zipfileset>
2013-10-07 16:03:14 -04:00
2013-08-04 09:12:45 -04:00
<zipfileset src= "${dir.lib}/jsoup.jar" >
<include name= "org/jsoup/**" />
</zipfileset>
2012-02-26 07:58:16 -05:00
2011-08-05 00:38:11 -04:00
<zipfileset src= "${dir.lib}/json-simple.jar" >
<include name= "org/json/simple/**" />
2011-08-10 12:20:57 -04:00
</zipfileset>
2012-02-26 07:58:16 -05:00
2012-10-23 15:05:55 -04:00
<zipfileset src= "${dir.lib}/json-io.jar" >
2013-02-22 13:31:06 -05:00
<include name= "com/cedarsoftware/util/**" />
2012-10-23 15:05:55 -04:00
</zipfileset>
2008-12-31 15:11:27 -05:00
<zipfileset src= "${dir.lib}/simmetrics.jar" >
2009-04-11 19:27:10 -04:00
<include name= "uk/ac/shef/wit/simmetrics/**" />
2008-06-09 14:41:06 -04:00
</zipfileset>
2012-02-26 07:58:16 -05:00
2008-12-31 15:11:27 -05:00
<zipfileset src= "${dir.lib}/glazedlists.jar" >
2009-04-11 19:27:10 -04:00
<include name= "ca/odell/glazedlists/**" />
2008-10-12 16:25:23 -04:00
</zipfileset>
2012-02-26 07:58:16 -05:00
2014-03-18 16:16:39 -04:00
<zipfileset src= "${dir.lib}/miglayout-core.jar" >
<include name= "net/miginfocom/**" />
</zipfileset>
<zipfileset src= "${dir.lib}/miglayout-swing.jar" >
2009-04-11 19:27:10 -04:00
<include name= "net/miginfocom/**" />
2008-02-13 15:08:06 -05:00
</zipfileset>
2012-02-26 07:58:16 -05:00
2013-10-03 15:44:33 -04:00
<zipfileset src= "${dir.lib}/rsyntaxtextarea.jar" >
<include name= "org/fife/**" />
</zipfileset>
2009-08-17 13:23:29 -04:00
<zipfileset src= "${dir.lib}/xmlrpc.jar" >
2009-04-11 19:27:10 -04:00
<include name= "redstone/xmlrpc/**" />
2008-02-13 15:08:06 -05:00
</zipfileset>
2012-02-26 07:58:16 -05:00
2008-12-31 15:11:27 -05:00
<zipfileset src= "${dir.lib}/args4j.jar" >
2009-04-11 19:27:10 -04:00
<include name= "org/kohsuke/args4j/**" />
2008-07-30 18:37:01 -04:00
</zipfileset>
2013-10-07 16:03:14 -04:00
2013-08-10 03:56:11 -04:00
<zipfileset src= "${dir.lib}/xz.jar" >
<include name= "org/tukaani/xz/**" />
</zipfileset>
2012-02-26 07:58:16 -05:00
2009-02-02 15:50:04 -05:00
<zipfileset src= "${dir.lib}/ehcache.jar" >
2013-10-07 16:03:14 -04:00
<include name= "META-INF/services/**" />
2009-04-11 19:27:10 -04:00
<include name= "net/sf/ehcache/**" />
2013-10-07 16:03:14 -04:00
<include name= "org/terracotta/**" />
2009-11-21 14:46:01 -05:00
<include name= "ehcache-failsafe.xml" />
2013-10-07 16:03:14 -04:00
<include name= "build-info.properties" />
2009-04-05 06:08:00 -04:00
</zipfileset>
2012-02-26 07:58:16 -05:00
2014-03-18 16:16:39 -04:00
<zipfileset src= "${dir.lib}/slf4j-api.jar" >
2010-10-24 09:43:11 -04:00
<include name= "org/slf4j/**" />
</zipfileset>
2012-02-26 07:58:16 -05:00
2014-03-18 16:16:39 -04:00
<zipfileset src= "${dir.lib}/slf4j-jdk14.jar" >
2010-10-24 09:43:11 -04:00
<include name= "org/slf4j/**" />
</zipfileset>
2012-02-26 07:58:16 -05:00
2012-02-10 11:43:09 -05:00
<zipfileset src= "${dir.lib}/commons-io.jar" >
<include name= "org/apache/commons/io/**" />
2011-11-26 02:53:00 -05:00
</zipfileset>
2012-02-26 07:58:16 -05:00
2012-07-16 15:11:07 -04:00
<!-- include classes and native libraries -->
2009-04-05 06:08:00 -04:00
<zipfileset src= "${dir.lib}/jna.jar" >
<include name= "com/sun/jna/**" />
2009-04-11 19:27:10 -04:00
</zipfileset>
2012-07-20 11:47:16 -04:00
2014-03-18 16:16:39 -04:00
<zipfileset src= "${dir.lib}/jna-platform.jar" >
2012-07-16 15:11:07 -04:00
<include name= "com/sun/jna/platform/win32/**" />
</zipfileset>
2012-02-26 07:58:16 -05:00
2009-09-22 17:23:39 -04:00
<zipfileset src= "${dir.lib}/groovy.jar" >
<include name= "groovy*/**" />
<include name= "org/codehaus/groovy/**" />
2010-10-24 13:12:51 -04:00
<include name= "META-INF/dgminfo" />
2012-07-09 15:46:18 -04:00
<include name= "META-INF/services/**" />
2013-11-26 01:24:56 -05:00
<include name= "META-INF/*.properties" />
2014-04-13 15:37:11 -04:00
<!-- filebot already includes it's own extension modules -->
2014-06-18 05:28:27 -04:00
<exclude name= "META-INF/services/org.codehaus.groovy.runtime.ExtensionModule" />
2012-07-09 15:46:18 -04:00
</zipfileset>
2011-09-03 05:30:38 -04:00
<zipfileset src= "${dir.lib}/icu4j.jar" >
2012-02-09 04:44:00 -05:00
<include name= "com/ibm/icu/**" />
</zipfileset>
2009-07-27 18:34:42 -04:00
2012-09-26 12:09:00 -04:00
<zipfileset src= "${dir.lib}/jacksum.jar" >
<include name= "jonelo/jacksum/adapt/**" />
<include name= "jonelo/jacksum/algorithm/**" />
<include name= "jonelo/sugar/util/**" />
</zipfileset>
2009-06-30 16:49:09 -04:00
<zipfileset src= "${dir.lib}/junrar-custom.jar" >
<include name= "de/innosystec/unrar/**" />
</zipfileset>
2012-02-26 07:58:16 -05:00
2011-09-21 09:40:46 -04:00
<zipfileset src= "${dir.lib}/jgat-custom.jar" >
<include name= "com/dmurph/tracking/**" />
</zipfileset>
2012-06-17 06:43:18 -04:00
2012-02-26 13:05:07 -05:00
<zipfileset src= "${dir.lib}/sevenzipjbinding.jar" >
<include name= "net/sf/sevenzipjbinding/**" />
</zipfileset>
2012-07-20 11:47:16 -04:00
2012-07-14 04:41:28 -04:00
<!-- Ivy for @Grapes automatic dependency management -->
<zipfileset src= "${dir.lib}/scripting/ivy.jar" >
<include name= "org/apache/ivy/**" />
</zipfileset>
2012-07-20 11:47:16 -04:00
2012-07-14 04:41:28 -04:00
<!-- AntBuilder including dependencies for ant - javamail, ant - commons - net and ant - jsch -->
<zipfileset src= "${dir.lib}/scripting/ant.jar" >
<include name= "org/apache/tools/**" />
</zipfileset>
<zipfileset src= "${dir.lib}/scripting/ant-launcher.jar" >
<include name= "org/apache/tools/**" />
</zipfileset>
<zipfileset src= "${dir.lib}/scripting/ant-commons-net.jar" >
<include name= "org/apache/tools/**" />
</zipfileset>
<zipfileset src= "${dir.lib}/scripting/ant-jsch.jar" >
<include name= "org/apache/tools/**" />
</zipfileset>
<zipfileset src= "${dir.lib}/scripting/ant-javamail.jar" >
<include name= "org/apache/tools/**" />
</zipfileset>
<zipfileset src= "${dir.lib}/scripting/commons-net.jar" >
<include name= "org/apache/commons/net/**" />
</zipfileset>
<zipfileset src= "${dir.lib}/scripting/jsch.jar" >
<include name= "com/jcraft/jsch/**" />
</zipfileset>
<zipfileset src= "${dir.lib}/scripting/mail.jar" >
<include name= "javax/mail/**" />
<include name= "com/sun/mail/**" />
<include name= "META-INF/*mail*" />
</zipfileset>
2007-12-23 14:28:04 -05:00
</jar>
</target>
2014-07-09 12:59:53 -04:00
<target name= "appbundle" description= "Build an OSX application bundle" >
2014-04-22 02:17:21 -04:00
<taskdef name= "bundleapp" classname= "com.oracle.appbundler.AppBundlerTask" classpath= "${dir.lib}/build/appbundler.jar" />
2014-06-18 05:28:27 -04:00
2014-04-22 05:25:49 -04:00
<bundleapp outputdirectory= "${dir.dist}" name= "${title}" displayname= "${title}" shortversion= "${version}" identifier= "net.sourceforge.FileBot" mainclassname= "net.filebot.Main" icon= "${dir.installer}/appbundle/filebot.icns" copyright= "2014 Reinhard Pointner" applicationcategory= "public.app-category.productivity" >
<classpath file= "${path.fatjar}" />
2014-04-22 02:17:21 -04:00
<librarypath dir= "${dir.lib}/native/mac-x86_64" />
2014-06-18 05:28:27 -04:00
2014-04-22 02:17:21 -04:00
<option value= "-Dapplication.deployment=app" />
2014-06-19 04:35:54 -04:00
<option value= "-Dapplication.update=auto" />
2014-04-22 02:17:21 -04:00
<option value= "-Dunixfs=false" />
<option value= "-DuseExtendedFileAttributes=true" />
<option value= "-DuseCreationDate=false" />
2014-06-18 05:28:27 -04:00
2014-04-22 02:17:21 -04:00
<option value= "-Djava.net.useSystemProxies=true" />
<option value= "-Dsun.net.client.defaultConnectTimeout=10000" />
<option value= "-Dsun.net.client.defaultReadTimeout=60000" />
2014-04-24 00:39:20 -04:00
<option value= "-Dfile.encoding=UTF-8" />
2014-06-18 05:28:27 -04:00
2014-04-22 02:17:21 -04:00
<option value= "-Djna.nosys=true" />
<option value= "-Djna.library.path=$APP_ROOT/Contents/MacOS" />
<option value= "-Djava.library.path=$APP_ROOT/Contents/MacOS" />
<option value= "-Dnet.filebot.AcoustID.fpcalc=$APP_ROOT/Contents/MacOS/fpcalc" />
2014-06-18 05:28:27 -04:00
2014-04-24 02:53:34 -04:00
<option value= "-Xdock:name=${title}" />
2014-04-24 00:39:20 -04:00
<option value= "-Dcom.apple.macos.use-file-dialog-packages=true" />
<option value= "-Dcom.apple.macos.useScreenMenuBar=true" />
2014-04-22 02:17:21 -04:00
</bundleapp>
2014-06-18 05:28:27 -04:00
2011-11-15 07:29:29 -05:00
<!-- application bundle folder as .tar.gz -->
<tar destfile= "${path.appbundle.tar.gz}" compression= "gzip" >
2011-11-15 22:00:54 -05:00
<tarfileset dir= "${dir.dist}" includes= "${title}.app/**" excludes= "**/MacOS/**" />
2014-04-22 05:25:49 -04:00
<tarfileset dir= "${dir.dist}" includes= "${title}.app/**/**.dylib" />
2014-06-18 05:28:27 -04:00
2012-02-26 07:58:16 -05:00
<!-- IMPORTANT application stub must be executable!! -->
2014-04-22 05:25:49 -04:00
<tarfileset dir= "${dir.dist}" includes= "${title}.app/**/**Launcher" filemode= "755" />
2014-04-22 02:17:21 -04:00
<tarfileset dir= "${dir.dist}" includes= "${title}.app/**/fpcalc" filemode= "755" />
<tarfileset prefix= "${title}.app/Contents/MacOS" dir= "${dir.installer}/appbundle" includes= "*.sh" filemode= "755" />
2011-11-15 07:29:29 -05:00
</tar>
2014-07-16 08:58:21 -04:00
<checksum file= "${path.appbundle.tar.gz}" algorithm= "SHA-256" fileext= ".sha256" />
2010-10-28 08:25:47 -04:00
</target>
2014-07-09 12:59:53 -04:00
<target name= "ppa-binary" depends= "svn-update" >
2013-02-04 09:34:39 -05:00
<tar longfile= "gnu" compression= "gzip" destfile= "${path.ubuntu-binary.tar.gz}" >
<tarfileset fullpath= "i386/opt/filebot/FileBot.jar" file= "${path.fatjar}" />
<tarfileset fullpath= "amd64/opt/filebot/FileBot.jar" file= "${path.fatjar}" />
<tarfileset prefix= "i386/opt/filebot" dir= "${dir.lib}/native/linux-i386" includes= "*.so" />
<tarfileset prefix= "amd64/opt/filebot" dir= "${dir.lib}/native/linux-amd64" includes= "*.so" />
<tarfileset prefix= "i386/opt/filebot/bin" file= "${dir.installer}/ubuntu/filebot.sh" filemode= "755" />
<tarfileset prefix= "amd64/opt/filebot/bin" file= "${dir.installer}/ubuntu/filebot.sh" filemode= "755" />
2013-02-07 23:45:54 -05:00
<tarfileset fullpath= "filebot.desktop" file= "${dir.installer}/ubuntu/FileBot.desktop" />
<tarfileset fullpath= "filebot.svg" file= "${dir.installer}/icons/icon.svg" />
2013-02-04 09:34:39 -05:00
</tar>
</target>
2014-07-09 12:59:53 -04:00
<target name= "deb" description= "Build debian package for i386 and amd64" >
2011-11-28 22:18:49 -05:00
<taskdef resource= "ant_deb_task.properties" classpath= "${dir.lib}/build/ant-deb.jar" />
2010-11-07 10:04:10 -05:00
<antcall target= "deb-arch" >
<param name= "arch" value= "i386" />
</antcall>
<antcall target= "deb-arch" >
<param name= "arch" value= "amd64" />
</antcall>
</target>
<target name= "deb-arch" >
2013-11-08 13:04:29 -05:00
<deb todir= "${dir.dist}" package= "filebot" version= "${version}" architecture= "${arch}" section= "misc" depends= "openjdk-7-jre | openjdk-7-jre-headless" homepage= "http://www.filebot.net" priority= "optional" postinst= "${dir.installer}/deb/postinst.sh" prerm= "${dir.installer}/deb/prerem.sh" >
2011-12-07 00:51:08 -05:00
<maintainer name= "Reinhard Pointner" email= "rednoah@users.sourceforge.net" />
2013-02-03 05:15:36 -05:00
<description synopsis= "The ultimate TV and Movie Renamer" > FileBot is the ultimate tool for renaming your movies, tv shows or anime and even downloading subtitles. It's smart, streamlined for simplicity and just works. Putting the super-efficient UI aside, it's also got a full-featured command-line interface and scripting engine for all sorts of automation. Anything is possible.</description>
2010-11-07 10:04:10 -05:00
<tarfileset fullpath= "usr/share/filebot/FileBot.jar" file= "${path.fatjar}" />
<tarfileset prefix= "usr/share/filebot" dir= "${dir.lib}/native/linux-${arch}" includes= "*.so" />
2013-11-08 08:05:42 -05:00
<tarfileset prefix= "usr/share/filebot" file= "${dir.lib}/native/linux-${arch}/fpcalc" filemode= "755" />
2012-06-17 08:21:40 -04:00
<tarfileset prefix= "usr/share/filebot" file= "${dir.installer}/icons/icon.svg" />
2011-11-14 22:31:47 -05:00
<tarfileset prefix= "usr/share/filebot/bin" file= "${dir.installer}/deb/filebot.sh" filemode= "755" />
2010-11-07 10:04:10 -05:00
<tarfileset prefix= "usr/share/applications" file= "${dir.installer}/deb/FileBot.desktop" />
</deb>
</target>
2012-06-17 06:43:18 -04:00
2014-07-09 12:59:53 -04:00
<target name= "ipkg" description= "Build ipkg package for ARM and ATOM" >
2012-05-07 21:23:32 -04:00
<taskdef resource= "ant_deb_task.properties" classpath= "${dir.lib}/build/ant-deb.jar" />
2012-06-17 06:43:18 -04:00
<antcall target= "ipkg-arch" >
<param name= "arch" value= "arm" />
</antcall>
<antcall target= "ipkg-arch" >
<param name= "arch" value= "i686" />
</antcall>
</target>
<target name= "ipkg-arch" >
2013-03-09 12:15:46 -05:00
<deb todir= "${dir.dist}" package= "filebot" version= "${version}" architecture= "${arch}" section= "misc" homepage= "http://www.filebot.net" priority= "optional" postinst= "${dir.installer}/ipkg/postinst.sh" prerm= "${dir.installer}/ipkg/prerem.sh" >
2012-06-17 06:43:18 -04:00
<maintainer name= "Reinhard Pointner" email= "rednoah@users.sourceforge.net" />
2013-02-04 09:34:39 -05:00
<description synopsis= "The ultimate TV and Movie Renamer" > FileBot is the ultimate tool for renaming your movies, tv shows or anime and even downloading subtitles. It's smart, streamlined for simplicity and just works. Putting the super-efficient UI aside, it's also got a full-featured command-line interface and scripting engine for all sorts of automation. Anything is possible.</description>
2014-05-11 02:38:34 -04:00
<tarfileset fullpath= "opt/share/filebot/FileBot.jar" file= "${path.fatjar}" />
<tarfileset prefix= "opt/share/filebot" dir= "${dir.lib}/native/linux-${arch}" includes= "*.so" />
<tarfileset prefix= "opt/share/filebot" file= "${dir.lib}/native/linux-${arch}/fpcalc" filemode= "755" />
<tarfileset prefix= "opt/share/filebot/bin" file= "${dir.installer}/ipkg/filebot.sh" filemode= "755" />
2012-05-14 15:15:22 -04:00
</deb>
2012-06-17 06:43:18 -04:00
<move tofile= "${dir.dist}/filebot_${version}_${arch}.ipk" file= "${dir.dist}/filebot_${version}_${arch}.deb" overwrite= "true" />
2012-05-14 15:15:22 -04:00
</target>
2012-06-17 06:43:18 -04:00
2010-11-07 10:04:10 -05:00
2014-07-09 12:59:53 -04:00
<target name= "msi" description= "Build Windows Installer for x86 and x64" >
2010-11-07 10:04:10 -05:00
<antcall target= "msi-arch" >
2010-11-06 07:01:19 -04:00
<param name= "arch" value= "x86" />
2012-02-26 13:05:07 -05:00
<param name= "libgcc_name" value= "mingwm10.dll" />
2010-11-06 07:01:19 -04:00
</antcall>
2010-11-07 10:04:10 -05:00
<antcall target= "msi-arch" >
2010-11-06 07:01:19 -04:00
<param name= "arch" value= "x64" />
2012-02-26 13:05:07 -05:00
<param name= "libgcc_name" value= "libgcc_s_sjlj-1.dll" />
2010-11-06 07:01:19 -04:00
</antcall>
</target>
2010-11-07 10:04:10 -05:00
<target name= "msi-arch" >
2013-11-22 03:28:17 -05:00
<property name= "jnidispatch" location= "${dir.lib}/native/win32-${arch}/jnidispatch.dll" />
2010-11-06 07:01:19 -04:00
<property name= "mediainfo" location= "${dir.lib}/native/win32-${arch}/MediaInfo.dll" />
2012-03-02 20:41:47 -05:00
<property name= "lib7z_binding" location= "${dir.lib}/native/win32-${arch}/7-Zip-JBinding.dll" />
2012-02-26 13:05:07 -05:00
<property name= "libgcc_path" location= "${dir.lib}/native/win32-${arch}/${libgcc_name}" />
2013-10-08 14:04:42 -04:00
<property name= "fpcalc_path" location= "${dir.lib}/native/win32-${arch}/fpcalc.exe" />
2010-11-07 10:04:10 -05:00
<property name= "installer" location= "${dir.dist}/FileBot_${version}_${arch}.msi" />
2012-06-17 06:43:18 -04:00
2010-11-06 07:01:19 -04:00
<exec executable= "candle.exe" dir= "${dir.installer}/msi" failonerror= "true" >
2013-11-22 03:28:17 -05:00
<arg line= "filebot-wix.xml -out ${dir.dist}/msi.wixobj -darch=${arch} -dreleaseversion=${version} -dfatjar=${path.fatjar} -djnidispatch=${jnidispatch} -dmediainfo=${mediainfo} -dlib7z_binding=${lib7z_binding} -dlibgcc_name=${libgcc_name} -dlibgcc_path=${libgcc_path} -dfpcalc_path=${fpcalc_path}" />
2010-11-06 07:01:19 -04:00
</exec>
<exec executable= "light.exe" dir= "${dir.installer}/msi" failonerror= "true" >
<arg line= "${dir.dist}/msi.wixobj -sval -ext WixUIExtension -out ${installer}" />
</exec>
</target>
2012-02-26 07:58:16 -05:00
2014-07-09 12:59:53 -04:00
<target name= "portable" description= "Portable application package" >
2012-02-26 07:58:16 -05:00
<mkdir dir= "${dir.dist}/portable" />
2011-12-28 08:51:36 -05:00
<copy file= "${path.fatjar}" tofile= "${dir.dist}/portable/FileBot.jar" />
<copy todir= "${dir.dist}/portable" >
2012-11-03 22:10:27 -04:00
<fileset dir= "${dir.installer}/portable" includes= "*.exe, *.ini, *.cmd, *.sh" />
2011-12-28 08:51:36 -05:00
</copy>
2012-02-26 07:58:16 -05:00
2011-12-28 08:51:36 -05:00
<zip destfile= "${dir.dist}/FileBot_${version}-portable.zip" >
2012-11-03 22:10:27 -04:00
<zipfileset dir= "${dir.dist}/portable" includes= "*.jar, *.exe, *.ini, *.cmd" />
2011-12-28 08:51:36 -05:00
<zipfileset dir= "${dir.dist}/portable" includes= "*.sh" filemode= "755" />
</zip>
</target>
2012-02-26 07:58:16 -05:00
2014-07-09 12:59:53 -04:00
<target name= "spk" description= "Synology NAS package" >
2014-07-07 04:56:05 -04:00
<taskdef name= "spk" classname= "net.filebot.ant.spk.SpkTask" classpath= "${dir.lib}/build/ant-spk.jar" />
2014-07-07 04:52:47 -04:00
2014-07-07 04:56:05 -04:00
<spk destdir= "${dir.dist}" name= "filebot" version= "${version}" arch= "noarch" >
2014-07-07 04:52:47 -04:00
<info name= "displayname" value= "FileBot" />
<info name= "description" value= "FileBot is the ultimate tool for organizing and renaming your movies, TV shows or anime, as well as downloading subtitles and artwork. It's smart and just works." />
<info name= "maintainer" value= "rednoah" />
<info name= "distributor" value= "FileBot" />
<info name= "distributor_url" value= "http://www.filebot.net/" />
<info name= "support_url" value= "http://www.filebot.net/forums/" />
<info name= "firmware" value= "5.0" />
<info name= "startable" value= "no" />
<info name= "helpurl" value= "http://www.filebot.net/cli.html" />
<icon size= "72" file= "${dir.installer}/icons/icon72.png" />
<icon size= "120" file= "${dir.installer}/icons/icon120.png" />
<package dir= "${dir.installer}/spk/package" includes= "*.sh" filemode= "755" />
<package file= "${path.fatjar}" fullpath= "FileBot.jar" />
<scripts dir= "${dir.installer}/spk/scripts" filemode= "755" />
</spk>
</target>
2010-10-28 08:25:47 -04:00
<target name= "webstart" depends= "jar" description= "Build and compress jars used for webstart deployment" >
2009-07-27 18:34:42 -04:00
<!-- create dirs -->
<mkdir dir= "${dir.dist}/webstart" />
2010-10-28 08:25:47 -04:00
<!-- copy jnlp descriptors and icons -->
<copy todir= "${dir.dist}/webstart" >
<fileset dir= "${dir.installer}/webstart" />
<fileset dir= "${dir.installer}/icons" />
</copy>
2009-07-27 18:34:42 -04:00
<!-- copy jars -->
<copy todir= "${dir.dist}/webstart" >
2011-11-08 21:57:10 -05:00
<fileset dir= "${dir.lib}" includes= "*.jar" excludes= "jna.jar" />
2009-07-27 18:34:42 -04:00
</copy>
2009-08-02 07:51:28 -04:00
2009-07-27 18:34:42 -04:00
<!-- copy jna.jar without native libs -->
<jar destfile= "${dir.dist}/webstart/jna.jar" >
<zipfileset src= "${dir.lib}/jna.jar" includes= "**/*.class" />
</jar>
2012-02-26 07:58:16 -05:00
2011-12-26 13:10:53 -05:00
<!-- create mediainfo jar as seperate jar and use as trigger for lazy loading the native libs -->
<jar destfile= "${dir.dist}/webstart/mediainfo.jar" >
2014-04-19 03:03:52 -04:00
<fileset dir= "${dir.build}" includes= "net/filebot/mediainfo/**" />
2011-12-26 13:10:53 -05:00
</jar>
<!-- create indexed main jar -->
<jar destfile= "${dir.dist}/webstart/filebot.jar" index= "yes" >
2014-04-19 03:03:52 -04:00
<fileset dir= "${dir.build}" excludes= "**/*Test*, net/filebot/mediainfo/**" />
2011-12-26 13:10:53 -05:00
<indexjars >
<!-- IMPORTANT if groovy is indexed things break during runtime!! -->
<fileset dir= "${dir.dist}/webstart" includes= "**/*.jar" excludes= "filebot.jar, groovy.jar" />
</indexjars>
</jar>
2009-07-27 18:34:42 -04:00
<!-- create native lib jars -->
<antcall target= "webstart-nativelib" >
2009-07-29 18:09:10 -04:00
<param name= "arch" value= "win32-x86" />
2009-07-27 18:34:42 -04:00
</antcall>
<antcall target= "webstart-nativelib" >
2010-11-06 07:01:19 -04:00
<param name= "arch" value= "win32-x64" />
2009-07-27 18:34:42 -04:00
</antcall>
<antcall target= "webstart-nativelib" >
<param name= "arch" value= "linux-i386" />
</antcall>
<antcall target= "webstart-nativelib" >
<param name= "arch" value= "linux-amd64" />
</antcall>
<antcall target= "webstart-nativelib" >
2010-02-06 21:15:38 -05:00
<param name= "arch" value= "mac-x86_64" />
2009-07-27 18:34:42 -04:00
</antcall>
2011-12-07 16:56:43 -05:00
<!-- sign all jars -->
2009-07-27 18:34:42 -04:00
<apply executable= "pack200" >
2009-08-15 07:47:24 -04:00
<!-- workaround for bug 6575373, see http://bugs.sun.com/view_bug.do?bug_id=6575373 -->
<arg line= "--segment-limit=-1" />
2009-07-27 18:34:42 -04:00
<arg line= "--repack" />
<srcfile />
2011-12-07 16:56:43 -05:00
<fileset dir= "${dir.dist}/webstart" includes= "**/*.jar" />
2009-07-27 18:34:42 -04:00
</apply>
2009-08-15 07:47:24 -04:00
2009-07-27 18:34:42 -04:00
<signjar alias= "filebot" keystore= "filebot.keystore" storepass= "secret" >
2011-12-07 16:56:43 -05:00
<fileset id= "signjar" dir= "${dir.dist}/webstart" includes= "**/*.jar" />
2009-07-27 18:34:42 -04:00
</signjar>
2012-02-26 07:58:16 -05:00
2009-07-27 18:34:42 -04:00
<!-- pack200 all jars -->
<apply executable= "pack200" dest= "${dir.dist}/webstart" >
2009-08-15 07:47:24 -04:00
<!-- workaround for bug 6575373, see http://bugs.sun.com/view_bug.do?bug_id=6575373 -->
<arg line= "--segment-limit=-1" />
2009-07-27 18:34:42 -04:00
<targetfile />
<srcfile />
<fileset dir= "${dir.dist}/webstart" includes= "*.jar" />
<mapper type= "glob" from= "*.jar" to= "*.jar.pack.gz" />
</apply>
</target>
<target name= "webstart-nativelib" >
<!-- create temp dir -->
<mkdir dir= "${dir.dist}/webstart/native/${arch}" />
<!-- copy native libs to temp dir -->
<copy todir= "${dir.dist}/webstart/native/${arch}" flatten= "true" >
<zipfileset src= "${dir.lib}/jna.jar" includes= "com/sun/jna/${arch}/*" />
2013-01-10 14:13:21 -05:00
<fileset dir= "${dir.lib}/native" >
<include name= "${arch}/**.dll" />
<include name= "${arch}/**.dylib" />
<include name= "${arch}/**.so" />
</fileset>
2009-07-27 18:34:42 -04:00
</copy>
<!-- create native lib jar -->
<jar destfile= "${dir.dist}/webstart/native/${arch}.jar" basedir= "${dir.dist}/webstart/native/${arch}" />
<!-- delete temp dir -->
<delete dir= "${dir.dist}/webstart/native/${arch}" />
</target>
<target name= "genkey" >
<genkey alias= "filebot" keystore= "filebot.keystore" storepass= "secret" validity= "3650" dname= "CN=${user.name}" />
</target>
2008-06-09 14:41:06 -04:00
<target name= "build" >
2007-12-23 14:28:04 -05:00
<!-- create build dir -->
2008-06-09 14:41:06 -04:00
<mkdir dir= "${dir.build}" />
2007-12-23 14:28:04 -05:00
<!-- compile -->
2014-03-18 16:16:39 -04:00
<javac srcdir= "${dir.source}:${dir.test}" destdir= "${dir.build}" target= "1.7" source= "1.7" encoding= "utf-8" debug= "true" debuglevel= "lines,vars,source" includeAntRuntime= "false" >
2007-12-23 14:28:04 -05:00
<classpath >
2008-06-09 14:41:06 -04:00
<fileset dir= "${dir.lib}" includes= "*.jar" />
2011-11-08 21:57:10 -05:00
<pathelement location= "${dir.lib}/build/junit.jar" />
2007-12-23 14:28:04 -05:00
</classpath>
</javac>
2009-06-02 07:32:30 -04:00
2007-12-23 14:28:04 -05:00
<!-- copy resources -->
2008-06-09 14:41:06 -04:00
<copy todir= "${dir.build}" >
<fileset dir= "${dir.source}" >
2009-07-27 18:34:42 -04:00
<exclude name= "**/*.java" />
2007-12-23 14:28:04 -05:00
</fileset>
</copy>
2012-06-17 06:43:18 -04:00
2012-03-07 09:06:10 -05:00
<!-- update application properties -->
<replace dir= "${dir.build}" encoding= "utf-8" summary= "yes" >
<include name= "**/*.properties" />
<replacefilter token= "@{svn.revision}" value= "${svn.revision}" />
2014-04-15 10:03:31 -04:00
<replacefilter token= "@{version}" value= "${version}" />
2012-03-07 09:06:10 -05:00
</replace>
2007-12-23 14:28:04 -05:00
</target>
<target name= "clean" >
2008-07-30 18:37:01 -04:00
<delete dir= "${dir.dist}" />
2008-06-09 14:41:06 -04:00
<delete dir= "${dir.build}" />
2007-12-23 14:28:04 -05:00
</target>
2008-12-31 15:11:27 -05:00
<target name= "test" depends= "jar" >
<junit printsummary= "yes" fork= "true" >
2008-06-09 14:41:06 -04:00
<classpath >
2008-12-31 15:11:27 -05:00
<fileset dir= "${dir.dist}" includes= "*.jar" />
<fileset dir= "${dir.lib}" includes= "*.jar" />
2011-11-08 21:57:10 -05:00
<pathelement location= "${dir.lib}/build/junit.jar" />
2008-06-09 14:41:06 -04:00
</classpath>
<formatter type= "plain" />
2014-04-19 02:33:08 -04:00
<test name= "net.filebot.AllTests" outfile= "test-report" />
2008-06-09 14:41:06 -04:00
</junit>
</target>
2008-12-31 15:11:27 -05:00
2009-06-02 07:32:30 -04:00
2008-12-31 15:11:27 -05:00
<target name= "test-fatjar" depends= "fatjar" >
<junit printsummary= "yes" fork= "true" >
<classpath >
2010-10-28 08:25:47 -04:00
<pathelement location= "${path.fatjar}" />
2008-12-31 15:11:27 -05:00
<pathelement location= "${dir.dist}/filebot-test.jar" />
2011-11-08 21:57:10 -05:00
<pathelement location= "${dir.lib}/build/junit.jar" />
2008-12-31 15:11:27 -05:00
</classpath>
<formatter type= "plain" />
2014-04-19 02:33:08 -04:00
<test name= "net.filebot.AllTests" outfile= "test-report" />
2008-12-31 15:11:27 -05:00
</junit>
</target>
2009-06-02 07:32:30 -04:00
2012-12-01 10:57:10 -05:00
<target name= "svn-update" depends= "login" >
2012-07-20 11:47:16 -04:00
<taskdef name= "groovy" classname= "org.codehaus.groovy.ant.Groovy" classpath= "${dir.lib}/groovy.jar" />
2012-07-26 04:50:42 -04:00
<groovy >
2012-12-01 10:57:10 -05:00
properties['svn.revision'] = "svn update --password ${properties['sf.password']}".execute().text.split(/\n/).last().replaceAll(/\D/, '')
2012-07-26 04:50:42 -04:00
</groovy>
<fail unless= "svn.revision" />
2011-11-09 06:18:38 -05:00
<echo > Revision: ${svn.revision}</echo>
</target>
2014-07-16 08:43:57 -04:00
<target name= "deploy-release" depends= "svn-update, fatjar, appbundle, deb, ipkg, msi, portable, spk, login" >
2010-02-04 11:22:45 -05:00
<mkdir dir= "${dir.dist}/release" />
2010-10-24 09:43:11 -04:00
2011-08-31 07:10:43 -04:00
<!-- prepare release packages -->
2010-10-28 08:25:47 -04:00
<copy todir= "${dir.dist}/release/${title}_${version}" file= "${path.fatjar}" />
2011-11-15 07:29:29 -05:00
<copy todir= "${dir.dist}/release/${title}_${version}" file= "${path.appbundle.tar.gz}" />
2010-11-07 10:04:10 -05:00
<copy todir= "${dir.dist}/release/${title}_${version}" file= "${dir.dist}/filebot_${version}_i386.deb" />
<copy todir= "${dir.dist}/release/${title}_${version}" file= "${dir.dist}/filebot_${version}_amd64.deb" />
2012-05-07 21:23:32 -04:00
<copy todir= "${dir.dist}/release/${title}_${version}" file= "${dir.dist}/filebot_${version}_arm.ipk" />
2012-05-14 15:15:22 -04:00
<copy todir= "${dir.dist}/release/${title}_${version}" file= "${dir.dist}/filebot_${version}_i686.ipk" />
2010-11-07 10:04:10 -05:00
<copy todir= "${dir.dist}/release/${title}_${version}" file= "${dir.dist}/FileBot_${version}_x86.msi" />
<copy todir= "${dir.dist}/release/${title}_${version}" file= "${dir.dist}/FileBot_${version}_x64.msi" />
2011-12-28 08:51:36 -05:00
<copy todir= "${dir.dist}/release/${title}_${version}" file= "${dir.dist}/FileBot_${version}-portable.zip" />
2014-07-15 10:49:27 -04:00
<copy todir= "${dir.dist}/release/${title}_${version}" file= "${dir.dist}/filebot-${version}-noarch.spk" />
2010-10-24 09:43:11 -04:00
2014-07-16 08:43:57 -04:00
<!-- upload to sf -->
2012-10-25 14:03:59 -04:00
<scp todir= "${sf.user}:${sf.password}@${deploy.release}" trust= "yes" verbose= "true" sftp= "true" >
2014-07-16 08:43:57 -04:00
<fileset dir= "${dir.dist}/release" />
2010-02-04 11:22:45 -05:00
</scp>
</target>
2009-06-02 07:32:30 -04:00
2011-08-10 12:20:57 -04:00
2012-07-26 03:54:39 -04:00
<target name= "deploy-website" depends= "login" >
2011-08-31 07:10:43 -04:00
<!-- prepare website resources -->
2011-08-26 22:20:40 -04:00
<copy todir= "${dir.dist}/website" >
<fileset dir= "${dir.website}" >
2012-12-14 10:32:27 -05:00
<include name= "*.json" />
2011-12-24 05:57:36 -05:00
<include name= "*.xml" />
2011-12-27 01:03:17 -05:00
<include name= "*.php" />
2011-08-26 22:20:40 -04:00
<include name= "*.html" />
<include name= "*.css" />
<include name= "*.js" />
<include name= "*.png" />
<include name= "*.ico" />
2013-02-25 12:27:34 -05:00
<include name= ".htaccess" />
2014-07-12 14:04:31 -04:00
<include name= "syno/**" />
<!-- <include name="images/**" /> -->
<!-- <include name="screenshots/**" /> -->
2011-08-26 22:20:40 -04:00
</fileset>
</copy>
2014-07-07 15:53:15 -04:00
<!-- get MD5 sum for Synology Package -->
<taskdef name= "groovy" classname= "org.codehaus.groovy.ant.Groovy" classpath= "${dir.lib}/groovy.jar" />
<groovy >
def releaseFeed = new URL("http://sourceforge.net/projects/filebot/files/filebot/FileBot_${properties['version']}//list")
def spk = new groovy.json.JsonSlurper().parse(releaseFeed).find{ it.key.endsWith('.spk') }.value
properties['spk.md5'] = spk.md5
</groovy>
<fail unless= "spk.md5" />
2011-08-26 22:20:40 -04:00
<!-- replace variables for new release -->
<replace dir= "${dir.dist}/website" encoding= "utf-8" summary= "yes" >
<include name= "**/*.html" />
2011-12-27 01:03:17 -05:00
<include name= "**/*.php" />
2014-07-07 15:53:15 -04:00
<include name= "**/*.json" />
2011-08-26 22:20:40 -04:00
<replacefilter token= "@{version}" value= "${version}" />
2014-07-07 15:53:15 -04:00
<replacefilter token= "@{spk.md5}" value= "${spk.md5}" />
2011-08-26 22:20:40 -04:00
</replace>
<!-- upload -->
2012-10-25 14:03:59 -04:00
<scp todir= "${sf.user}:${sf.password}@${deploy.website}" trust= "yes" verbose= "true" sftp= "true" >
2011-08-26 22:20:40 -04:00
<fileset dir= "${dir.dist}/website" />
</scp>
</target>
2012-11-22 23:27:54 -05:00
<target name= "chocolatey-push" description= "chocolatey package" >
<copy todir= "${dir.dist}/chocolatey" >
<fileset dir= "${dir.installer}/chocolatey" />
</copy>
<!-- replace variables for new release -->
<replace dir= "${dir.dist}/chocolatey" encoding= "utf-8" summary= "yes" >
<include name= "**/*.ps1" />
<include name= "**/*.nuspec" />
<replacefilter token= "@{version}" value= "${version}" />
</replace>
<!-- chocolatey pack -->
2013-08-07 14:34:56 -04:00
<exec executable= "C:\Chocolatey\bin\chocolatey.bat" dir= "${dir.dist}\chocolatey" failonerror= "true" >
2012-11-22 23:27:54 -05:00
<arg line= "pack" />
</exec>
2013-08-07 14:34:56 -04:00
<exec executable= "C:\Chocolatey\bin\chocolatey.bat" dir= "${dir.dist}\chocolatey" failonerror= "true" >
<arg line= "push ${dir.dist}\chocolatey\filebot.${version}.nupkg" />
2012-11-22 23:27:54 -05:00
</exec>
</target>
2012-07-26 03:54:39 -04:00
<target name= "upload-data" depends= "login" >
2012-12-14 10:23:38 -05:00
<scp todir= "${sf.user}:${sf.password}@${deploy.website}" trust= "yes" verbose= "true" sftp= "true" >
<fileset dir= "${dir.website}" >
<include name= "data/.htaccess" />
<include name= "data/*.txt" />
2012-10-11 09:50:37 -04:00
</fileset>
</scp>
2012-10-12 11:45:00 -04:00
</target>
<target name= "upload-data-frs" depends= "login" >
2012-10-25 14:03:59 -04:00
<scp todir= "${sf.user}:${sf.password}@${deploy.data.frs}" trust= "yes" verbose= "true" sftp= "true" >
2012-10-11 09:50:37 -04:00
<fileset dir= "${dir.website}/data" >
2013-08-10 03:56:11 -04:00
<include name= "*.xz" />
2012-10-11 09:50:37 -04:00
<include name= "*.gz" />
2012-07-26 03:54:39 -04:00
</fileset>
</scp>
</target>
<target name= "deploy-test-package" depends= "svn-update, fatjar, login" >
2011-08-10 12:20:57 -04:00
<!-- deploy fatjar -->
2012-07-26 03:54:39 -04:00
<input message= "Mark:" addproperty= "mark" />
2012-10-25 14:03:59 -04:00
<scp file= "${path.fatjar}" remoteTofile= "${sf.user}:${sf.password}@${deploy.release}/HEAD/filebot-${version}-r${svn.revision}-${mark}.jar" trust= "yes" verbose= "true" sftp= "true" />
2013-04-02 11:30:59 -04:00
<scp file= "${path.fatjar}" remoteTofile= "${sf.user}:${sf.password}@${deploy.release}/HEAD/FileBot.jar" trust= "yes" verbose= "true" sftp= "true" />
2011-08-10 12:20:57 -04:00
</target>
2012-07-26 03:54:39 -04:00
<target name= "login" >
<!-- ask for sourceforge password -->
2012-11-22 23:27:54 -05:00
<input message= "Please enter sourceforge username:" addproperty= "sf.user" />
<input message= "Please enter sourceforge password:" addproperty= "sf.password" />
2012-07-26 03:54:39 -04:00
</target>
2008-03-02 12:02:37 -05:00
</project>