1
0
mirror of https://github.com/elisspace/autopsy.git synced 2026-09-06 02:24:30 +00:00
Files
autopsy/build-windows.xml
2012-06-29 17:00:38 -04:00

137 lines
6.6 KiB
XML
Executable File

<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}/DataModel/release/modules/lib/libtsk_jni.dll"/>
<copy file="${env.LIBEWF_HOME}/msvscpp/Release/libewf.dll" tofile="${basedir}/DataModel/release/modules/lib/libewf.dll"/>
<copy file="${env.LIBEWF_HOME}/msvscpp/Release/zlib.dll" tofile="${basedir}/DataModel/release/modules/lib/zlib.dll"/>
</target>
<target name="copyExternalLibsToZip">
<!-- Find CRT version we linked against from libtsk_jni manifest -->
<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>
<!-- 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."/>
<!-- 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 PATH -value APPDIR\gstreamer\bin -install_operation CreateUpdate -behavior Append"/>
</exec>
<exec executable="${aiPath}">
<arg line="/edit ${proj-path} /NewEnvironment -name PATH -value APPDIR\gstreamer\lib\gstreamer-0.10 -install_operation CreateUpdate -behavior Append"/>
</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>