use jlink for smaller installer

This commit is contained in:
Greg DiCristofaro 2023-06-29 20:15:46 -04:00
parent 6401104d47
commit 0264fc1f34

View File

@ -27,19 +27,6 @@
<echo message="32-bit JRE not found. No 32-bit installer will be built. Set the JRE_HOME_32 environment variable to generate a 32-bit installer."/> <echo message="32-bit JRE not found. No 32-bit installer will be built. Set the JRE_HOME_32 environment variable to generate a 32-bit installer."/>
</else> </else>
</if> --> </if> -->
<condition property="jre.home.64">
<isset property="env.JRE_HOME_64"/>
</condition>
<if>
<isset property="jre.home.64" />
<then>
<echo message="64-bit JRE found, 64-bit installer will be built."/>
</then>
<else>
<echo message="64-bit JRE not found. No 64-bit installer will be built. Set the JRE_HOME_64 environment variable to generate a 64-bit installer."/>
</else>
</if>
<property name="lib-rel-path" value="${app.name}\modules\lib" /> <property name="lib-rel-path" value="${app.name}\modules\lib" />
<!-- where libs are in build folder; forward slashes because not used directly by advanced installer --> <!-- where libs are in build folder; forward slashes because not used directly by advanced installer -->
@ -100,14 +87,11 @@
<target name="copyJRE" description="Copy a given JRE to the installation folder"> <target name="copyJRE" description="Copy a given JRE to the installation folder">
<var name="new-jre-path" value="${inst-path}\jre"/> <exec executable="jlink" dir="${inst-path}">
<delete failonerror="false" dir="${new-jre-path}"/>
<mkdir dir="${new-jre-path}"/>
<exec executable="jlink" dir="${new-jre-path}">
<arg value="--add-modules"/> <arg value="--add-modules"/>
<arg value="ALL-MODULE-PATH"/> <arg value="ALL-MODULE-PATH"/>
<arg value="--output"/> <arg value="--output"/>
<arg value="autopsy-jre"/> <arg value="jre"/>
<arg value="--no-man-pages"/> <arg value="--no-man-pages"/>
<arg value="--no-header-files"/> <arg value="--no-header-files"/>
<arg value="--compress=2"/> <arg value="--compress=2"/>
@ -144,7 +128,7 @@
<target name="build64" if="jre.home.64" description="Builds the 64 bit installer IF JRE_HOME_64 is set."> <target name="build64" description="Builds the 64 bit installer IF JRE_HOME_64 is set.">
<property environment="env"/> <property environment="env"/>
<var name="aip-path" value="${aip-path-64}"/> <var name="aip-path" value="${aip-path-64}"/>