Salome HOME
Exclude the CASTEM translations from France version of the som.properties
[tools/siman.git] / Workspace / Siman / build.xml
index 4c2fa02038fe7e6bb388426c3ac0d7e2e9592a86..d585c6df03d84c4280a3330a4ce99e4f9aabcaab 100644 (file)
                <sequential>
                        <echo message="Generating configuration in @{mode} mode" />
                        <!-- Copy files from config source directory according to the given mode -->
+            <loadfile property="customer" srcfile="${config.src.dir}/customer.txt"/>
+            <loadfile property="som" srcfile="${config.src.dir}/${customer}_som.properties"/>
+                       <echo message="som: ${som}"/>
+            <loadfile property="som.en" srcfile="${config.src.dir}/${customer}_som_en.properties"/>
                        <copy todir="${basedir}/${config.@{mode}.dir}" overwrite="true">
                                <fileset dir="${config.src.dir}/templates">
                                </fileset>
                                <!-- Transform the files from templates substituting properties values -->
                                <filterset>
-                                       <filter token="datesimple" value="${datesimple}" />
+                    <filter token="som" value="${som}" />
+                    <filter token="som.en" value="${som.en}" />
+                    <filter token="datesimple" value="${datesimple}" />
                                        <filter token="time" value="${time}" />
                                        <!-- Get properties to substitute according to the given mode -->
                                        <filtersfile file="${config.src.dir}/@{mode}.properties" />
                        <fileset dir="${siman.dist.dir}" includes="**/*" />
                </delete>
        </target>
+
+    <!-- ================================================= -->
+    <!--    prepare-postgres: Prepare config for Postgress -->
+    <!-- ================================================= -->
+    <target name="prepare-postgres" description="prepare configuration for Postgress">
+        <echo message="Prepare configuration for Postgress..." />
+        <copy file="${config.src.dir}/debug_pg.properties" tofile="${config.src.dir}/debug.properties" overwrite="true"/>
+        <copy file="${config.src.dir}/release_pg.properties" tofile="${config.src.dir}/release.properties" overwrite="true"/>
+        <antcall target="debug-config"/>
+    </target>
+       
+    <!-- ================================================= -->
+    <!--    prepare-postgres: Prepare config for MySql     -->
+    <!-- ================================================= -->
+    <target name="prepare-mysql" description="prepare configuration for MySql">
+        <echo message="Prepare configuration for MySql..." />
+        <copy file="${config.src.dir}/debug_mysql.properties" tofile="${config.src.dir}/debug.properties" overwrite="true"/>
+        <copy file="${config.src.dir}/release_mysql.properties" tofile="${config.src.dir}/release.properties" overwrite="true"/>
+        <antcall target="debug-config"/>
+    </target>
+
+    <!-- ================================================= -->
+    <!--    prepare-customer: Prepare config for the given customer -->
+    <!-- ================================================= -->
+    <macrodef name="prepare-customer">
+        <!-- Parameter "customer" can be equal to "cea" or "edf" -->
+        <attribute name="customer" />
+        <sequential>
+            <echo message="Prepare config for the customer @{customer}" />
+            <echo message="@{customer}" file="${config.src.dir}/customer.txt"/>
+            <copy file="${config.src.dir}/@{customer}_som.xml" tofile="WebContent/conf/som.xml" overwrite="true"/>
+            <antcall target="debug-config"/>
+        </sequential>
+    </macrodef>
+       
+    <!-- ================================================= -->
+    <!--    prepare-cea: Prepare config for CEA            -->
+    <!-- ================================================= -->
+    <target name="prepare-cea" description="prepare configuration for CEA">
+        <echo message="Prepare configuration for CEA..." />
+        <prepare-customer customer="cea" />
+    </target>
+
+    <!-- ================================================= -->
+    <!--    prepare-cea: Prepare config for EDF            -->
+    <!-- ================================================= -->
+    <target name="prepare-edf" description="prepare configuration for EDF">
+        <echo message="Prepare configuration for EDF..." />
+        <prepare-customer customer="edf" />
+    </target>
 </project>