File: build-windows.xml

package info (click to toggle)
sleuthkit 4.1.3-3~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 36,800 kB
  • sloc: ansic: 147,143; sh: 40,085; cpp: 36,823; java: 6,886; makefile: 1,248; xml: 529; python: 409; perl: 59; sed: 16
file content (82 lines) | stat: -rw-r--r-- 3,611 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?xml version="1.0" encoding="windows-1252"?>
<project name="TSKTestTargets">
	<!-- some dlls come from LIBEWF_HOME -->
	<property environment="env"/>	
	<condition property="ewfFound">
			<isset property="env.LIBEWF_HOME"/>
	</condition>
    <property name="dlls" value="${env.LIBEWF_HOME}/msvscpp/zlib;${env.LIBEWF_HOME}/msvscpp/Release;../../win32/Release"/>

	<target name="test" 
			description="Runs the regression tests."
			depends="compile-test" >
		<fail unless="ewfFound" message="LIBEWF_HOME must be set as an environment variable."/>
		<junit fork="on" haltonfailure="yes" dir=".">
			<sysproperty key="java.library.path" value="${dlls}"/>	
			<sysproperty key="rslt" value="${test-results}"/>
			<sysproperty key="gold" value="${test-standards}"/>
			<sysproperty key="inpt" value="${test-input}"/>
			<classpath refid="libraries" />
			<formatter type="plain" usefile="false" />
			<test name="org.sleuthkit.datamodel.DataModelTestSuite" />
		</junit>
	</target>

	<target name="test-rebuild"
			description="Rebuilds gold standards for tests."
			depends="compile-test" >
		<fail unless="ewfFound" message="LIBEWF_HOME must be set as an environment variable."/>
		<java classname="org.sleuthkit.datamodel.DataModelTestSuite" classpathref="libraries"	fork="true" failonerror="true">
			<sysproperty key="java.library.path" value="${dlls}"/>	
			<sysproperty key="gold" value="${test-standards}"/>
			<sysproperty key="inpt" value="${test-input}"/>
			<sysproperty key="types" value="${test-types}"/>
		</java>
	</target>

	<target name="check-native-build" depends="check-build-32,check-build-64"/>

	<target name="check-build-32" if="win32.exists">
		<uptodate property="native-up-to-date" srcfile="${basedir}/../../win32/Release/libtsk_jni.dll"
		targetfile="${x86}/win/libtsk_jni.dll"/>
	</target>


	<target name="check-build-64" if="win32.exists">
		<uptodate property="native-up-to-date" srcfile="${basedir}/../../win32/x64/Release/libtsk_jni.dll"
		targetfile="${amd64}/win/libtsk_jni.dll"/>
	</target>

	<target name="copyLibs" depends="copyWinLibs" description="Copy native libs to the correct folder">
		<property name="tsk.config" value="Release"/>
		<antcall target="copyWinLibs" />
	</target>
	
	<target name="copyLibsDebug" depends="copyWinLibs" description="Copy native libs to the correct folder">
		<property name="tsk.config" value="Debug"/>
		<antcall target="copyWinLibs" />
	</target>
	
	<target name="copyWinLibs" depends="copyWinLibs64,copyWinLibs32" description="Copy windows dlls to the correct location." />
	
	<target name="checkLibDirs">
		<available property="win64.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" />
	</target>
	
	<target name="copyWinLibs64" depends="checkLibDirs" if="win64.exists">
		<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="${x86_64}/win" overwrite="true"/>
	</target>
	
	<target name="copyWinLibs32" depends="checkLibDirs" if="win32.exists">
		<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="${x86}/win" overwrite="true"/>
		<copy file="${tsk.jni.32}" todir="${i586}/win" overwrite="true"/>	
		<copy file="${tsk.jni.32}" todir="${i686}/win" overwrite="true"/>
	</target>
</project>