Refactor build
This commit is contained in:
parent
2036e2c4a0
commit
250de6b182
67
build.xml
67
build.xml
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<project name="filebot" default="fatjar" xmlns:ivy="antlib:org.apache.ivy.ant">
|
<project name="filebot" default="fatjar" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:cmp="antlib:org.apache.ant.compress">
|
||||||
<property file="profile.properties" />
|
<property file="profile.properties" />
|
||||||
<property file="source/net/filebot/Settings.properties" />
|
<property file="source/net/filebot/Settings.properties" />
|
||||||
|
|
||||||
|
@ -23,13 +23,22 @@
|
||||||
|
|
||||||
<!-- define output paths -->
|
<!-- define output paths -->
|
||||||
<property name="path.fatjar" location="${dir.dist}/${title}_${version}.jar" />
|
<property name="path.fatjar" location="${dir.dist}/${title}_${version}.jar" />
|
||||||
<property name="path.appbundle.tar" location="${dir.dist}/${title}_${version}-darwin.tar.bz2" />
|
|
||||||
<property name="path.source.zip" location="${dir.dist}/filebot-${version}-src.zip" />
|
|
||||||
|
|
||||||
<property name="basedir.release" location="${basedir}/release" />
|
<property name="basedir.release" location="${basedir}/release" />
|
||||||
<property name="dir.release" location="${basedir.release}/${title}_${version}" />
|
<property name="dir.release" location="${basedir.release}/${title}_${version}" />
|
||||||
<property name="dir.cache" location="${basedir}/cache/${title}_${version}" />
|
<property name="dir.cache" location="${basedir}/cache/${title}_${version}" />
|
||||||
|
|
||||||
|
<!-- ant contribs -->
|
||||||
|
<path id="lib.classpath">
|
||||||
|
<fileset dir="${dir.lib}" includes="**/*.jar" excludes="**/*-jdk14.jar" />
|
||||||
|
</path>
|
||||||
|
|
||||||
|
<taskdef uri="antlib:org.apache.ant.compress" resource="org/apache/ant/compress/antlib.xml" classpathref="lib.classpath" />
|
||||||
|
<taskdef resource="net/filebot/ant/spk/antlib.xml" classpathref="lib.classpath" />
|
||||||
|
<taskdef resource="com/googlecode/ant_deb_task/antlib.xml" classpathref="lib.classpath" />
|
||||||
|
<taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpathref="lib.classpath" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<target name="resolve" description="Retrieve dependencies with Apache Ivy">
|
<target name="resolve" description="Retrieve dependencies with Apache Ivy">
|
||||||
<delete dir="${dir.lib}/ivy" />
|
<delete dir="${dir.lib}/ivy" />
|
||||||
|
@ -100,11 +109,6 @@
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<path id="jars.classpath">
|
|
||||||
<fileset dir="${dir.lib}" includes="**/*.jar" excludes="**/*-jdk14.jar" />
|
|
||||||
</path>
|
|
||||||
|
|
||||||
|
|
||||||
<target name="jar" depends="build">
|
<target name="jar" depends="build">
|
||||||
<!-- create dist dir -->
|
<!-- create dist dir -->
|
||||||
<mkdir dir="${dir.dist}" />
|
<mkdir dir="${dir.dist}" />
|
||||||
|
@ -122,7 +126,7 @@
|
||||||
</jar>
|
</jar>
|
||||||
|
|
||||||
<!-- source as zip -->
|
<!-- source as zip -->
|
||||||
<zip destfile="${path.source.zip}">
|
<zip destfile="${dir.dist}/${title}-${version}-src.zip">
|
||||||
<fileset dir="source" />
|
<fileset dir="source" />
|
||||||
</zip>
|
</zip>
|
||||||
</target>
|
</target>
|
||||||
|
@ -302,8 +306,6 @@
|
||||||
|
|
||||||
|
|
||||||
<target name="appbundle" description="Build Mac application bundle">
|
<target name="appbundle" description="Build Mac application bundle">
|
||||||
<taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpathref="jars.classpath" />
|
|
||||||
|
|
||||||
<bundleapp minimumsystemversion="10.8" jvmrequired="1.8" outputdirectory="${dir.dist}" executablename="purchase.sh" hidedockicon="true" name="${application.name}" displayname="${title} ${version}" version="${revision}" shortversion="${version}" identifier="net.filebot.app" mainclassname="net.filebot.Main" icon="${dir.installer}/appbundle/filebot.icns" copyright="${tstamp.year} Reinhard Pointner" applicationcategory="public.app-category.utilities" highresolutioncapable="true" supportsautomaticgraphicsswitching="true" debug="true">
|
<bundleapp minimumsystemversion="10.8" jvmrequired="1.8" outputdirectory="${dir.dist}" executablename="purchase.sh" hidedockicon="true" name="${application.name}" displayname="${title} ${version}" version="${revision}" shortversion="${version}" identifier="net.filebot.app" mainclassname="net.filebot.Main" icon="${dir.installer}/appbundle/filebot.icns" copyright="${tstamp.year} Reinhard Pointner" applicationcategory="public.app-category.utilities" highresolutioncapable="true" supportsautomaticgraphicsswitching="true" debug="true">
|
||||||
<classpath file="${path.fatjar}" />
|
<classpath file="${path.fatjar}" />
|
||||||
<librarypath dir="${dir.lib}/native/mac-x86_64" />
|
<librarypath dir="${dir.lib}/native/mac-x86_64" />
|
||||||
|
@ -336,13 +338,15 @@
|
||||||
</bundleapp>
|
</bundleapp>
|
||||||
|
|
||||||
<!-- application bundle folder as .tar -->
|
<!-- application bundle folder as .tar -->
|
||||||
<tar destfile="${path.appbundle.tar}" compression="bzip2" longfile="gnu" encoding="utf8">
|
<cmp:xz destfile="${dir.dist}/${title}_${version}-darwin.tar.xz">
|
||||||
<tarfileset dir="${dir.dist}" includes="${application.name}.app/**" excludes="**/MacOS/**" />
|
<cmp:tar format="gnu" encoding="utf-8">
|
||||||
<tarfileset dir="${dir.dist}" includes="${application.name}.app/**/**.dylib" />
|
<cmp:tarfileset dir="${dir.dist}" includes="${application.name}.app/**" excludes="**/MacOS/**" />
|
||||||
|
<cmp:tarfileset dir="${dir.dist}" includes="${application.name}.app/**/**.dylib" />
|
||||||
|
|
||||||
<tarfileset dir="${dir.dist}" includes="${application.name}.app/**/fpcalc" filemode="755" />
|
<cmp:tarfileset dir="${dir.dist}" includes="${application.name}.app/**/fpcalc" filemode="755" />
|
||||||
<tarfileset prefix="${application.name}.app/Contents/MacOS" dir="${dir.installer}/appbundle" includes="*.sh" filemode="755" />
|
<cmp:tarfileset prefix="${application.name}.app/Contents/MacOS" dir="${dir.installer}/appbundle" includes="*.sh" filemode="755" />
|
||||||
</tar>
|
</cmp:tar>
|
||||||
|
</cmp:xz>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
@ -377,9 +381,8 @@
|
||||||
</antcall>
|
</antcall>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="appbundle-maspkg">
|
|
||||||
<taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpathref="jars.classpath" />
|
|
||||||
|
|
||||||
|
<target name="appbundle-maspkg">
|
||||||
<property name="path.app" value="${application.name}.app" />
|
<property name="path.app" value="${application.name}.app" />
|
||||||
<property name="path.pkg" value="${application.executable}_${version}_r${revision}.pkg" />
|
<property name="path.pkg" value="${application.executable}_${version}_r${revision}.pkg" />
|
||||||
|
|
||||||
|
@ -525,7 +528,6 @@
|
||||||
|
|
||||||
|
|
||||||
<target name="deb" description="Build Debian Linux packages">
|
<target name="deb" description="Build Debian Linux packages">
|
||||||
<taskdef name="deb" classname="com.googlecode.ant_deb_task.Deb" classpathref="jars.classpath" />
|
|
||||||
<antcall target="deb-arch">
|
<antcall target="deb-arch">
|
||||||
<param name="arch" value="i686" />
|
<param name="arch" value="i686" />
|
||||||
<!-- arch i686 not allowed by deb specification, must be i386 for 32-bit x86 systems -->
|
<!-- arch i686 not allowed by deb specification, must be i386 for 32-bit x86 systems -->
|
||||||
|
@ -558,8 +560,6 @@
|
||||||
|
|
||||||
|
|
||||||
<target name="ipkg" description="Build embedded Linux packages">
|
<target name="ipkg" description="Build embedded Linux packages">
|
||||||
<taskdef name="deb" classname="com.googlecode.ant_deb_task.Deb" classpathref="jars.classpath" />
|
|
||||||
|
|
||||||
<!-- stage created .deb files in a temporary folder -->
|
<!-- stage created .deb files in a temporary folder -->
|
||||||
<property name="ipkg.staging" location="${dir.dist}/deb-ipkg" />
|
<property name="ipkg.staging" location="${dir.dist}/deb-ipkg" />
|
||||||
<mkdir dir="${ipkg.staging}" />
|
<mkdir dir="${ipkg.staging}" />
|
||||||
|
@ -592,7 +592,7 @@
|
||||||
<property name="lib7z_binding" location="${dir.lib}/native/win32-${arch}/7-Zip-JBinding.dll" />
|
<property name="lib7z_binding" location="${dir.lib}/native/win32-${arch}/7-Zip-JBinding.dll" />
|
||||||
<property name="libgcc_path" location="${dir.lib}/native/win32-${arch}/${libgcc_name}" />
|
<property name="libgcc_path" location="${dir.lib}/native/win32-${arch}/${libgcc_name}" />
|
||||||
<property name="fpcalc_path" location="${dir.lib}/native/win32-${arch}/fpcalc.exe" />
|
<property name="fpcalc_path" location="${dir.lib}/native/win32-${arch}/fpcalc.exe" />
|
||||||
<property name="installer" location="${dir.dist}/FileBot_${version}_${arch}.msi" />
|
<property name="installer" location="${dir.dist}/${title}_${version}_${arch}.msi" />
|
||||||
|
|
||||||
<exec executable="candle.exe" dir="${dir.installer}/msi" failonerror="true">
|
<exec executable="candle.exe" dir="${dir.installer}/msi" failonerror="true">
|
||||||
<arg line="filebot-wix.xml -out ${dir.dist}/msi.wixobj -darch=${arch} -dreleaseversion=${version} -dfatjar=${path.fatjar} -djnidispatch=${jnidispatch} -dmediainfo=${mediainfo} -dlib7z_binding=${lib7z_binding} -dlibgcc_name=${libgcc_name} -dlibgcc_path=${libgcc_path} -dfpcalc_path=${fpcalc_path}" />
|
<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}" />
|
||||||
|
@ -613,16 +613,16 @@
|
||||||
<fileset dir="${dir.installer}/portable" includes="*.exe, *.ini, *.cmd, *.sh" />
|
<fileset dir="${dir.installer}/portable" includes="*.exe, *.ini, *.cmd, *.sh" />
|
||||||
</copy>
|
</copy>
|
||||||
|
|
||||||
<tar destfile="${dir.dist}/FileBot_${version}-portable.tar.bz2" compression="bzip2" longfile="gnu" encoding="utf8">
|
<cmp:xz destfile="${dir.dist}/${title}_${version}-portable.tar.xz">
|
||||||
<zipfileset dir="${dir.dist}/portable" includes="*.jar, *.exe, *.ini, *.cmd" />
|
<cmp:tar format="gnu" encoding="utf-8">
|
||||||
<zipfileset dir="${dir.dist}/portable" includes="*.sh" filemode="755" />
|
<cmp:tarfileset dir="${dir.dist}/portable" includes="*.jar, *.exe, *.ini, *.cmd" />
|
||||||
</tar>
|
<cmp:tarfileset dir="${dir.dist}/portable" includes="*.sh" filemode="755" />
|
||||||
|
</cmp:tar>
|
||||||
|
</cmp:xz>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<target name="spk" description="Build Synology NAS package">
|
<target name="spk" description="Build Synology NAS package">
|
||||||
<taskdef name="spk" classname="net.filebot.ant.spk.PackageTask" classpathref="jars.classpath" />
|
|
||||||
|
|
||||||
<spk destdir="${dir.dist}" name="filebot" version="${version}" arch="noarch">
|
<spk destdir="${dir.dist}" name="filebot" version="${version}" arch="noarch">
|
||||||
<info name="displayname" value="FileBot" />
|
<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="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." />
|
||||||
|
@ -702,10 +702,10 @@
|
||||||
<copy todir="${dir.release}" preservelastmodified="yes" verbose="yes">
|
<copy todir="${dir.release}" preservelastmodified="yes" verbose="yes">
|
||||||
<path path="${path.fatjar}" />
|
<path path="${path.fatjar}" />
|
||||||
<fileset dir="${dir.dist}">
|
<fileset dir="${dir.dist}">
|
||||||
<include name="*.tar.bz2" />
|
<include name="*.tar.xz" />
|
||||||
|
<include name="*.msi" />
|
||||||
<include name="*.deb" />
|
<include name="*.deb" />
|
||||||
<include name="*.ipk" />
|
<include name="*.ipk" />
|
||||||
<include name="*.msi" />
|
|
||||||
<include name="*.spk" />
|
<include name="*.spk" />
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
|
@ -783,7 +783,6 @@
|
||||||
|
|
||||||
|
|
||||||
<target name="deploy-synology" description="Update Synology Package Source">
|
<target name="deploy-synology" description="Update Synology Package Source">
|
||||||
<taskdef name="package-source" classname="net.filebot.ant.spk.RepositoryTask" classpathref="jars.classpath" />
|
|
||||||
<mkdir dir="${dir.dist}/website/syno" />
|
<mkdir dir="${dir.dist}/website/syno" />
|
||||||
|
|
||||||
<!-- merge all filebot related packages into a single package source file -->
|
<!-- merge all filebot related packages into a single package source file -->
|
||||||
|
@ -810,8 +809,8 @@
|
||||||
|
|
||||||
<target name="deploy-chocolatey" description="Update Chocolatey Package Source">
|
<target name="deploy-chocolatey" description="Update Chocolatey Package Source">
|
||||||
<!-- prepare sha1 checksums -->
|
<!-- prepare sha1 checksums -->
|
||||||
<checksum property="x86.msi.sha256" file="${dir.release}/FileBot_${version}_x86.msi" algorithm="SHA-256" />
|
<checksum property="x86.msi.sha256" file="${dir.release}/${title}_${version}_x86.msi" algorithm="SHA-256" />
|
||||||
<checksum property="x64.msi.sha256" file="${dir.release}/FileBot_${version}_x64.msi" algorithm="SHA-256" />
|
<checksum property="x64.msi.sha256" file="${dir.release}/${title}_${version}_x64.msi" algorithm="SHA-256" />
|
||||||
|
|
||||||
<!-- replace variables for new release -->
|
<!-- replace variables for new release -->
|
||||||
<copy todir="${dir.dist}/chocolatey" overwrite="yes" encoding="UTF-8" verbose="true">
|
<copy todir="${dir.dist}/chocolatey" overwrite="yes" encoding="UTF-8" verbose="true">
|
||||||
|
|
1
ivy.xml
1
ivy.xml
|
@ -36,6 +36,7 @@
|
||||||
|
|
||||||
<!-- FileBot Ant Build -->
|
<!-- FileBot Ant Build -->
|
||||||
<dependency org="org.apache.ant" name="ant-junit" rev="1.9.+" />
|
<dependency org="org.apache.ant" name="ant-junit" rev="1.9.+" />
|
||||||
|
<dependency org="org.apache.commons" name="commons-compress" rev="1.+" />
|
||||||
<dependency org="org.bouncycastle" name="bcprov-jdk15on" rev="1.+" />
|
<dependency org="org.bouncycastle" name="bcprov-jdk15on" rev="1.+" />
|
||||||
<dependency org="org.bouncycastle" name="bcpg-jdk15on" rev="1.+" />
|
<dependency org="org.bouncycastle" name="bcpg-jdk15on" rev="1.+" />
|
||||||
<dependency org="org.apache.httpcomponents" name="httpcore" rev="4.+" />
|
<dependency org="org.apache.httpcomponents" name="httpcore" rev="4.+" />
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue