Updated build process to build from intermediate step, reduce 32/64-bit paths, and let AI make the GUID for jre8

This commit is contained in:
Brian Carrier 2014-05-15 16:02:27 -04:00
parent de8d2925eb
commit 4a6ef1492c
4 changed files with 160 additions and 167 deletions

View File

@ -22,8 +22,9 @@
<!-- 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="copyExternalLibsToZip"> <target name="copyLibsToZip" />
</target>
<target name="copyLibsToBaseDir" />
<target name="build-installer-unix"> <target name="build-installer-unix">
<echo>Unix installer creation not supported at this time</echo> <echo>Unix installer creation not supported at this time</echo>

View File

@ -1,8 +1,5 @@
<project name="AutopsyTSKTargets"> <project name="AutopsyTSKTargets">
<!-- Need a way to specify TSK Debug versus Release -->
<property name="TSK_BUILD_TYPE">Release</property>
<!-- Directory paths --> <!-- Directory paths -->
<property name="amd64" location="${basedir}/Core/release/modules/lib/amd64" /> <property name="amd64" location="${basedir}/Core/release/modules/lib/amd64" />
<property name="x86" location="${basedir}/Core/release/modules/lib/x86" /> <property name="x86" location="${basedir}/Core/release/modules/lib/x86" />
@ -12,10 +9,8 @@
<property name="i686" location="${basedir}/Core/release/modules/lib/i686"/> <property name="i686" location="${basedir}/Core/release/modules/lib/i686"/>
<property name="crt" location="${basedir}/thirdparty/crt" /> <property name="crt" location="${basedir}/thirdparty/crt" />
<!-- NATIVE LIB TARGETS -->
<target name="copyLibs" depends="copyWinLibs64,copyWinLibs32" description="Copy windows dlls to the correct location." /> <target name="makeBaseLibDirs" description="Set up folder hierarchy under release/modules/lib">
<target name="init-lib-path" description="Set up folder hierarchy under release/modules/lib">
<mkdir dir="${amd64}"/> <mkdir dir="${amd64}"/>
<mkdir dir="${x86_64}"/> <mkdir dir="${x86_64}"/>
<mkdir dir="${x86}"/> <mkdir dir="${x86}"/>
@ -24,23 +19,22 @@
<mkdir dir="${i686}"/> <mkdir dir="${i686}"/>
</target> </target>
<target name="checkLibDirs" depends="init-lib-path"> <target name="checkTskLibDirs">
<property environment="env"/> <property environment="env"/>
<condition property="ewfFound"> <condition property="ewfFound">
<isset property="env.LIBEWF_HOME"/> <isset property="env.LIBEWF_HOME"/>
</condition> </condition>
<fail unless="ewfFound" message="LIBEWF_HOME must be set as an environment variable."/> <fail unless="ewfFound" message="LIBEWF_HOME must be set as an environment variable."/>
<property name="win64.lib.path" value="${env.TSK_HOME}/win32/x64/Release"/> <property name="win64.TskLib.path" value="${env.TSK_HOME}/win32/x64/Release"/>
<property name="win32.lib.path" value="${env.TSK_HOME}/win32/Release" /> <property name="win32.TskLib.path" value="${env.TSK_HOME}/win32/Release" />
<available property="win64.exists" type="dir" file="${win64.lib.path}" /> <available property="win64.TskLib.exists" type="dir" file="${win64.TskLib.path}" />
<available property="win32.exists" type="dir" file="${win32.lib.path}" /> <available property="win32.TskLib.exists" type="dir" file="${win32.TskLib.path}" />
</target> </target>
<target name="copyWinLibs64" depends="checkLibDirs" if="win64.exists"> <!-- copy 64-bit dlls into the installer folder -->
<property name="win64dir" location="${win64.lib.path}" /> <target name="copyWinTskLibs64ToBaseDir" if="win64.TskLib.exists">
<fileset dir="${win64.TskLib.path}" id="win64dlls">
<fileset dir="${win64dir}" id="win64dlls">
<include name="libewf.dll" /> <include name="libewf.dll" />
<include name="zlib.dll"/> <include name="zlib.dll"/>
</fileset> </fileset>
@ -55,9 +49,9 @@
</target> </target>
<target name="copyWinLibs32" depends="checkLibDirs" if="win32.exists"> <!-- copy 32-bit dlls into the installer folder -->
<property name="win32dir" location="${win32.lib.path}" /> <target name="copyWinTskLibs32ToBaseDir" if="win32.TskLib.exists">
<fileset dir="${win32dir}" id="win32dlls"> <fileset dir="${win32.TskLib.path}" id="win32dlls">
<include name="zlib.dll" /> <include name="zlib.dll" />
<include name="libewf.dll"/> <include name="libewf.dll"/>
</fileset> </fileset>
@ -79,10 +73,18 @@
</copy> </copy>
</target> </target>
<!-- CRT LIBS TO ZIP --> <!-- This gets called from the main build.xml -->
<target name="copyExternalLibsToZip" depends="copyCRT32,copyCRT64"/> <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>
<target name="copyCRT32"> <!-- CRT LIBS TO ZIP - gets called from build.xml -->
<target name="copyLibsToZip" depends="copyCRT32ToZIP,copyCRT64ToZIP"/>
<target name="copyCRT32ToZIP">
<!-- verify we have the 32-bit dlls --> <!-- verify we have the 32-bit dlls -->
<property name="CRT32.path" value="${thirdparty.dir}/crt/win32"/> <property name="CRT32.path" value="${thirdparty.dir}/crt/win32"/>
@ -112,7 +114,7 @@
</copy> </copy>
</target> </target>
<target name="copyCRT64"> <target name="copyCRT64ToZIP">
<!-- Verify we have the 64-bit --> <!-- Verify we have the 64-bit -->
<property name="CRT64.path" value="${thirdparty.dir}/crt/win64"/> <property name="CRT64.path" value="${thirdparty.dir}/crt/win64"/>
<available file="${CRT64.path}" property="crtFound"/> <available file="${CRT64.path}" property="crtFound"/>
@ -134,40 +136,44 @@
</target> </target>
<!-- ADVANCED INSTALLER TARGETS --> <!-- ADVANCED INSTALLER TARGETS -->
<target name="build-installer-windows" depends="init-advanced-installer" <target name="build-installer-windows" depends="getProps,init-advanced-installer"
description="Makes an installer from the opened ZIP file"> description="Makes an installer from the opened ZIP file">
<antcall target="run-advanced-installer" /> <antcall target="run-advanced-installer" inheritAll="true" />
<!--<delete dir="${nbdist.dir}/${app.name}-installer"/>-->
</target> </target>
<target name="init-advanced-installer" depends="autoAIPath,inputAIPath" <target name="init-advanced-installer" depends="autoAIPath,inputAIPath"
description="Find AdvancedInstaller executable."> description="Find AdvancedInstaller executable.">
<fail unless="ai-exe-path" message="Could not locate Advanced Installer."/> <fail unless="ai-exe-path" message="Could not locate Advanced Installer."/>
<property environment="env"/> <property environment="env"/>
<!-- Copy the template file to add details to -->
<copy file="${basedir}/installer_${app.name}/installer_${app.name}.aip" tofile="${nbdist.dir}/installer_${app.name}_32.aip" overwrite="true"/>
<copy file="${basedir}/installer_${app.name}/installer_${app.name}.aip" tofile="${nbdist.dir}/installer_${app.name}_64.aip" overwrite="true"/>
<property name="inst-path" value="${nbdist.dir}\${app.name}-installer"/> <property name="inst-path" value="${nbdist.dir}\${app.name}-installer"/>
<property name="aip-path-32" value="${nbdist.dir}\installer_${app.name}_32.aip"/>
<property name="aip-path-64" value="${nbdist.dir}\installer_${app.name}_64.aip"/> <!-- see what JREs they have installed -->
<echo message="${ai-exe-path}" />
<condition property="jre.home.32"> <condition property="jre.home.32">
<isset property="env.JRE_HOME_32"/> <isset property="env.JRE_HOME_32"/>
</condition> </condition>
<if>
<isset property="jre.home.32" />
<then>
<echo message="32-bit JRE found, 32 bit installer will be built."/>
</then>
<else>
<echo message="32-bit JRE not found. No 32 bit installer will be build. Set the JRE_HOME_32 environment variable to generate a 32-bit installer."/>
</else>
</if>
<condition property="jre.home.64"> <condition property="jre.home.64">
<isset property="env.JRE_HOME_64"/> <isset property="env.JRE_HOME_64"/>
</condition> </condition>
<if>
<!-- Update configuration file to include jre --> <isset property="jre.home.64" />
<property name="inst.property.file" value="${inst-path}/etc/${app.name}.conf" /> <then>
<property name="jvm.options" value="&quot;--branding ${app.name} -J-Xms24m -J-Xmx512m -J-XX:MaxPermSize=128M -J-Xverify:none &quot;" /> <echo message="64-bit JRE found, 64 bit installer will be built."/>
<propertyfile file="${inst.property.file}"> </then>
<!-- Note: can be higher on 64 bit systems, should be in sync with project.properties --> <else>
<entry key="default_options" value="@JVM_OPTIONS" /> <echo message="64-bit JRE not found. No 64 bit installer will be build. Set the JRE_HOME_64 environment variable to generate a 64-bit installer."/>
<entry key="jdkhome" value="&quot;jre7&quot;" /> </else>
</propertyfile> </if>
<!-- workaround for ant escaping : and = when setting properties -->
<replace file="${inst.property.file}" token="@JVM_OPTIONS" value="${jvm.options}" />
</target> </target>
<target name="autoAIPath" description="Attempt to find the AI path based on standard installation location"> <target name="autoAIPath" description="Attempt to find the AI path based on standard installation location">
@ -183,37 +189,40 @@
message="Enter the location of AdvancedInstaller.com"/> message="Enter the location of AdvancedInstaller.com"/>
</target> </target>
<target name="run-advanced-installer" depends="ai-diog-msg,check-ai-32,check-ai-64" /> <target name="run-advanced-installer" depends="setup-aip-files">
<antcall target="build32" inheritAll="true" />
<antcall target="build64" inheritAll="true" />
</target>
<target name="ai-diog-msg" description="Print information about installers to be built.">
<if> <target name="setup-aip-files" description="Configure the base AIP file and then make 32- and 64-bit versions.">
<isset property="jre.home.32" /> <!-- Copy the template file to add details to -->
<then> <property name="aip-path-base" value="${nbdist.dir}\installer_${app.name}_base.aip"/>
<echo message="32-bit JRE found, 32 bit installer will be built."/> <copy file="${basedir}/installer_${app.name}/installer_${app.name}.aip" tofile="${aip-path-base}" overwrite="true"/>
</then>
<else> <echo message="${ai-exe-path}" />
<echo message="32-bit JRE not found. No 32 bit installer will be build. Set the JRE_HOME_32 environment variable to generate a 32-bit installer."/> <echo>Product Version: ${app.version}</echo>
</else>
</if> <!-- generate new product code -->
<if> <exec executable="${ai-exe-path}">
<isset property="jre.home.64" /> <arg line="/edit ${aip-path-base} /SetProductCode -langid 1033"/>
<then> </exec>
<echo message="64-bit JRE found, 64 bit installer will be built."/>
</then> <!-- Edit the API file to update versions: manual approach allows us to use non-X.Y.Z versions -->
<else>
<echo message="64-bit JRE not found. No 64 bit installer will be build. Set the JRE_HOME_64 environment variable to generate a 64-bit installer."/> <replaceregexp file="${aip-path-base}"
</else> match="ProductVersion&quot; Value=&quot;\d+\.{1}\d+\.{1}\d+"
</if> replace="ProductVersion&quot; Value=&quot;${app.version}" />
<property name="aip-path-32" value="${nbdist.dir}\installer_${app.name}_32.aip"/>
<copy file="${aip-path-base}" tofile="${aip-path-32}" overwrite="true"/>
<property name="aip-path-64" value="${nbdist.dir}\installer_${app.name}_64.aip"/>
<copy file="${aip-path-base}" tofile="${aip-path-64}" overwrite="true"/>
</target> </target>
<target name="check-ai-32" if="jre.home.32" description="Builds the 32 bit installer IF JRE_HOME_32 is set.">
<property environment="env"/> <target name="copyJRE" description="Copy a given JRE to the installation folder">
<var name="aip-path" value="${aip-path-32}"/>
<var name="extra-bin-name" value="${app.name}64.exe"/>
<var name="aut-bin-name" value="${app.name}.exe"/>
<var name="jre-path" value="${env.JRE_HOME_32}"/>
<var name="package-type" value="x86" />
<var name="jvm.max.mem" value="512" />
<var name="new-jre-path" value="${inst-path}\jre"/> <var name="new-jre-path" value="${inst-path}\jre"/>
<delete failonerror="false" dir="${new-jre-path}"/> <delete failonerror="false" dir="${new-jre-path}"/>
<mkdir dir="${new-jre-path}"/> <mkdir dir="${new-jre-path}"/>
@ -222,67 +231,73 @@
<include name="**/*"/> <include name="**/*"/>
</fileset> </fileset>
</copy> </copy>
</target>
<target name="build32" if="jre.home.32" description="Builds the 32 bit installer IF JRE_HOME_32 is set.">
<property environment="env"/>
<var name="aip-path" value="${aip-path-32}"/>
<var name="aut-bin-name-todelete" value="${app.name}64.exe"/>
<var name="aut-bin-name" value="${app.name}.exe"/>
<var name="jvm.max.mem" value="512" />
<var name="jre-path" value="${env.JRE_HOME_32}"/>
<antcall target="copyJRE" inheritAll="true" />
<exec executable="${ai-exe-path}"> <exec executable="${ai-exe-path}">
<arg line="/edit ${aip-path} /SetAppdir -buildname DefaultBuild -path [ProgramFilesFolder][ProductName]-${app.version}"/> <arg line="/edit ${aip-path-base} /SetAppdir -buildname DefaultBuild -path [ProgramFilesFolder][ProductName]-${app.version}"/>
</exec> </exec>
<antcall target="run-ai-32" inheritAll="true" inheritRefs="true" />
<!-- gstreamer needs special path info to be set -->
<exec executable="${ai-exe-path}">
<arg line="/edit ${aip-path} /NewEnvironment -name GSTREAMER_PATH -value [APPDIR]gstreamer\bin -install_operation CreateUpdate -behavior Append -system_variable"/>
</exec>
<exec executable="${ai-exe-path}">
<arg line="/edit ${aip-path} /NewEnvironment -name GSTREAMER_PATH -value [APPDIR]gstreamer\lib\gstreamer-0.10 -install_operation CreateUpdate -behavior Append -system_variable"/>
</exec>
<exec executable="${ai-exe-path}">
<arg line="/edit ${aip-path} /NewEnvironment -name PATH -value %GSTREAMER_PATH% -install_operation CreateUpdate -behavior Append -system_variable"/>
</exec>
<antcall target="ai-build" inheritAll="true" />
<delete dir="${nbdist.dir}/installer_${app.name}_32-cache"/> <delete dir="${nbdist.dir}/installer_${app.name}_32-cache"/>
<move file="${nbdist.dir}/installer_${app.name}_32-SetupFiles/installer_${app.name}_32.msi" tofile="${nbdist.dir}/${app.name}-${app.version}-32bit.msi" /> <move file="${nbdist.dir}/installer_${app.name}_32-SetupFiles/installer_${app.name}_32.msi" tofile="${nbdist.dir}/${app.name}-${app.version}-32bit.msi" />
</target> </target>
<target name="run-ai-32" depends="add-ai-productinfo,add-ai-files,add-ai-shortcuts,add-ai-env,ai-build" description="Builds the 32 bit installer."/>
<target name="check-ai-64" if="jre.home.64" description="Builds the 64 bit installer IF JRE_HOME_64 is set."> <target name="build64" if="jre.home.64" description="Builds the 64 bit installer IF JRE_HOME_64 is set.">
<property environment="env"/> <property environment="env"/>
<var name="aip-path" value="${aip-path-64}"/> <var name="aip-path" value="${aip-path-64}"/>
<var name="extra-bin-name" value="${app.name}.exe"/>
<var name="aut-bin-name" value="${app.name}64.exe"/> <var name="aut-bin-name" value="${app.name}64.exe"/>
<var name="jre-path" value="${env.JRE_HOME_64}"/> <var name="aut-bin-name-todelete" value="${app.name}.exe"/>
<var name="package-type" value="x64" />
<var name="jvm.max.mem" value="2048"/> <var name="jvm.max.mem" value="2048"/>
<var name="new-jre-path" value="${inst-path}\jre"/>
<delete failonerror="false" dir="${new-jre-path}"/> <var name="jre-path" value="${env.JRE_HOME_64}"/>
<mkdir dir="${new-jre-path}"/> <antcall target="copyJRE" inheritAll="true" />
<copy todir="${new-jre-path}" overwrite="true">
<fileset dir="${jre-path}">
<include name="**/*"/>
</fileset>
</copy>
<echo message="aip-path: ${aip-path}" /> <echo message="aip-path: ${aip-path}" />
<exec executable="${ai-exe-path}"> <exec executable="${ai-exe-path}">
<arg line="/edit ${aip-path} /SetAppdir -buildname DefaultBuild -path [ProgramFiles64Folder][ProductName]-${app.version}"/> <arg line="/edit ${aip-path} /SetAppdir -buildname DefaultBuild -path [ProgramFiles64Folder][ProductName]-${app.version}"/>
</exec> </exec>
<antcall target="run-ai-64" inheritAll="true" inheritRefs="true" /> <exec executable="${ai-exe-path}">
<arg line="/edit ${aip-path} /SetPackageType x64"/>
</exec>
<antcall target="ai-build" inheritAll="true" />
<delete dir="${nbdist.dir}/installer_${app.name}_64-cache"/> <delete dir="${nbdist.dir}/installer_${app.name}_64-cache"/>
<move file="${nbdist.dir}/installer_${app.name}_64-SetupFiles/installer_${app.name}_64.msi" tofile="${nbdist.dir}/${app.name}-${app.version}-64bit.msi" /> <move file="${nbdist.dir}/installer_${app.name}_64-SetupFiles/installer_${app.name}_64.msi" tofile="${nbdist.dir}/${app.name}-${app.version}-64bit.msi" />
</target> </target>
<target name="run-ai-64" depends="add-ai-productinfo,add-ai-files,add-ai-shortcuts,ai-set-type,ai-build" description="Builds the 64 bit installer."/>
<target name="add-ai-productinfo" description="Add product information to the aip file">
<scriptdef name="generateguid" language="javascript">
<attribute name="property" />
<![CDATA[
importClass( java.util.UUID );
project.setProperty( attributes.get( "property" ), UUID.randomUUID() );
]]>
</scriptdef>
<generateguid property="guid1" />
<!-- automatically replace version name and productcode in the .aip file -->
<echo>Product Code: ${guid1}</echo>
<echo>Product Version: ${app.version}</echo>
<!-- Edit the API file to update versions: manual approach allows us to use non-X.Y.Z versions -->
<replaceregexp file="${aip-path}"
match="ProductCode&quot; Value=&quot;(\d{4}+:.)\w{8}+-\w{4}+-\w{4}+-\w{4}+-\w{12}+"
replace="ProductCode&quot; Value=&quot;\1${guid1}" />
<replaceregexp file="${aip-path}"
match="ProductVersion&quot; Value=&quot;\d+\.{1}\d+\.{1}\d+"
replace="ProductVersion&quot; Value=&quot;${app.version}" />
</target>
<!-- 32/64 specific since config settings are different -->
<target name="update-config" description="Updates configuration file with correct JVM args."> <target name="update-config" description="Updates configuration file with correct JVM args.">
<!-- Update configuration file to include jre --> <!-- Update configuration file to include jre -->
<property name="inst.property.file" value="${inst-path}/etc/${app.name}.conf" /> <property name="inst.property.file" value="${inst-path}/etc/${app.name}.conf" />
@ -292,11 +307,12 @@
<!-- Note: can be higher on 64 bit systems, should be in sync with project.properties --> <!-- Note: can be higher on 64 bit systems, should be in sync with project.properties -->
<entry key="default_options" value="@JVM_OPTIONS" /> <entry key="default_options" value="@JVM_OPTIONS" />
<entry key="jdkhome" value="&quot;jre&quot;" /> <entry key="jdkhome" value="&quot;jre&quot;" />
<entry key="default_userdir" value="${HOME}/${APPNAME}" />
</propertyfile> </propertyfile>
<!-- workaround for ant escaping : and = when setting properties --> <!-- workaround for ant escaping : and = when setting properties -->
<replace file="${inst.property.file}" token="@JVM_OPTIONS" value="${jvm.args}" /> <replace file="${inst.property.file}" token="@JVM_OPTIONS" value="${jvm.args}" />
</target> </target>
<target name="add-ai-files" depends="update-config" description="Add the files in the installation path to the installer file"> <target name="add-ai-files" depends="update-config" description="Add the files in the installation path to the installer file">
<foreach target="add-file-or-dir" param="theFile" inheritall="true" inheritrefs="true"> <foreach target="add-file-or-dir" param="theFile" inheritall="true" inheritrefs="true">
@ -309,26 +325,24 @@
</dirset> </dirset>
</path> </path>
</foreach> </foreach>
<echo message="Removing extra executable..."/> <echo message="Removing extra executable..."/>
<exec executable="${ai-exe-path}"> <exec executable="${ai-exe-path}">
<arg line="/edit ${aip-path} /DelFile APPDIR\bin\${extra-bin-name}"/> <arg line="/edit ${aip-path} /DelFile APPDIR\bin\${aut-bin-name-todelete}"/>
</exec> </exec>
</target> </target>
<target name="add-file-or-dir" depends="is-file-or-folder"> <target name="add-file-or-dir">
<echo message="Adding ${file-or-folder} to installer: ${theFile}"/> <condition property="file-or-folder" value="File" else="Folder">
<available file="${theFile}" type="file" />
</condition>
<exec executable="${ai-exe-path}"> <exec executable="${ai-exe-path}">
<arg line="/edit ${aip-path} /Add${file-or-folder} APPDIR ${theFile}" /> <arg line="/edit ${aip-path} /Add${file-or-folder} APPDIR ${theFile}" />
</exec> </exec>
</target> </target>
<target name="is-file-or-folder"> <!-- 32/64 specific since exec changes -->
<condition property="file-or-folder" value="File" else="Folder"> <target name="add-ai-shortcuts" description="Configure installer to have desktop short cuts">
<available file="${theFile}" type="file" />
</condition>
</target>
<target name="add-ai-shortcuts" description="Add shortcuts to the aip file">
<echo message="Adding desktop/menu shortcuts..."/> <echo message="Adding desktop/menu shortcuts..."/>
<exec executable="${ai-exe-path}"> <exec executable="${ai-exe-path}">
<arg line="/edit ${aip-path} /NewShortcut -name ${app.title} -dir DesktopFolder -target APPDIR\bin\${aut-bin-name} -icon ${inst-path}\icon.ico"/> <arg line="/edit ${aip-path} /NewShortcut -name ${app.title} -dir DesktopFolder -target APPDIR\bin\${aut-bin-name} -icon ${inst-path}\icon.ico"/>
@ -338,29 +352,13 @@
</exec> </exec>
</target> </target>
<!-- TODO: does this always need to be done, or just for 64 bit files? -->
<target name="add-ai-env" description="Add the enviornment variables to the aip file">
<echo message="Setting environment variables..."/>
<exec executable="${ai-exe-path}">
<arg line="/edit ${aip-path} /NewEnvironment -name GSTREAMER_PATH -value [APPDIR]gstreamer\bin -install_operation CreateUpdate -behavior Append -system_variable"/>
</exec>
<exec executable="${ai-exe-path}">
<arg line="/edit ${aip-path} /NewEnvironment -name GSTREAMER_PATH -value [APPDIR]gstreamer\lib\gstreamer-0.10 -install_operation CreateUpdate -behavior Append -system_variable"/>
</exec>
<exec executable="${ai-exe-path}">
<arg line="/edit ${aip-path} /NewEnvironment -name PATH -value %GSTREAMER_PATH% -install_operation CreateUpdate -behavior Append -system_variable"/>
</exec>
</target>
<target name="ai-build" description="Build the installer."> <target name="ai-build" description="Build the installer based on properties set by 32/64 targets.">
<antcall target="add-ai-files" inheritAll="true" />
<antcall target="add-ai-shortcuts" inheritAll="true" />
<exec executable="${ai-exe-path}"> <exec executable="${ai-exe-path}">
<arg line="/build ${aip-path}"/> <arg line="/build ${aip-path}"/>
</exec> </exec>
</target> </target>
<target name="ai-set-type" description="Set the installer to only install on 64 bit machines.">
<exec executable="${ai-exe-path}">
<arg line="/edit ${aip-path} /SetPackageType ${package-type}"/>
</exec>
</target>
</project> </project>

View File

@ -7,6 +7,8 @@
<import file="nbproject/build-impl.xml"/> <import file="nbproject/build-impl.xml"/>
<!-- Note that these values are also defined in platform.xml and those values are used to download the
correct version of the platform. These are used for other reasons. We should merge the two. -->
<property name="netbeans-plat-version" value="7.3" /> <property name="netbeans-plat-version" value="7.3" />
<property name="nbplatform.active.dir" value="${basedir}/netbeans-plat/${netbeans-plat-version}" /> <property name="nbplatform.active.dir" value="${basedir}/netbeans-plat/${netbeans-plat-version}" />
@ -48,14 +50,14 @@
<target name="getJunit"> <target name="getJunit">
<property name="junit.dir" value="${thirdparty.dir}/junit/${netbeans-plat-version}" /> <property name="junit.dir" value="${thirdparty.dir}/junit/${netbeans-plat-version}" />
<unzip src="${junit.dir}/junit.zip" dest="${nbplatform.active.dir}"/> <unzip src="${junit.dir}/junit.zip" dest="${nbplatform.active.dir}"/>
</target> </target>
<!-- This target will create a custom ZIP file for us. It first uses the general <!-- This target will create a custom ZIP file for us. It first uses the general
ZIP target and then opens it up and adds in any files that we want. This is where we customize the ZIP target and then opens it up and adds in any files that we want. This is where we customize the
version number. --> version number. -->
<target name="build-zip" depends="suite.build-zip"> <!--,findJRE" --> <target name="build-zip" depends="suite.build-zip"> <!--,findJRE" -->
<property name="nbdist.dir" value="dist"/>
<property name="release.dir" value="${nbdist.dir}/${app.name}"/> <property name="release.dir" value="${nbdist.dir}/${app.name}"/>
<!-- step (2) unzip the result --> <!-- step (2) unzip the result -->
@ -72,12 +74,8 @@
<unzip src="${thirdparty.dir}/gstreamer/${os.family}/i386/0.10.7/gstreamer.zip" dest="${zip-tmp}/${app.name}/gstreamer"/> <unzip src="${thirdparty.dir}/gstreamer/${os.family}/i386/0.10.7/gstreamer.zip" dest="${zip-tmp}/${app.name}/gstreamer"/>
<copy file="${basedir}/icons/icon.ico" tofile="${zip-tmp}/${app.name}/icon.ico" overwrite="true"/> <copy file="${basedir}/icons/icon.ico" tofile="${zip-tmp}/${app.name}/icon.ico" overwrite="true"/>
<if>
<equals arg1="${os.family}" arg2="windows"/> <antcall target="copyLibsToZip"/>
<then>
<antcall target="copyExternalLibsToZip"/>
</then>
</if>
<property name="app.property.file" value="${zip-tmp}/${app.name}/etc/${app.name}.conf" /> <property name="app.property.file" value="${zip-tmp}/${app.name}/etc/${app.name}.conf" />
<!-- for Japanese localized version add option: -Duser.language=ja --> <!-- for Japanese localized version add option: -Duser.language=ja -->
@ -114,7 +112,9 @@
<delete dir="${release.dir}"/> <delete dir="${release.dir}"/>
</target> </target>
<target name="getProps" depends="prop-files,input-build-type,input-version"></target> <target name="getProps" depends="prop-files,input-build-type,input-version">
<property name="nbdist.dir" value="dist"/>
</target>
<target name="prop-files"> <target name="prop-files">
<property file="nbproject/private/private.properties"/> <property file="nbproject/private/private.properties"/>
@ -133,16 +133,8 @@
<property name="app.version" value="${DSTAMP}"/> <property name="app.version" value="${DSTAMP}"/>
</target> </target>
<target name="getExternals">
<if>
<equals arg1="${os.family}" arg2="windows"/>
<then>
<antcall target="copyLibs"/>
</then>
</if>
</target>
<target name="-init" depends="-taskdefs,-convert-old-project,getProps,getJunit,getExternals"> <target name="-init" depends="-taskdefs,-convert-old-project,getProps,getJunit,copyLibsToBaseDir">
<convertclusterpath from="${cluster.path.evaluated}" to="cluster.path.final" id="cluster.path.id"/> <convertclusterpath from="${cluster.path.evaluated}" to="cluster.path.final" id="cluster.path.id"/>
<sortsuitemodules unsortedmodules="${modules}" sortedmodulesproperty="modules.sorted"/> <sortsuitemodules unsortedmodules="${modules}" sortedmodulesproperty="modules.sorted"/>
<property name="cluster" location="build/cluster"/> <property name="cluster" location="build/cluster"/>
@ -231,13 +223,12 @@
<target name="versioning-script" depends="check-release, versioning-script-if-release, versioning-script-if-not-release"/> <target name="versioning-script" depends="check-release, versioning-script-if-release, versioning-script-if-not-release"/>
<target name="build-installer-dir" depends="getProps, build-zip" description="Builds Autopsy with branding and all dependencies" > <target name="build-installer" depends="getProps, build-zip" description="Builds Autopsy installer.">
<delete dir="${nbdist.dir}/${app.name}-installer" quiet="true"/>
<unzip src="${nbdist.dir}/${app.name}-${app.version}.zip" dest="${nbdist.dir}/${app.name}-installer"/> <unzip src="${nbdist.dir}/${app.name}-${app.version}.zip" dest="${nbdist.dir}/${app.name}-installer"/>
</target>
<target name="build-installer" depends="build-installer-dir" description="Builds Autopsy installer.">
<antcall target="build-installer-${os.family}" /> <antcall target="build-installer-${os.family}" />
</target> </target>
<target name="test-download-imgs" description="Get test images and store them in the path represented by the test-input variable."> <target name="test-download-imgs" description="Get test images and store them in the path represented by the test-input variable.">
<available file="${test-input}/nps-2008-jean.E01" property="img-present-1"/> <available file="${test-input}/nps-2008-jean.E01" property="img-present-1"/>
<available file="${test-input}/nps-2008-jean.E02" property="img-present-2"/> <available file="${test-input}/nps-2008-jean.E02" property="img-present-2"/>

View File

@ -1,9 +1,12 @@
branding.token=autopsy branding.token=autopsy
# Version of platform that is automatically downloaded
# Note build.xml has similar definitions that should be kept in sync (manually)
netbeans-plat-version=7.3.1 netbeans-plat-version=7.3.1
suite.dir=${basedir} suite.dir=${basedir}
nbplatform.active.dir=${suite.dir}/netbeans-plat/${netbeans-plat-version} nbplatform.active.dir=${suite.dir}/netbeans-plat/${netbeans-plat-version}
harness.dir=${nbplatform.active.dir}/harness harness.dir=${nbplatform.active.dir}/harness
bootstrap.url=http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/netbeans/harness/tasks.jar bootstrap.url=http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/netbeans/harness/tasks.jar
# Where we get the platform from. To see what versions are available, open URL in browser up to the .../updates part of the URL
autoupdate.catalog.url=http://dlc.sun.com.edgesuite.net/netbeans/updates/${netbeans-plat-version}/uc/final/distribution/catalog.xml.gz autoupdate.catalog.url=http://dlc.sun.com.edgesuite.net/netbeans/updates/${netbeans-plat-version}/uc/final/distribution/catalog.xml.gz
cluster.path=\ cluster.path=\
${nbplatform.active.dir}/harness:\ ${nbplatform.active.dir}/harness:\