<commit_before><?xml version="1.0" encoding="UTF-8"?>
<project name="org.mwc.cmap.installer" default="perform_dist" basedir=".">
	<property name="deployDir" value="../deploy" description="where we start building the output set" />
    <property name="linuxDist" value="${deployDir}/Debrief.zip" description="the name for the linux/debrief dist (without JRE)" />

	<!-- path to the installer (exec command won't take relative path reference -->
	<property name="advancedInstallerPath" value="d:\dev\cmap\contribs\advancedinstaller\" />

	<!-- and the zip support filenames -->
    <property name="zipName" value="update.zip"/>
    <property name="zipDest" value="${deployDir}/${zipName}"/>
	<property name="zipPath" value="/media/disk"/>
	<!-- <property name="zipPath" value="h:/"/> -->
	
	
	<target name="clean" description="clear the output directory" depends="">
	</target>

	<target name="empty_dist_dir" description="clear the output directory" depends="">
		<delete dir="${deployDir}" excludes="DebriefNG,DebriefNG/**, .project" />
	</target>

	<target name="check_the_dist" description="checking all files there" depends="">
		<property name="distDir" value="${destDir}\DebriefNG" />
		<condition property="eclipse_present">
			<and>
				<!-- now eclipse itself -->
				<available file="${distDir}\DebriefNG.exe" />
				<available file="${distDir}\features\org.eclipse.platform_3.3.0.v20070612-_19UEkLEzwsdF9jSqQ-G" />
				<available file="${distDir}\features\org.eclipse.rcp_3.3.0.v20070607-8y8eE8NEbsN3X_fjWS8HPNG" />
				<!-- now eclipse itself -->
			</and>
		</condition>
		<condition property="static_present">
			<and>
				<!-- and the jre -->
				<available file="${distDir}\jre" />
				<available file="${distDir}\jre\bin\java.exe" />
				<!-- and the workspace 
				<available file="${distDir}\workspace" />
				<available file="${distDir}\workspace\sample_data" />
				<available file="${distDir}\workspace\sample_data\sample.xml" /> -->
				<!-- and the dlls -->
				<available file="${distDir}\gdiplus.dll" />
				<available file="${distDir}\JavaClipboard.dll" />
			</and>
		</condition>
		<condition property="debrief_present">
			<and>
				<!-- first the plugins -->
				<available file="${distDir}\plugins\org.mwc.cmap.legacy_1.0.23" />
				<!-- now the features -->
				<available file="${distDir}\features\org.mwc.cmap.feature_1.0.39" />
				<available file="${distDir}\features\org.mwc.cmap.layer_manager.feature_1.0.12" />
				<available file="${distDir}\features\org.mwc.cmap.overview.feature_1.0.4" />
				<available file="${distDir}\features\org.mwc.cmap.plot3d.feature_1.0.7" />
			</and>
		</condition>

		<fail message="some eclipse files are missing" unless="eclipse_present" />
		<fail message="some static lib files are missing" unless="static_present" />
		<fail message="some debrief files are missing" unless="debrief_present" />
	</target>

	<target name="build_installer" description="do installer" if="do.installer" depends="">
		<!-- check everything's in the dist -->
		<echo message="checking the dist" />
		<antcall target="check_the_dist" />

		<echo message="building the dist" />
		<exec executable="${advancedInstallerPath}\AdvancedInstaller.exe">
			<arg line="/build ng_installer_settings.aip" />
		</exec>
	</target>

	<target name="copyUpdateToZip" description="copy updates to zipDrv" if="zip.drivePresent" depends="">
        <echo message="zip drive found" />
		
		<antcall target="zipTheData"/>
		
        <echo message="ditching old zip from zip drive" />
        <delete file="${zipPath}/${zipName}"/>
        <echo message="copying new zip to zip drive" />
		<copy file="${zipDest}" todir="${zipPath}" />
     <!--  don't bother copying the unpack code.  we haven't got it in linux, and it's waiting already on the LAN	    
     	<echo message="copying unpack script to zip drive" />
		<copy file="unpack.xml" todir="h:/" /> -->
	</target>
	
	<target name="zipTheData" description="create the zip file for exporting">
        <echo message="ditching old update zip" />
        <delete file="${zipDest}"/>
        <echo message="creating new update zip" />
		<zip destFile="${zipDest}" whenempty="fail" duplicate="fail">
			<fileset dir="../org.mwc.cmap.installer" excludes="**/*.static*.*, *build.xml,*.aip,.svn,unpack.xml,setup.nsi,statcvs_template" />
		</zip>
	</target>
	

	<target name="prepareUpdateToZip" description="copy updates to zipDrv" if="do.zipDrive" depends="">
		<echo message="checking zip present" />
        <available file="${zipPath}" property="zip.drivePresent" />
		<fail message="zip drive not found!"  unless="zip.drivePresent"/>
		<antcall target="copyUpdateToZip"/>
	</target>

    <target name="createLinuxDist" description="copy updates to zipDrv" if="do.linux">
        <echo message="ditching previous linux dist" />
    	<delete file="${linuxDist}"/>
        <echo message="collating linux dist" />
    	<zip destfile="${linuxDist}" basedir="${deployDir}/DebriefNG" excludes="jre" /><commit_msg>tidy structure of build file<commit_after><?xml version="1.0" encoding="UTF-8"?>
<project name="org.mwc.cmap.installer" default="perform_dist" basedir=".">
	<property name="deployDir" value="../deploy" description="where we start building the output set" />
    <property name="linuxDist" value="${deployDir}/Debrief.zip" description="the name for the linux/debrief dist (without JRE)" />

	<!-- path to the installer (exec command won't take relative path reference -->
	<property name="advancedInstallerPath" value="d:\dev\cmap\contribs\advancedinstaller\" />

	<!-- and the zip support filenames -->
    <property name="zipName" value="update.zip"/>
    <property name="zipDest" value="${deployDir}/${zipName}"/>
	<property name="zipPath" value="/media/disk"/>
	<!-- <property name="zipPath" value="h:/"/> -->
	
	
	<target name="clean" description="clear the output directory" depends="">
	</target>

	<target name="empty_dist_dir" description="clear the output directory" depends="">
		<delete dir="${deployDir}" excludes="DebriefNG,DebriefNG/**, .project" />
	</target>

	<target name="check_the_dist" description="checking all files there" depends="">
		<property name="distDir" value="${destDir}\DebriefNG" />
		<condition property="eclipse_present">
			<and>
				<!-- now eclipse itself -->
				<available file="${distDir}\DebriefNG.exe" />
				<available file="${distDir}\features\org.eclipse.platform_3.3.0.v20070612-_19UEkLEzwsdF9jSqQ-G" />
				<available file="${distDir}\features\org.eclipse.rcp_3.3.0.v20070607-8y8eE8NEbsN3X_fjWS8HPNG" />
				<!-- now eclipse itself -->
			</and>
		</condition>
		<condition property="static_present">
			<and>
				<!-- and the jre -->
				<available file="${distDir}\jre" />
				<available file="${distDir}\jre\bin\java.exe" />
				<!-- and the workspace 
				<available file="${distDir}\workspace" />
				<available file="${distDir}\workspace\sample_data" />
				<available file="${distDir}\workspace\sample_data\sample.xml" /> -->
				<!-- and the dlls -->
				<available file="${distDir}\gdiplus.dll" />
				<available file="${distDir}\JavaClipboard.dll" />
			</and>
		</condition>
		<condition property="debrief_present">
			<and>
				<!-- first the plugins -->
				<available file="${distDir}\plugins\org.mwc.cmap.legacy_1.0.23" />
				<!-- now the features -->
				<available file="${distDir}\features\org.mwc.cmap.feature_1.0.39" />
				<available file="${distDir}\features\org.mwc.cmap.layer_manager.feature_1.0.12" />
				<available file="${distDir}\features\org.mwc.cmap.overview.feature_1.0.4" />
				<available file="${distDir}\features\org.mwc.cmap.plot3d.feature_1.0.7" />
			</and>
		</condition>

		<fail message="some eclipse files are missing" unless="eclipse_present" />
		<fail message="some static lib files are missing" unless="static_present" />
		<fail message="some debrief files are missing" unless="debrief_present" />
	</target>

	<target name="build_installer" description="do installer" if="do.installer" depends="">
		<!-- check everything's in the dist -->
		<echo message="checking the dist" />
		<antcall target="check_the_dist" />

		<echo message="building the dist" />
		<exec executable="${advancedInstallerPath}\AdvancedInstaller.exe">
			<arg line="/build ng_installer_settings.aip" />
		</exec>
	</target>

	<target name="prepareUpdateToZip" description="copy updates to zipDrv" if="do.zipDrive" depends="">
		<echo message="checking zip present" />
        <available file="${zipPath}" property="zip.drivePresent" />
		<fail message="zip drive not found!"  unless="zip.drivePresent"/>
		<antcall target="copyUpdateToZip"/>
	</target>
	
	<target name="copyUpdateToZip" description="copy updates to zipDrv" if="zip.drivePresent" depends="">
        <echo message="zip drive found" />
		
		<antcall target="zipTheData"/>
		
        <echo message="ditching old zip from zip drive" />
        <delete file="${zipPath}/${zipName}"/>
        <echo message="copying new zip to zip drive" />
		<copy file="${zipDest}" todir="${zipPath}" />
     <!--  don't bother copying the unpack code.  we haven't got it in linux, and it's waiting already on the LAN	    
     	<echo message="copying unpack script to zip drive" />
		<copy file="unpack.xml" todir="h:/" /> -->
	</target>
	
	<target name="zipTheData" description="create the zip file for exporting">
        <echo message="ditching old update zip" />
        <delete file="${zipDest}"/>
        <echo message="creating new update zip" />
		<zip destFile="${zipDest}" whenempty="fail" duplicate="fail">
			<fileset dir="../org.mwc.cmap.installer" excludes="**/*.static*.*, *build.xml,*.aip,.svn,unpack.xml,setup.nsi,statcvs_template" />
		</zip>
	</target>


    <target name="createLinuxDist" description="copy updates to zipDrv" if="do.linux">
        <echo message="ditching previous linux dist" />
    	<delete file="${linuxDist}"/>
        <echo message="collating linux dist" />
    	<zip destfile="${linuxDist}" basedir="${deployDir}/DebriefNG" excludes="jre" />
{'fraction_non_alphanumeric': 0.18072650855598918, 'fraction_numerical': 0.010407285099569698, 'mean_word_length': 4.075672930421534, 'pattern_counts': {'":': 0, '<': 195, '<?xml version=': 2, '>': 195, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6945641', 'n_tokens_mistral': 3484, 'n_tokens_neox': 3071, 'n_words': 694}