autopsy-flatpak/build.xml

111 lines
5.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
<!-- for some information on what you could do (e.g. targets to override). -->
<!-- If you delete this file and reopen the project it will be recreated. -->
<project name="Autopsy3" basedir=".">
<description>Builds the module suite Autopsy3.</description>
<import file="nbproject/build-impl.xml"/>
<condition property="os.family" value="unix">
<os family="unix"/>
</condition>
<condition property="os.family" value="windows">
<os family="windows"/>
</condition>
<import file="build-${os.family}.xml"/>
<!-- This seems really bad to be hard coded, but I couldn't find a better solution -->
<path id="jni-path">
<pathelement location="./build/cluster/modules/org-sleuthkit-datamodel.jar"/>
<path refid="cluster.path.id" />
</path>
<!-- Verify that the TSK_HOME env variable is set -->
<target name="findTSK">
<property environment="env"/>
<condition property="tskFound">
<isset property="env.TSK_HOME"/>
</condition>
<fail unless="tskFound" message="TSK_HOME must be set as an environment variable."/>
<echo> TSK_HOME: ${env.TSK_HOME}</echo>
</target>
<target name="getExternals" depends="findTSK,copyTSKLibs">
<property environment="env"/>
<copy file="${env.TSK_HOME}/bindings/java/dist/Tsk_DataModel.jar" tofile="${basedir}/DataModel/release/modules/ext/Tsk_DataModel.jar"/>
<copy file="${env.TSK_HOME}/bindings/java/lib/sqlite-jdbc-3.7.2.jar" tofile="${basedir}/DataModel/release/modules/ext/sqlite-jdbc-3.7.2.jar"/>
<!--<copy file="${env.TSK_HOME}/bindings/java/lib/sqlite-jdbc-3.6.20-javadoc.jar" tofile="${basedir}/DataModel/release/modules/ext/sqlite-jdbc-3.6.20-javadoc.jar"/>
<copy file="${env.TSK_HOME}/bindings/java/lib/sqlite-jdbc-3.6.20-sources.jar" tofile="${basedir}/DataModel/release/modules/ext/sqlite-jdbc-3.6.20-sources.jar"/> -->
</target>
<!-- This target will create a custom ZIP file for us. It first uses the general
ZIP target and then opens it up and adds in any files that we want. This is where we customize the
version number. -->
<target name="build-zip" depends="suite.build-zip">
<property name="nbdist.dir" value="dist"/>
<property name="release.dir" value="${nbdist.dir}/${app.name}"/>
<!-- step (2) unzip the result -->
<property name="zip-tmp" value="${nbdist.dir}/tmp"/>
<delete dir="${zip-tmp}"/>
<mkdir dir="${zip-tmp}"/>
<unzip src="${nbdist.dir}/${app.name}.zip" dest="${zip-tmp}"/>
<!-- step (3) do your copying stuff here, check the ant doc for copy, move, etc file -->
<copy file="${basedir}/README.txt" tofile="${zip-tmp}/${app.name}/README.txt"/>
<copy file="${basedir}/LICENSE-2.0.txt" tofile="${zip-tmp}/${app.name}/LICENSE-2.0.txt"/>
<copy file="${basedir}/NEWS.txt" tofile="${zip-tmp}/${app.name}/NEWS.txt"/>
<antcall target="copyExternalLibs"></antcall>
<!-- step (4) zip again, but with the version numbers in the dir -->
<zip destfile="${nbdist.dir}/${app.name}-${app.version}.zip">
<zipfileset dir="${zip-tmp}/${app.name}" prefix="${app.name}-${app.version}"/>
</zip>
<delete dir="${zip-tmp}"/>
<delete file="${nbdist.dir}/${app.name}.zip"/>
<echo message=" "/>
<echo message="cleaning and finalizing release" />
<delete dir="${release.dir}"/>
</target>
<target name="-init" depends="-taskdefs,-convert-old-project,getExternals">
<convertclusterpath from="${cluster.path.evaluated}" to="cluster.path.final" id="cluster.path.id"/>
<property file="nbproject/private/private.properties"/>
<property file="nbproject/project.properties"/>
<sortsuitemodules unsortedmodules="${modules}" sortedmodulesproperty="modules.sorted"/>
<property name="cluster" location="build/cluster"/>
<echo level="verbose">Suite in ${basedir} with clusters ${cluster.path.final}, build cluster ${cluster}, and sorted modules ${modules.sorted}</echo>
<!-- synchronize with SuiteProject -->
<property name="disabled.modules" value=""/>
<property name="enabled.clusters" value=""/>
<property name="disabled.clusters" value=""/>
<property name="app.version" value="0.1"/>
<property name="branding.dir" location="branding"/>
<property name="dist.dir" location="dist"/>
<!-- MOVE THE .DLL FILES TO THE NETBEANS DIRECTORY -->
<condition property="run.branding"> <!-- #84689 -->
<and>
<available file="${branding.dir}" type="dir"/>
<isset property="branding.token"/>
</and>
</condition>
</target>
<target name="jni" depends="build,findTSK">
<javah verbose="yes" outputFile="${env.TSK_HOME}/bindings/java/tsk_jni/tsk_jni/dataModel_SleuthkitJNI.h">
<class name="org.sleuthkit.datamodel.SleuthkitJNI" />
<classpath refid="jni-path"/>
</javah>
</target>
<target name="javadoc" depends="-init,-hide-excluded-modules">
<subant target="javadoc" buildpath="${modules.sorted}" inheritrefs="false" inheritall="false" />
</target>
</project>