mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-23 00:08:51 -05:00
Experiment with PKG package scripts
This commit is contained in:
parent
c7dcbd075e
commit
5ad30fbead
27
build.xml
27
build.xml
@ -377,7 +377,6 @@
|
|||||||
<!-- fetch latest JRE -->
|
<!-- fetch latest JRE -->
|
||||||
<get-macos-jre dest="${dir.staging}" />
|
<get-macos-jre dest="${dir.staging}" />
|
||||||
|
|
||||||
|
|
||||||
<bundleapp jvmrequired="${jvm.version}" minimumsystemversion="${mac.version}" outputdirectory="${dir.staging}" executablename="filebot.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">
|
<bundleapp jvmrequired="${jvm.version}" minimumsystemversion="${mac.version}" outputdirectory="${dir.staging}" executablename="filebot.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">
|
||||||
<arch name="x86_64" />
|
<arch name="x86_64" />
|
||||||
<runtime dir="${dir.staging}/jre-${java.version}.jre/Contents/Home">
|
<runtime dir="${dir.staging}/jre-${java.version}.jre/Contents/Home">
|
||||||
@ -436,6 +435,15 @@
|
|||||||
<option value="--add-opens=java.desktop/java.awt=ALL-UNNAMED" />
|
<option value="--add-opens=java.desktop/java.awt=ALL-UNNAMED" />
|
||||||
</bundleapp>
|
</bundleapp>
|
||||||
|
|
||||||
|
<!-- fix permissions -->
|
||||||
|
<chmod perm="+x" verbose="yes">
|
||||||
|
<fileset dir="${dir.staging}" filemode="755">
|
||||||
|
<include name="*.app/**/MacOS/filebot.*" />
|
||||||
|
<include name="*.app/**/MacOS/fpcalc" />
|
||||||
|
<include name="*.app/**/lib/jspawnhelper" />
|
||||||
|
<include name="*.app/**/bin/*" />
|
||||||
|
</fileset>
|
||||||
|
</chmod>
|
||||||
|
|
||||||
<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}">
|
||||||
@ -454,6 +462,23 @@
|
|||||||
</tar>
|
</tar>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<exec executable="pkgbuild" dir="${dir.staging}" failonerror="yes">
|
||||||
|
<arg line="@{package.name}.pkg --component ${application.name}.app --scripts installer/pkg/scripts" />
|
||||||
|
</exec>
|
||||||
|
<exec executable="productbuild" dir="${dir.staging}" failonerror="yes">
|
||||||
|
<arg line="--distribution dist/distribution.xml --package-path . ${dir.dist}/${release}.pkg" />
|
||||||
|
</exec>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<target name="snap" depends="revision">
|
<target name="snap" depends="revision">
|
||||||
<property name="dir.staging" location="${dir.dist}/snap" />
|
<property name="dir.staging" location="${dir.dist}/snap" />
|
||||||
<property name="dir.root" location="${dir.staging}/root" />
|
<property name="dir.root" location="${dir.staging}/root" />
|
||||||
|
26
installer/pkg/distribution.xml
Normal file
26
installer/pkg/distribution.xml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<installer-gui-script minSpecVersion="2">
|
||||||
|
<pkg-ref id="@{package.identifier}">
|
||||||
|
<bundle-version>
|
||||||
|
<bundle CFBundleShortVersionString="@{application.version}" CFBundleVersion="@{revision}" id="@{package.identifier}" path="@{application.name}.app" />
|
||||||
|
</bundle-version>
|
||||||
|
</pkg-ref>
|
||||||
|
<product id="@{package.identifier}" version="@{application.version}" />
|
||||||
|
<title>@{application.name}</title>
|
||||||
|
<options customize="never" require-scripts="false" hostArchitectures="x86_64" />
|
||||||
|
<volume-check>
|
||||||
|
<allowed-os-versions>
|
||||||
|
<os-version min="@{mac.version}" />
|
||||||
|
</allowed-os-versions>
|
||||||
|
</volume-check>
|
||||||
|
<choices-outline>
|
||||||
|
<line choice="default">
|
||||||
|
<line choice="@{package.identifier}" />
|
||||||
|
</line>
|
||||||
|
</choices-outline>
|
||||||
|
<choice id="default" title="@{application.name}" versStr="@{application.version}" />
|
||||||
|
<choice id="@{package.identifier}" title="@{application.name}" visible="false" customLocation="/Applications">
|
||||||
|
<pkg-ref id="@{package.identifier}" />
|
||||||
|
</choice>
|
||||||
|
<pkg-ref id="@{package.identifier}" version="@{application.version}" onConclusion="none">@{package.name}.pkg</pkg-ref>
|
||||||
|
</installer-gui-script>
|
Loading…
Reference in New Issue
Block a user