mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00

Conflicts: (due to line ending problems) Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerMedia.java build-windows.xml build.xml
126 lines
6.3 KiB
XML
126 lines
6.3 KiB
XML
<project name="AutopsyTSKTargets">
|
|
|
|
<!-- Need a way to specify TSK Debug versus Release -->
|
|
<property name="TSK_BUILD_TYPE">Release</property>
|
|
|
|
<target name="autoAIPath" >
|
|
<property name="AI.path">C:\Program Files (x86)\Caphyon\Advanced Installer 10.3\bin\x86\AdvancedInstaller.com</property>
|
|
<available file="${AI.path}"
|
|
property="ai-exe-path"
|
|
value="${AI.path}"/>
|
|
</target>
|
|
|
|
<target name="inputAIPath" unless="ai-exe-path">
|
|
<input addProperty="ai-exe-path"
|
|
message="Enter the location of AdvancedInstaller.com"/>
|
|
</target>
|
|
|
|
<target name="run-advanced-installer" depends="autoAIPath,inputAIPath">
|
|
<fail unless="ai-exe-path" message="Could not locate Advanced Installer."/>
|
|
<!-- Copy the template file to add details to -->
|
|
<copy file="${basedir}/installer_${app.name}/installer_${app.name}.aip" tofile="${nbdist.dir}/installer_${app.name}.aip" overwrite="true"/>
|
|
<scriptdef name="generateguid" language="javascript">
|
|
<attribute name="property" />
|
|
<![CDATA[
|
|
importClass( java.util.UUID );
|
|
|
|
project.setProperty( attributes.get( "property" ), UUID.randomUUID() );
|
|
]]>
|
|
</scriptdef>
|
|
<generateguid property="guid1" />
|
|
<property name="inst-path" value="${nbdist.dir}\${app.name}-installer"/>
|
|
<property name="aip-path" value="${nbdist.dir}\installer_${app.name}.aip"/>
|
|
<!-- 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" Value="(\d{4}+:.)\w{8}+-\w{4}+-\w{4}+-\w{4}+-\w{12}+"
|
|
replace="ProductCode" Value="\1${guid1}" />
|
|
|
|
<replaceregexp file="${aip-path}"
|
|
match="ProductVersion" Value="\d+\.{1}\d+\.{1}\d+"
|
|
replace="ProductVersion" Value="${app.version}" />
|
|
|
|
<!-- Use Advanced Installer to configure files to add -->
|
|
<echo message="Adding files to installer..."/>
|
|
<exec executable="${ai-exe-path}">
|
|
<arg line="/edit ${aip-path} /AddFolder APPDIR ${inst-path}\bin"/>
|
|
</exec>
|
|
<exec executable="${ai-exe-path}">
|
|
<arg line="/edit ${aip-path} /AddFolder APPDIR ${inst-path}\etc"/>
|
|
</exec>
|
|
<exec executable="${ai-exe-path}">
|
|
<arg line="/edit ${aip-path} /AddFolder APPDIR ${inst-path}\gstreamer"/>
|
|
</exec>
|
|
<exec executable="${ai-exe-path}">
|
|
<arg line="/edit ${aip-path} /AddFolder APPDIR ${inst-path}\harness"/>
|
|
</exec>
|
|
<exec executable="${ai-exe-path}">
|
|
<arg line="/edit ${aip-path} /AddFolder APPDIR ${inst-path}\java"/>
|
|
</exec>
|
|
<exec executable="${ai-exe-path}">
|
|
<arg line="/edit ${aip-path} /AddFolder APPDIR ${inst-path}\jre"/>
|
|
</exec>
|
|
<exec executable="${ai-exe-path}">
|
|
<arg line="/edit ${aip-path} /AddFolder APPDIR ${inst-path}\platform"/>
|
|
</exec>
|
|
<exec executable="${ai-exe-path}">
|
|
<arg line="/edit ${aip-path} /AddFolder APPDIR ${inst-path}\${app.name}"/>
|
|
</exec>
|
|
<exec executable="${ai-exe-path}">
|
|
<arg line="/edit ${aip-path} /AddFile APPDIR ${inst-path}\icon.ico"/>
|
|
</exec>
|
|
<exec executable="${ai-exe-path}">
|
|
<arg line="/edit ${aip-path} /AddFile APPDIR ${inst-path}\KNOWN_ISSUES.txt"/>
|
|
</exec>
|
|
<exec executable="${ai-exe-path}">
|
|
<arg line="/edit ${aip-path} /AddFile APPDIR ${inst-path}\LICENSE-2.0.txt"/>
|
|
</exec>
|
|
<exec executable="${ai-exe-path}">
|
|
<arg line="/edit ${aip-path} /AddFile APPDIR ${inst-path}\NEWS.txt"/>
|
|
</exec>
|
|
<exec executable="${ai-exe-path}">
|
|
<arg line="/edit ${aip-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="${ai-exe-path}">
|
|
<arg line="/edit ${aip-path} /SetVersion ${app.version}"/>
|
|
</exec>-->
|
|
|
|
<echo message="Adding desktop/menu shortcuts..."/>
|
|
<exec executable="${ai-exe-path}">
|
|
<arg line="/edit ${aip-path} /NewShortcut -name ${app.title} -dir DesktopFolder -target APPDIR\bin\${app.name}.exe -icon ${inst-path}\icon.ico"/>
|
|
</exec>
|
|
<exec executable="${ai-exe-path}">
|
|
<arg line="/edit ${aip-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="${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>
|
|
<exec executable="${ai-exe-path}">
|
|
<arg line="/build ${aip-path}"/>
|
|
</exec>
|
|
<!--<delete file="${aip-path}"/>-->
|
|
</target>
|
|
|
|
<!-- Makes an installer from the opened ZIP file -->
|
|
<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"/>
|
|
<move file="${nbdist.dir}/installer_${app.name}-SetupFiles/installer_${app.name}.msi" tofile="${nbdist.dir}/installer_${app.name}-${app.version}.msi" />
|
|
</target>
|
|
</project>
|