mirror of
https://github.com/mitb-archive/filebot
synced 2025-01-10 21:38:04 -05:00
Make a separate PKG build so we can have APP bundles with and without embedded JRE (i.e. no embedded JRE for brew cask automatic install)
This commit is contained in:
parent
407a4a695d
commit
85fe5e68f5
40
build.xml
40
build.xml
@ -133,16 +133,22 @@
|
|||||||
|
|
||||||
<macrodef name="create-app-bundle" description="Create macOS app bundle folder structure">
|
<macrodef name="create-app-bundle" description="Create macOS app bundle folder structure">
|
||||||
<attribute name="dir" />
|
<attribute name="dir" />
|
||||||
<element name="options" implicit="yes" />
|
<attribute name="deployment" />
|
||||||
|
<attribute name="runtime" />
|
||||||
|
<attribute name="license" />
|
||||||
|
<element name="options" implicit="yes" optional="yes" />
|
||||||
<sequential>
|
<sequential>
|
||||||
<get-macos-jre dest="@{dir}" />
|
<get-macos-jre dest="@{dir}" if:true="@{runtime}" />
|
||||||
<bundleapp jvmrequired="${jvm.version}" minimumsystemversion="${mac.version}" outputdirectory="@{dir}" 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/${package.name}.icns" copyright="${tstamp.year} ${package.company}" applicationcategory="${mac.application.category}" highresolutioncapable="true" supportsautomaticgraphicsswitching="true">
|
<bundleapp jvmrequired="${jvm.version}" minimumsystemversion="${mac.version}" outputdirectory="@{dir}" 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/${package.name}.icns" copyright="${tstamp.year} ${package.company}" applicationcategory="${mac.application.category}" highresolutioncapable="true" supportsautomaticgraphicsswitching="true">
|
||||||
<arch name="x86_64" />
|
<arch name="x86_64" />
|
||||||
<runtime dir="@{dir}/jre-${java.version}.jre/Contents/Home" />
|
<runtime dir="@{dir}/jre-${java.version}.jre/Contents/Home" if:true="@{runtime}" />
|
||||||
|
|
||||||
<classpath dir="${dir.dist}/lib" />
|
<classpath dir="${dir.dist}/lib" />
|
||||||
<librarypath dir="${dir.lib}/native/mac-x86_64" />
|
<librarypath dir="${dir.lib}/native/mac-x86_64" />
|
||||||
|
|
||||||
|
<!-- include command-line tools -->
|
||||||
|
<librarypath dir="@{dir}/bin" />
|
||||||
|
|
||||||
<bundledocument role="viewer" handlerRank="none" contentTypes="public.movie" name="Video file" />
|
<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.audio" name="Audio file" />
|
||||||
<bundledocument role="viewer" handlerRank="none" contentTypes="public.folder" name="Media folder" />
|
<bundledocument role="viewer" handlerRank="none" contentTypes="public.folder" name="Media folder" />
|
||||||
@ -166,6 +172,12 @@
|
|||||||
<option value="-Dapple.laf.useScreenMenuBar=true" />
|
<option value="-Dapple.laf.useScreenMenuBar=true" />
|
||||||
<option value="-Dapple.awt.application.name=${application.name}" />
|
<option value="-Dapple.awt.application.name=${application.name}" />
|
||||||
|
|
||||||
|
<option value="-Dapplication.deployment=@{deployment}" />
|
||||||
|
|
||||||
|
<!-- associate with *.psm files -->
|
||||||
|
<bundledocument extensions="${license.extension}" icon="${dir.installer}/icons/filebot.icns" name="${license.description}" role="viewer" handlerRank="owner" contentTypes="net.filebot.license" if:true="@{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}" if:true="@{license}" />
|
||||||
|
|
||||||
<!-- include custom macro options -->
|
<!-- include custom macro options -->
|
||||||
<options />
|
<options />
|
||||||
</bundleapp>
|
</bundleapp>
|
||||||
@ -516,16 +528,7 @@
|
|||||||
<fileset dir="${dir.installer}/app" includes="*.sh" />
|
<fileset dir="${dir.installer}/app" includes="*.sh" />
|
||||||
</copy-replace>
|
</copy-replace>
|
||||||
|
|
||||||
<create-app-bundle dir="${dir.staging}">
|
<create-app-bundle dir="${dir.staging}" deployment="app" runtime="no" license="yes" />
|
||||||
<option value="-Dapplication.deployment=app" />
|
|
||||||
|
|
||||||
<!-- include command-line tools -->
|
|
||||||
<librarypath dir="${dir.staging}/bin" />
|
|
||||||
|
|
||||||
<!-- associate with *.psm files -->
|
|
||||||
<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}" />
|
|
||||||
</create-app-bundle>
|
|
||||||
|
|
||||||
<tar destfile="${dir.dist}/${release}.app.tar.xz" compression="${tar.compression}" longfile="posix" encoding="utf-8">
|
<tar destfile="${dir.dist}/${release}.app.tar.xz" compression="${tar.compression}" longfile="posix" encoding="utf-8">
|
||||||
<tarfileset dir="${dir.staging}">
|
<tarfileset dir="${dir.staging}">
|
||||||
@ -552,16 +555,7 @@
|
|||||||
<fileset dir="${dir.installer}/pkg" />
|
<fileset dir="${dir.installer}/pkg" />
|
||||||
</copy-replace>
|
</copy-replace>
|
||||||
|
|
||||||
<create-app-bundle dir="${dir.staging}">
|
<create-app-bundle dir="${dir.staging}" deployment="pkg" runtime="yes" license="yes" />
|
||||||
<option value="-Dapplication.deployment=pkg" />
|
|
||||||
|
|
||||||
<!-- include command-line tools -->
|
|
||||||
<librarypath dir="${dir.staging}/bin" />
|
|
||||||
|
|
||||||
<!-- associate with *.psm files -->
|
|
||||||
<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}" />
|
|
||||||
</create-app-bundle>
|
|
||||||
|
|
||||||
<!-- fix permissions -->
|
<!-- fix permissions -->
|
||||||
<chmod perm="+x" verbose="yes">
|
<chmod perm="+x" verbose="yes">
|
||||||
|
Loading…
Reference in New Issue
Block a user