Просмотр исходного кода

dodanie opcji aby wyzwalac z parametrow ant

a.binder 9 лет назад
Родитель
Сommit
c974e29276
1 измененных файлов с 111 добавлено и 8 удалено
  1. 111 8
      SE/dev/php-cli/build.xml

+ 111 - 8
SE/dev/php-cli/build__biale_plamy.xml → SE/dev/php-cli/build.xml

@@ -2,12 +2,21 @@
 <project
     xmlns:bp="https://procesy5.pl/biale_plamy-schema.xsd"
     basedir="." name="biale_plamy-generate_data" default="biale_plamy-generate_data">
-    <!-- 
     
     
-    -->
     
-    <!--<property name="biale_plamy-prepare_sql_data.php" value="biale_plamy-prepare_sql_data.php"/>-->
+   
+    
+    
+    
+    
+    <property name="PE_Price" value="2500"/>
+    <property name="Cable_Price" value="3"/>
+    <property name="max_combinate_groups_elements" value="12"/> <!-- po ile wezlow mamy grupowac do wyliczania kombinacji kosztow -->
+    <property name="logic" value="grouped"/>
+    <!--<xsl:param name="logic" select="'sorted'"/>--> <!-- tutaj robi grupy ale analizyje w grupie tylko wazniejsze/bardziej oblozone wezly -->
+    
+    
     <property name="biale_plamy_class_regenerate.php" value="biale_plamy_class_regenerate.php"/>
     
     <property name="ways_as_Text_z_ID_xml.xsl" value="ways_as_Text_z_ID_xml.xsl"/>
@@ -57,6 +66,43 @@
         
             <property name="biale_put_Cables_to_PE.php" value="biale_put_Cables_to_PE.php"/>
     
+    
+    <target description="shows options for project" name="help">
+        <echo> Generator for telecomunications objects - concentrations points based on constraints of prices of cable and cost of cocentrators (PE).
+            This parameters are set by variables:   Set variables ( ex. sh# ant -DPE_Price=2500 -DCable_Price=25002 -Dlogic=grouped PE_and_Cables ) 
+            
+            VARIABLES
+                PE_Price - price per concentration point - default =  ${PE_Price} 
+                Cable_Price - price per one meter of cable - default = ${Cable_Price}
+                max_combinate_groups_elements   - how many combinate points/per one group  default ${max_combinate_groups_elements}
+                    - above 20 will kill CPU ( it is alwasy 2^ {$var}
+                    logic = grouped -  set for grouping every group by param  max_combinate_groups_elements
+                    logic = sorted  - use this option to minimize analyzed points in every group, which is  weighted somehow by cost PE and cable
+                     -  ( default ${logic} )
+            
+           
+            
+            
+            TARGETS
+            
+            Maintly you should start by generatong data from php script - target: biale_plamy-generate_data
+            but it destroys all cache data. 
+            
+            By target: biale_plamy-just_xsl_PE_cables
+            You just makes files: ${joins2ways_z_ID_Way.xml} ,
+            and by target:  AsTextToXml : 
+                ${ways_as_Text_z_ID_xml.xml}, ${joins_asText_xml.xml}
+                ${edge_joins.xml} , ${edge_joins_filled_paths.xml}   
+            and 
+            also : 
+            by target "PE_and_Cables"
+                  ${edge_paths_with_PE_controll.xml}, ${edge_paths_with_PE.xml}, ${biale_plamy_put_PE_to_mysql_php}
+                  ${cables_from_joins_to_PE.xml}, ${biale_put_Cables_to_PE}
+       
+        </echo>
+        
+    </target>
+    
     <target name="check" >
         <echo message="testuje check"/>
         <condition property="test_if_INPUTxml" taskname="PROCES_TO_DITA_build" value="AVIABLE">
@@ -144,18 +190,18 @@
     
     
     <target name="check_files_for_PE_and_Cables" >
-        <echo message="czy sa wymagane pliki do wygenerowania samych PE_and_Cables"/>
+        <echo message="czy sa wymagane pliki do wygenerowania samych PE_and_Cables" />
         <condition property="files_PE_and_Cables" taskname="PE_and_Cables" value="AVIABLE">
             <available file="${points2joins.xml}" filepath="." />
-            <available file="${ways2joins.xml}" filepath="." />
+         <!--   <available file="${ways2joins.xml}" filepath="." />
             <available file="${edge_joins_filled_paths.xml}" filepath="." />
             <available file="${points_asText.xml}" filepath="." />
-            <available file="${joins2ways_z_ID_Way.xml}" filepath="." />
+            <available file="${joins2ways_z_ID_Way.xml}" filepath="." />-->
         </condition>
     </target>
     
     
-    <target name="PE_and_Cables">
+    <target name="PE_and_Cables" depends="check_files_for_PE_and_Cables">
         <antcall target="edge_paths_with_PE_controll.xml"/>
         <antcall target="edge_paths_with_PE.xml"/>
         <antcall target="biale_plamy_put_PE_to_mysql_php"/>
@@ -326,6 +372,15 @@
             <param name="edge_paths_with_PE.xml" expression="${edge_paths_with_PE.xml}"/>
             <param name="edge_paths_with_PE_controll_temp" expression="${edge_paths_with_PE_controll_temp}"/>
             <param name="edge_paths_with_PE_controll_temp.alias" expression="${edge_paths_with_PE_controll_temp.alias}"/>
+            
+            
+            <param name="PE_Price" expression="${PE_Price}"/>
+            <param name="Cable_Price" expression="${Cable_Price}"/>
+            <param name="max_combinate_groups_elements" expression="${max_combinate_groups_elements}"/> <!-- po ile wezlow mamy grupowac do wyliczania kombinacji kosztow -->
+            <param name="logic" expression="${logic}'"/>
+            <!--<xsl:param name="logic" select="'sorted'"/>--> <!-- tutaj robi grupy ale analizyje w grupie tylko wazniejsze/bardziej oblozone wezly -->
+            
+            
         </xslt>
     </target>
    
@@ -409,7 +464,55 @@
     </target>-->
    
     <!--<target name="install_file_and_exec"/>-->
-   
+    <!--sh#: ant bootstrap -Darg1=value1 -Darg2=value2 -Darg3=value3
+        or
+        sh#: ant bootstrap -Dargs=value1,value2,value3,...
+        
+       <target name="bootstrap">
+            <echo>${arg0} ${arg1} ${arg2} </echo>
+             <exec executable="cmd">
+                <arg value="${arg0}"/>
+                <arg value="${arg1}"/>
+                <arg value="${arg2}"/>
+             </exec>
+        </target>
+    
+    -->
+    
+    <!--<taskdef uri="antlib:net.sf.antcontrib" resource="net/sf/antcontrib/antlib.xml" classpath="path/to/ant-contrib.jar"/>-->
+    
+    <!-- How to pass parameter to ant scripts?
+        
+        Using Java System Property
+    
+    You can pass a variable as a JVM argument. Assuming you have a variable named "screenShotRoot" defined like this
+    
+    ant -DscreenShotRoot=/screenshots/testcases
+    you can read it in your build.xml like this
+    
+    <property name="screenshot.root" value="${screenShotRoot}" />
+    Your ANT task can then use this root path to generate appropriate paths to your PNG files on the date expected.
+    
+    See this Apache ANT FAQ page
+    
+    Using Environment Variables
+    
+    You can also use Operating System environment variables, by setting them before calling your script. Assuming you have an environment variable named "screenShotRoot" defined like this on Windows
+    
+    SET screenShotRoot=/screenshots/testcases
+    you can read it in your build.xml like this
+    
+    <property environment="env"/>
+    <property name="screenshot.root" value="${env.screenShotRoot}" />
+    Using Properties Files
+    
+    You could also write your links into a properties file that your ANT script loads, like this
+    
+    <property file="build.properties"/>-->
+    
+    <!--<property name="biale_plamy-prepare_sql_data.php" value="biale_plamy-prepare_sql_data.php"/>-->
+    
+    
    
    
     <target name="check-info" if="test_if_INPUTxml">