forked from sleuthkit/autopsy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-windows.xml
executable file
·142 lines (125 loc) · 6.97 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<project name="AutopsyTSKTargets">
<!-- Need a way to specify TSK Debug versus Release -->
<property name="TSK_BUILD_TYPE">Release</property>
<target name="copyTSKLibsToRelease">
<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."/>
<copy file="${env.TSK_HOME}/win32/${TSK_BUILD_TYPE}/libtsk_jni.dll" tofile="${basedir}/Core/release/modules/lib/libtsk_jni.dll"/>
<copy file="${env.LIBEWF_HOME}/msvscpp/Release/libewf.dll" tofile="${basedir}/Core/release/modules/lib/libewf.dll"/>
<copy file="${env.LIBEWF_HOME}/msvscpp/Release/zlib.dll" tofile="${basedir}/Core/release/modules/lib/zlib.dll"/>
</target>
<target name="copyExternalLibsToZip">
<!-- Find CRT version we linked against from libtsk_jni manifest -->
<!-- disable auto-detection for CRT100
<property name="libtsk.manifest.path">${env.TSK_HOME}/win32/tsk_jni/${TSK_BUILD_TYPE}/libtsk_jni.dll.intermediate.manifest</property>
<loadfile property="libtsk.manifest" srcFile="${libtsk.manifest.path}" />
<propertyregex property="CRT.version"
input="${libtsk.manifest}"
regexp=".*Microsoft\.VC90.*?version\s*?=\s*?'(.*?)'"
select="\1"
casesensitive="false" />
<echo>Found CRT.version linked against: ${CRT.version}</echo>
-->
<property name="CRT.version">10.0.40219.1</property>
<!-- Get C++ Runtime dlls -->
<property environment="env"/>
<condition property="crtDetected">
<isset property="CRT.version"/>
</condition>
<fail unless="crtDetected" message="CRT version not detected, check libtsk_jni manifest."/>
<property name="CRT.path">${thirdparty.dir}/crt/x86-32/${CRT.version}/crt.zip</property>
<available file="${CRT.path}" property="crtFound"/>
<fail unless="crtFound" message="Detected CRT version ${CRT.version} not found in the thirdparty repo in path: ${CRT.path}"/>
<!-- unzip from thirdparty repo to modules/lib in staged dir -->
<unzip src="${CRT.path}" dest="${zip-tmp}/${app.name}/${app.name}/modules/lib"/>
</target>
<target name="autoAIPath" >
<available file="C:\Program Files (x86)\Caphyon\Advanced Installer 9.2\bin\x86\AdvancedInstaller.com"
property="aiPath"
value="C:\Program Files (x86)\Caphyon\Advanced Installer 9.2\bin\x86\AdvancedInstaller.com"/>
</target>
<target name="inputAIPath" unless="aiPath">
<input addProperty="aiPath"
message="Enter the location of AdvancedInstaller.com"/>
</target>
<target name="run-advanced-installer" depends="autoAIPath,inputAIPath">
<fail unless="aiPath" message="Could not locate Advanced Installer."/>
<copy file="${basedir}/installer_${app.name}/installer_${app.name}.aip" tofile="${nbdist.dir}/installer_${app.name}.aip"/>
<property name="inst-path" value="${nbdist.dir}\${app.name}-installer"/>
<property name="proj-path" value="${nbdist.dir}\installer_${app.name}.aip"/>
<echo message="Adding files to installer..."/>
<exec executable="${aiPath}">
<arg line="/edit ${proj-path} /AddFolder APPDIR ${inst-path}\bin"/>
</exec>
<exec executable="${aiPath}">
<arg line="/edit ${proj-path} /AddFolder APPDIR ${inst-path}\etc"/>
</exec>
<exec executable="${aiPath}">
<arg line="/edit ${proj-path} /AddFolder APPDIR ${inst-path}\gstreamer"/>
</exec>
<exec executable="${aiPath}">
<arg line="/edit ${proj-path} /AddFolder APPDIR ${inst-path}\harness"/>
</exec>
<exec executable="${aiPath}">
<arg line="/edit ${proj-path} /AddFolder APPDIR ${inst-path}\java"/>
</exec>
<exec executable="${aiPath}">
<arg line="/edit ${proj-path} /AddFolder APPDIR ${inst-path}\jre6"/>
</exec>
<exec executable="${aiPath}">
<arg line="/edit ${proj-path} /AddFolder APPDIR ${inst-path}\platform"/>
</exec>
<exec executable="${aiPath}">
<arg line="/edit ${proj-path} /AddFolder APPDIR ${inst-path}\${app.name}"/>
</exec>
<exec executable="${aiPath}">
<arg line="/edit ${proj-path} /AddFile APPDIR ${inst-path}\icon.ico"/>
</exec>
<exec executable="${aiPath}">
<arg line="/edit ${proj-path} /AddFile APPDIR ${inst-path}\KNOWN_ISSUES.txt"/>
</exec>
<exec executable="${aiPath}">
<arg line="/edit ${proj-path} /AddFile APPDIR ${inst-path}\LICENSE-2.0.txt"/>
</exec>
<exec executable="${aiPath}">
<arg line="/edit ${proj-path} /AddFile APPDIR ${inst-path}\NEWS.txt"/>
</exec>
<exec executable="${aiPath}">
<arg line="/edit ${proj-path} /AddFile APPDIR ${inst-path}\README.txt"/>
</exec>
<!-- Need to find a way to deal with beta version -->
<!--<echo message="Setting ${app.name} version to ${app.version}..."/>
<exec executable="${aiPath}">
<arg line="/edit ${proj-path} /SetVersion ${app.version}"/>
</exec>-->
<echo message="Adding desktop/menu shortcuts..."/>
<exec executable="${aiPath}">
<arg line="/edit ${proj-path} /NewShortcut -name ${app.title} -dir DesktopFolder -target APPDIR\bin\${app.name}.exe -icon ${inst-path}\icon.ico"/>
</exec>
<exec executable="${aiPath}">
<arg line="/edit ${proj-path} /NewShortcut -name ${app.title} -dir SHORTCUTDIR -target APPDIR\bin\${app.name}.exe -icon ${inst-path}\icon.ico"/>
</exec>
<echo message="Setting environment variables..."/>
<exec executable="${aiPath}">
<arg line="/edit ${proj-path} /NewEnvironment -name GSTREAMER_PATH -value [APPDIR]gstreamer\bin -install_operation CreateUpdate -behavior Append -system_variable"/>
</exec>
<exec executable="${aiPath}">
<arg line="/edit ${proj-path} /NewEnvironment -name GSTREAMER_PATH -value [APPDIR]gstreamer\lib\gstreamer-0.10 -install_operation CreateUpdate -behavior Append -system_variable"/>
</exec>
<exec executable="${aiPath}">
<arg line="/edit ${proj-path} /NewEnvironment -name PATH -value %GSTREAMER_PATH% -install_operation CreateUpdate -behavior Append -system_variable"/>
</exec>
<exec executable="${aiPath}">
<arg line="/build ${proj-path}"/>
</exec>
<delete file="${proj-path}"/>
</target>
<target name="build-installer-windows">
<antcall target="run-advanced-installer" />
<!--<delete dir="${nbdist.dir}/${app.name}-installer"/>-->
<delete dir="${nbdist.dir}/installer_${app.name}-cache"/>
</target>
</project>