1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 08:18:52 -05:00

Simplify MAS build

This commit is contained in:
Reinhard Pointner 2018-06-15 16:05:42 +07:00
parent cf5275bfdb
commit 84b8c902b1

View File

@ -247,40 +247,20 @@
<target name="appbundle-maspkg" depends="revision"> <target name="appbundle-maspkg" depends="revision">
<property name="path.app" location="${dir.dist}/${application.name}.app" /> <property name="dir.staging" location="${dir.dist}/mas" />
<property name="path.pkg" location="${dir.dist}/${application.name}_${application.version}_r${revision}.pkg" />
<property name="path.app.jre" location="${path.app}/Contents/PlugIns/jre-${jre.version}.jre" /> <property name="path.app" location="${dir.staging}/${application.name}.app" />
<property name="jre.path" location="${dir.cache}/jre-${jre.version}.jre/Contents/Home" /> <property name="path.pkg" location="${dir.staging}/${application.name}_${application.version}_r${revision}.pkg" />
<!-- fetch latest JRE --> <!-- fetch latest JRE -->
<exec executable="get-java.sh" dir="${dir.cache}" failonerror="yes" /> <get-macos-jre dest="${dir.staging}" />
<untar src="${dir.cache}/jre-${jre.version}_osx-x64_bin.tar.gz" dest="${dir.cache}" compression="gzip" />
<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">
<!-- MAS validation does not like certain files included in the JRE -->
<delete verbose="yes" includeEmptyDirs="yes">
<fileset dir="${jre.path}">
<include name="**/bin/**" />
<include name="**/deploy/**" />
<include name="**/nibs/**" />
<include name="**/shortcuts/**" />
<!-- webkit uses deprecate font libraries which is not allowed in the app store -->
<include name="**/libjfxwebkit.dylib" />
</fileset>
</delete>
<!-- MAS validation is a bit buggy and requires even libraries and frameworks to have a unique CFBundleIdentifier Collision -->
<replace file="${jre.path}/../Info.plist" token="com.oracle.java.${jre.version}.jre" value="${application.identifier}.jre" encoding="UTF-8" summary="true" />
<bundleapp jvmrequired="${jvm.version}" minimumsystemversion="${mac.version}" outputdirectory="${dir.dist}" 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">
<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" />
<arch name="x86_64" /> <arch name="x86_64" />
<runtime dir="${jre.path}"> <runtime dir="${dir.staging}/jre-${java.version}.jre/Contents/Home">
<include name="**/*" /> <include name="**/*" />
</runtime> </runtime>
@ -328,8 +308,13 @@
</fileset> </fileset>
</delete> </delete>
<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" />
<!-- fix broken symlink --> <!-- fix broken symlink -->
<copy file="${jre.path}/lib/jli/libjli.dylib" tofile="${path.app.jre}/Contents/MacOS/libjli.dylib" overwrite="yes" verbose="yes" failonerror="yes" /> <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" />
<!-- fix permissions (fpcalc and jspawnhelper be executable and signed with inherit entitlements) --> <!-- fix permissions (fpcalc and jspawnhelper be executable and signed with inherit entitlements) -->
<chmod perm="+x"> <chmod perm="+x">