Skip to content
Snippets Groups Projects
Commit 23d81d20 authored by alexjacks92's avatar alexjacks92
Browse files

Ant target to compile sample program.

parent e909a084
No related branches found
No related tags found
No related merge requests found
...@@ -95,4 +95,8 @@ ...@@ -95,4 +95,8 @@
<!-- depends targets take care of the actual copying since the file differs on OS X and Linux --> <!-- depends targets take care of the actual copying since the file differs on OS X and Linux -->
<!-- This assumes that TSK, libewf, and zlib have been installed on the system and those libraries will be with normal loading approaches --> <!-- This assumes that TSK, libewf, and zlib have been installed on the system and those libraries will be with normal loading approaches -->
</target> </target>
<target name="setupEnvPath" />
</project> </project>
...@@ -36,42 +36,42 @@ ...@@ -36,42 +36,42 @@
<target name="check-native-build" depends="check-build-32,check-build-64"/> <target name="check-native-build" depends="check-build-32,check-build-64"/>
<target name="check-build-32" if="win32.exists"> <target name="check-build-32" if="win32.TskLib.exists">
<uptodate property="native-up-to-date" srcfile="${basedir}/../../win32/Release/libtsk_jni.dll" <uptodate property="native-up-to-date" srcfile="${basedir}/../../win32/Release/libtsk_jni.dll"
targetfile="${x86}/win/libtsk_jni.dll"/> targetfile="${x86}/win/libtsk_jni.dll"/>
</target> </target>
<target name="check-build-64" if="win32.exists"> <target name="check-build-64" if="win32.TskLib.exists">
<uptodate property="native-up-to-date" srcfile="${basedir}/../../win32/x64/Release/libtsk_jni.dll" <uptodate property="native-up-to-date" srcfile="${basedir}/../../win32/x64/Release/libtsk_jni.dll"
targetfile="${amd64}/win/libtsk_jni.dll"/> targetfile="${amd64}/win/libtsk_jni.dll"/>
</target> </target>
<target name="copyLibs" depends="copyWinLibs" description="Copy native libs to the correct folder"> <target name="copyLibs" description="Copy native libs to the correct folder">
<property name="tsk.config" value="Release"/> <property name="tsk.config" value="Release"/>
<antcall target="copyWinLibs" /> <antcall target="copyWinTskLibsToBuild" />
</target> </target>
<target name="copyLibsDebug" depends="copyWinLibs" description="Copy native libs to the correct folder"> <target name="copyLibsDebug" description="Copy native libs to the correct folder">
<property name="tsk.config" value="Debug"/> <property name="tsk.config" value="Debug"/>
<antcall target="copyWinLibs" /> <antcall target="copyWinTskLibsToBuild" />
</target> </target>
<target name="copyWinLibs" depends="copyWinLibs64,copyWinLibs32" description="Copy windows dlls to the correct location." /> <target name="copyWinTskLibsToBuild" depends="copyWinTskLibs64ToBuild,copyWinTskLibs32ToBuild" description="Copy windows dlls to the correct location." />
<target name="checkLibDirs"> <target name="checkTskLibDirs">
<available property="win64.exists" type="file" file="${basedir}/../../win32/x64/${tsk.config}/libtsk_jni.dll" /> <available property="win64.TskLib.exists" type="file" file="${basedir}/../../win32/x64/${tsk.config}/libtsk_jni.dll" />
<available property="win32.exists" type="file" file="${basedir}/../../win32/${tsk.config}/libtsk_jni.dll" /> <available property="win32.TskLib.exists" type="file" file="${basedir}/../../win32/${tsk.config}/libtsk_jni.dll" />
</target> </target>
<target name="copyWinLibs64" depends="checkLibDirs" if="win64.exists"> <target name="copyWinTskLibs64ToBuild" depends="checkTskLibDirs" if="win64.TskLib.exists">
<property name="tsk.jni.64" location="${basedir}/../../win32/x64/${tsk.config}/libtsk_jni.dll" /> <property name="tsk.jni.64" location="${basedir}/../../win32/x64/${tsk.config}/libtsk_jni.dll" />
<copy file="${tsk.jni.64}" todir="${amd64}/win" overwrite="true"/> <copy file="${tsk.jni.64}" todir="${amd64}/win" overwrite="true"/>
<copy file="${tsk.jni.64}" todir="${x86_64}/win" overwrite="true"/> <copy file="${tsk.jni.64}" todir="${x86_64}/win" overwrite="true"/>
</target> </target>
<target name="copyWinLibs32" depends="checkLibDirs" if="win32.exists"> <target name="copyWinTskLibs32ToBuild" depends="checkTskLibDirs" if="win32.TskLib.exists">
<property name="tsk.jni.32" location="${basedir}/../../win32/${tsk.config}/libtsk_jni.dll" /> <property name="tsk.jni.32" location="${basedir}/../../win32/${tsk.config}/libtsk_jni.dll" />
<copy file="${tsk.jni.32}" todir="${i386}/win" overwrite="true"/> <copy file="${tsk.jni.32}" todir="${i386}/win" overwrite="true"/>
...@@ -79,4 +79,10 @@ ...@@ -79,4 +79,10 @@
<copy file="${tsk.jni.32}" todir="${i586}/win" overwrite="true"/> <copy file="${tsk.jni.32}" todir="${i586}/win" overwrite="true"/>
<copy file="${tsk.jni.32}" todir="${i686}/win" overwrite="true"/> <copy file="${tsk.jni.32}" todir="${i686}/win" overwrite="true"/>
</target> </target>
<target name="setupEnvPath">
<!-- Add both of these to env path:
"${basedir}/../../win32/x64/${tsk.config}/libtsk_jni.dll" />
"${basedir}/../../win32/${tsk.config}/libtsk_jni.dll" /> -->
</target>
</project> </project>
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<!-- set global properties for this build --> <!-- set global properties for this build -->
<property name="src" location="src/org/sleuthkit/datamodel"/> <property name="src" location="src/org/sleuthkit/datamodel"/>
<property name="sample" location="src/org/sleuthkit/datamodel/Examples"/>
<property name="build" location="build/"/> <property name="build" location="build/"/>
<property name="dist" location="dist"/> <property name="dist" location="dist"/>
<property name="lib" location="lib"/> <property name="lib" location="lib"/>
...@@ -173,4 +174,18 @@ pattern="lib/[artifact]-[revision](-[classifier]).[ext]" /> ...@@ -173,4 +174,18 @@ pattern="lib/[artifact]-[revision](-[classifier]).[ext]" />
</target> </target>
<!-- NOTE: test and test-rebuild targets are in the OS-specific files --> <!-- NOTE: test and test-rebuild targets are in the OS-specific files -->
<target name="compile-sample" depends="compile"
description="compile the sample" >
<javac debug="on" srcdir="${sample}" destdir="${build}" includeantruntime="false">
<classpath refid="libraries"/>
</javac>
</target>
<target name="run-sample" depends="setupEnvPath"
description="run the sample" >
</target>
</project> </project>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* and open the template in the editor. * and open the template in the editor.
*/ */
package Examples; package org.sleuthkit.datamodel.Examples;
import java.util.List; import java.util.List;
import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.Content;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment