forked from sleuthkit/autopsy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-windows.xml
90 lines (75 loc) · 3.88 KB
/
build-windows.xml
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
83
84
85
86
87
88
89
90
<project name="AutopsyTSKTargets">
<!-- Directory paths -->
<property name="amd64" location="${basedir}/Core/release/modules/lib/amd64" />
<property name="x86" location="${basedir}/Core/release/modules/lib/x86" />
<property name="x86_64" location="${basedir}/Core/release/modules/lib/x86_64" />
<property name="i386" location="${basedir}/Core/release/modules/lib/i386" />
<property name="i586" location="${basedir}/Core/release/modules/lib/i586" />
<property name="i686" location="${basedir}/Core/release/modules/lib/i686"/>
<property name="crt" location="${basedir}/thirdparty/crt" />
<import file="build-windows-installer.xml" />
<target name="makeBaseLibDirs" description="Set up folder hierarchy under release/modules/lib">
<mkdir dir="${amd64}"/>
<mkdir dir="${x86_64}"/>
<mkdir dir="${x86}"/>
<mkdir dir="${i386}"/>
<mkdir dir="${i586}"/>
<mkdir dir="${i686}"/>
</target>
<target name="checkTskLibDirs">
<property environment="env"/>
<condition property="ewfFound">
<isset property="env.LIBEWF_HOME"/>
</condition>
<fail unless="ewfFound" message="LIBEWF_HOME must be set as an environment variable."/>
<property name="win64.TskLib.path" value="${env.TSK_HOME}/win32/x64/Release_PostgreSQL"/>
<property name="win32.TskLib.path" value="${env.TSK_HOME}/win32/Release_PostgreSQL" />
<property name="win64.TskLib.postgres_path" value="${env.TSK_HOME}/win32/x64/Release_PostgreSQL"/>
<property name="win32.TskLib.postgres_path" value="${env.TSK_HOME}/win32/Release_PostgreSQL"/>
<available property="win64.TskLib.exists" type="dir" file="${win64.TskLib.path}" />
<available property="win32.TskLib.exists" type="dir" file="${win32.TskLib.path}" />
<available property="win64.TskLib_postgres.exists" type="dir" file="{win64.TskLib.postgres_path}" />
<available property="win32.TskLib_postgres.exists" type="dir" file="{win32.TskLib.postgres_path}" />
</target>
<!-- The following copy the libtsk_jni dependencies to the Autopsy
folder structure. libtsk_jni is inside of the JAR file and contains
libtsk and the JNI code. -->
<!-- copy 64-bit dlls into the installer folder -->
<target name="copyWinTskLibs64ToBaseDir" if="win64.TskLib.exists">
<fileset dir="${win64.TskLib.path}" id="win64dlls">
<include name="*.dll" />
<exclude name="libtsk_jni.dll"/>
</fileset>
<copy todir="${amd64}" overwrite="true">
<fileset refid="win64dlls" />
</copy>
<copy todir="${x86_64}" overwrite="true">
<fileset refid="win64dlls" />
</copy>
</target>
<!-- copy 32-bit dlls into the installer folder -->
<target name="copyWinTskLibs32ToBaseDir" if="win32.TskLib.exists">
<fileset dir="${win32.TskLib.path}" id="win32dlls">
<include name="*.dll" />
<exclude name="libtsk_jni.dll"/>
</fileset>
<copy todir="${i386}" overwrite="true">
<fileset refid="win32dlls" />
</copy>
<copy todir="${x86}" overwrite="true">
<fileset refid="win32dlls" />
</copy>
<copy todir="${i586}" overwrite="true">
<fileset refid="win32dlls" />
</copy>
<copy todir="${i686}" overwrite="true">
<fileset refid="win32dlls" />
</copy>
</target>
<!-- This gets called from the main build.xml -->
<target name="copyLibsToBaseDir" depends="checkTskLibDirs" description="Copy windows dlls to the correct location." >
<antcall target="makeBaseLibDirs" inheritRefs="true" />
<antcall target="copyWinTskLibs32ToBaseDir" inheritRefs="true" />
<antcall target="copyWinTskLibs64ToBaseDir" inheritRefs="true" />
</target>
</project>