<?xml version="1.0" encoding="utf-8"?>
<project name="replaceSample" default="replace" basedir=".">

	<!--
	DEFINE import our build properties file and define our tasks
	-->
	<property file="./build.properties" />

	<target name="replace" depends="clean">
		<!-- Message リプレース処理-->
		<antcall target="replace2">
			<param name="TYPE" value="HIE_EN" />
		</antcall>
		<antcall target="replace2">
			<param name="TYPE" value="HIE_JA" />
		</antcall>
		<antcall target="replace2">
			<param name="TYPE" value="HIJ_EN" />
		</antcall>
		<antcall target="replace2">
			<param name="TYPE" value="HIJ_JA" />
		</antcall>
		<antcall target="replace2">
			<param name="TYPE" value="HPE_EN" />
		</antcall>
		<antcall target="replace2">
			<param name="TYPE" value="HPE_JA" />
		</antcall>
		<antcall target="replace2">
			<param name="TYPE" value="HPJ_EN" />
		</antcall>
		<antcall target="replace2">
			<param name="TYPE" value="HPJ_JA" />
		</antcall>

		<!-- ガイダンス リプレース処理-->
		<antcall target="replace3">
			<param name="TYPE" value="HIE_EN" />
		</antcall>
		<antcall target="replace3">
			<param name="TYPE" value="HIE_JA" />
		</antcall>
		<antcall target="replace3">
			<param name="TYPE" value="HIJ_EN" />
		</antcall>
		<antcall target="replace3">
			<param name="TYPE" value="HIJ_JA" />
		</antcall>
		<antcall target="replace3">
			<param name="TYPE" value="HPE_EN" />
		</antcall>
		<antcall target="replace3">
			<param name="TYPE" value="HPE_JA" />
		</antcall>
		<antcall target="replace3">
			<param name="TYPE" value="HPJ_EN" />
		</antcall>
		<antcall target="replace3">
			<param name="TYPE" value="HPJ_JA" />
		</antcall>

		<!-- 旧GUIメッセージ リプレース処理-->
		<antcall target="replace4">
			<param name="TYPE" value="HIE_EN" />
		</antcall>

	</target>

	<target name="replace2">
		<!--<copy todir="out2" encoding="Shift-JIS" overwrite="true">-->
		<copy todir="tmp2" encoding="Shift-JIS" overwrite="true">
			<filterset>
				<filtersfile file="replacementDefine/replacement_${TYPE}.properties" />
			</filterset>
			<!--<fileset dir="out" defaultexcludes="yes">-->
			<fileset dir="tmp" defaultexcludes="yes">
				<!--<include name="guidlist_${TYPE}.csv" />-->
				<include name="Measures_${TYPE}.csv" />
				<include name="Message_${TYPE}.csv" />
				<include name="Measures_${TYPE}.properties.original" />
				<include name="Message_${TYPE}.properties.original" />

			</fileset>
		</copy>

	</target>

	<target name="replace3">
		<copy todir="out2" encoding="Shift-JIS" overwrite="true">
			<filterset>
				<filtersfile file="replacementDefine/replacement_${TYPE}.properties" />
			</filterset>
			<fileset dir="out_guid" defaultexcludes="yes">
				<include name="guidlist_${TYPE}.csv" />
			</fileset>
		</copy>

	</target>


	<target name="replace4">
		<copy todir="tmpOld" encoding="Shift-JIS" overwrite="true">
			<filterset>
				<filtersfile file="replacementDefine/replacement_HIE_EN.properties" />
			</filterset>
			<fileset dir="out_msgold" defaultexcludes="yes">
				<include name="ServerIMessage_en.csv" />
				<include name="ClientIMessage_en.csv" />
			</fileset>
		</copy>
		<copy todir="tmpOld" encoding="Shift-JIS" overwrite="true">
			<filterset>
				<filtersfile file="replacementDefine/replacement_HIE_JA.properties" />
			</filterset>
			<fileset dir="out_msgold" defaultexcludes="yes">
				<include name="ServerIMessage_ja.csv" />
				<include name="ClientIMessage_ja.csv" />
			</fileset>
		</copy>
		<copy todir="tmpOld" encoding="Shift-JIS" overwrite="true">
			<filterset>
				<filtersfile file="replacementDefine/replacement_HIJ_EN.properties" />
			</filterset>
			<fileset dir="out_msgold" defaultexcludes="yes">
				<include name="ServerIMessage_J_en.csv" />
				<include name="ClientIMessage_J_en.csv" />
			</fileset>
		</copy>
		<copy todir="tmpOld" encoding="Shift-JIS" overwrite="true">
			<filterset>
				<filtersfile file="replacementDefine/replacement_HIJ_JA.properties" />
			</filterset>
			<fileset dir="out_msgold" defaultexcludes="yes">
				<include name="ServerIMessage_J_ja.csv" />
				<include name="ClientIMessage_J_ja.csv" />
			</fileset>
		</copy>
		<copy todir="tmpOld" encoding="Shift-JIS" overwrite="true">
			<filterset>
				<filtersfile file="replacementDefine/replacement_HPE_EN.properties" />
			</filterset>
			<fileset dir="out_msgold" defaultexcludes="yes">
				<include name="ServerIMessage_HP_en.csv" />
				<include name="ClientIMessage_HP_en.csv" />
			</fileset>
		</copy>
		<copy todir="tmpOld" encoding="Shift-JIS" overwrite="true">
			<filterset>
				<filtersfile file="replacementDefine/replacement_HPE_JA.properties" />
			</filterset>
			<fileset dir="out_msgold" defaultexcludes="yes">
				<include name="ServerIMessage_HP_ja.csv" />
				<include name="ClientIMessage_HP_ja.csv" />
			</fileset>
		</copy>
		<copy todir="tmpOld" encoding="Shift-JIS" overwrite="true">
			<filterset>
				<filtersfile file="replacementDefine/replacement_HPJ_EN.properties" />
			</filterset>
			<fileset dir="out_msgold" defaultexcludes="yes">
				<include name="ServerIMessage_HPJ_en.csv" />
				<include name="ClientIMessage_HPJ_en.csv" />
			</fileset>
		</copy>
		<copy todir="tmpOld" encoding="Shift-JIS" overwrite="true">
			<filterset>
				<filtersfile file="replacementDefine/replacement_HPJ_JA.properties" />
			</filterset>
			<fileset dir="out_msgold" defaultexcludes="yes">
				<include name="ServerIMessage_HPJ_ja.csv" />
				<include name="ClientIMessage_HPJ_ja.csv" />
			</fileset>
		</copy>
	</target>

	<target name="clean" description="cleaning build directory">
		<delete verbose="${verbose}" dir="out2"/>
		<mkdir dir="out2"/>
		<delete verbose="${verbose}" dir="tmp2"/>
		<mkdir dir="tmp2"/>
		<delete verbose="${verbose}" dir="tmpOld"/>
		<mkdir dir="tmpOld"/>
	</target>


</project>
