Ignore:
Timestamp:
2009-07-09T12:23:55+12:00 (15 years ago)
Author:
oranfry
Message:

use the genralised targets to create components

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release-kits/wirk3/ant-scripts/create-components.xml

    r19958 r19981  
    22<project name="wirk3-create-components" default="create-components">
    33
     4       <import file="${basedir}/distributions/web/resources/xml/components.xml"/>
     5       <import file="${rk.home}/greenstone3/ant-scripts/rk3-targets.xml"/>
     6
    47    <!-- create components from the distributions folder -->
    58
    6     <!-- 1st level -->
    79    <target name="create-components">
    810        <antcall target="prepare-components" />
     
    1012    </target>
    1113
    12     <!-- 2nd level -->
    1314    <target name="prepare-components">
    14         <antcall target="prepare-core-component" />
    15         <antcall target="prepare-imagemagick-component" />
    16         <antcall target="prepare-ghostscript-component" />
    17         <antcall target="prepare-ant-component" />
    18         <antcall target="prepare-tomcat-component" />
     15        <antcall target="prepare-component"><param name="component" value="core"/></antcall>
     16        <antcall target="prepare-component"><param name="component" value="ant"/></antcall>
     17        <antcall target="prepare-component"><param name="component" value="tomcat"/></antcall>
     18        <antcall target="prepare-component"><param name="component" value="imagemagick"/></antcall>
     19        <antcall target="prepare-component"><param name="component" value="ghostscript"/></antcall>
     20    </target>
    1921
    20     </target>
    21    
    2222    <target name="compress-components">
    23         <antcall target="compress-core-component" />
    24         <antcall target="compress-imagemagick-component" />
    25         <antcall target="compress-ghostscript-component" />
    26         <antcall target="compress-ant-component" />
    27         <antcall target="compress-tomcat-component" />
    28     </target>
    29    
    30     <!-- 3rd level -->
    31     <target name="prepare-core-component">
    32 
    33         <!-- delete old stuff to create new components -->
    34         <delete dir="components/tmp/core" quiet="true"/>
    35         <mkdir dir="components/tmp/core"/>
    36                
    37         <copy todir="components/tmp/core" overwrite="true">
    38             <fileset dir="distributions/web">
    39                 <include name="**/*"/>
    40 
    41                 <!-- exclude ghostscript -->
    42                 <exclude name="gs2build/bin/windows/ghostscript/**/*"/>
    43                 <exclude name="gs2build/bin/windows/ghostscript"/>
    44 
    45                 <!-- exclude imagemagick -->
    46                 <exclude name="gs2build/bin/windows/imagemagick/**/*"/>
    47                 <exclude name="gs2build/bin/windows/imagemagick"/>
    48 
    49                 <!-- exclude sourcecode -->
    50                 <exclude name="src/**/*"/>
    51                 <exclude name="src"/>
    52                 <exclude name="gs2build/common-src/**/*"/>
    53                 <exclude name="gs2build/common-src"/>
    54                 <exclude name="gs2build/build-src/**/*"/>
    55                 <exclude name="gs2build/build-src"/>
    56                 <exclude name="gs2build/runtime-src/**/*"/>
    57                 <exclude name="gs2build/runtime-src"/>
    58                
    59                 <!-- exclude ant -->
    60                 <exclude name="packages/ant/**/*"/>
    61                 <exclude name="packages/ant"/>
    62 
    63                 <!-- exclude tomcat -->
    64                 <exclude name="packages/tomcat/**/*"/>
    65                 <exclude name="packages/tomcat"/>
    66 
    67             </fileset>
    68         </copy>
    69                
    70         <zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" />
    71     </target>
    72    
    73    
    74     <target name="compress-core-component">
    75         <exec executable="${wirk3.home}/windows/7za/7za.exe" dir="components"><arg line="a -t7z -mx=9 core.lzma core.comp"/></exec>
    76     </target>
    77    
    78    
    79    
    80     <target name="prepare-imagemagick-component">
    81         <delete dir="components/tmp/imagemagick" quiet="true"/>
    82         <mkdir dir="components/tmp/imagemagick"/>
    83         <copy todir="components/tmp/imagemagick" overwrite="true">
    84             <fileset dir="distributions/web">
    85                 <include name="gs2build/bin/windows/imagemagick/**/*"/>
    86             </fileset>
    87         </copy>
    88        
    89         <zip destfile="components/imagemagick.comp" basedir="components/tmp/imagemagick" compress="false" />
    90     </target>
    91        
    92     <target name="compress-imagemagick-component">
    93         <exec executable="${wirk3.home}/windows/7za/7za.exe" dir="components"><arg line="a -t7z -mx=9 imagemagick.lzma imagemagick.comp"/></exec>
    94     </target>
    95    
    96    
    97    
    98     <target name="prepare-ghostscript-component">
    99         <delete dir="components/tmp/ghostscript" quiet="true"/>
    100         <mkdir dir="components/tmp/ghostscript"/>
    101         <copy todir="components/tmp/ghostscript" overwrite="true">
    102             <fileset dir="distributions/web">
    103                 <include name="gs2build/bin/windows/ghostscript/**/*"/>
    104             </fileset>
    105         </copy>
    106        
    107         <zip destfile="components/ghostscript.comp" basedir="components/tmp/ghostscript" compress="false" />
    108     </target>
    109        
    110     <target name="compress-ghostscript-component">
    111         <exec executable="${wirk3.home}/windows/7za/7za.exe" dir="components"><arg line="a -t7z -mx=9 ghostscript.lzma ghostscript.comp"/></exec>
    112     </target>
    113    
    114     <target name="prepare-sourcecode-component">
    115         <delete dir="components/tmp/sourcecode" quiet="true"/>
    116         <mkdir dir="components/tmp/sourcecode"/>
    117         <copy todir="components/tmp/sourcecode" overwrite="true">
    118             <fileset dir="distributions/web">
    119                 <include name="src/**/*"/>
    120                 <include name="gs2build/common-src/**/*"/>
    121                 <include name="gs2build/build-src/**/*"/>
    122                 <include name="gs2build/runtime-src/**/*"/>
    123             </fileset>
    124         </copy>
    125 
    126         <mkdir dir="products"/>
    127         <zip destfile="products/Greenstone-${version}-${os.suffix}-sourcecode-component.zip" basedir="components/tmp/sourcecode" compress="true"/>
    128     </target>
    129        
    130     <target name="compress-sourcecode-component">
    131         <exec executable="${wirk3.home}/windows/7za/7za.exe" dir="components"><arg line="a -t7z -mx=9 sourcecode.lzma sourcecode.comp"/></exec>
    132     </target>
    133    
    134     <target name="prepare-ant-component">
    135         <delete dir="components/tmp/ant" quiet="true"/>
    136         <mkdir dir="components/tmp/ant"/>
    137 
    138         <copy todir="components/tmp/ant" overwrite="true">
    139             <fileset dir="distributions/web">
    140                 <include name="packages/ant/**/*"/>
    141             </fileset>
    142         </copy>
    143        
    144         <zip destfile="components/ant.comp" basedir="components/tmp/ant" compress="false" />
    145     </target>
    146        
    147     <target name="compress-ant-component">
    148         <exec executable="${wirk3.home}/windows/7za/7za.exe" dir="components"><arg line="a -t7z -mx=9 ant.lzma ant.comp"/></exec>
    149     </target>
    150        
    151     <target name="prepare-tomcat-component">
    152         <delete dir="components/tmp/tomcat" quiet="true"/>
    153         <mkdir dir="components/tmp/tomcat"/>
    154         <copy todir="components/tmp/tomcat" overwrite="true">
    155             <fileset dir="distributions/web">
    156                 <include name="packages/tomcat/**/*"/>
    157             </fileset>
    158         </copy>
    159        
    160         <zip destfile="components/tomcat.comp" basedir="components/tmp/tomcat" compress="false" />
    161     </target>
    162        
    163     <target name="compress-tomcat-component">
    164         <exec executable="${wirk3.home}/windows/7za/7za.exe" dir="components"><arg line="a -t7z -mx=9 tomcat.lzma tomcat.comp"/></exec>
    165     </target>   
     23                <antcall target="compress-component"><param name="component" value="core"/></antcall>
     24                <antcall target="compress-component"><param name="component" value="ant"/></antcall>
     25                <antcall target="compress-component"><param name="component" value="tomcat"/></antcall>
     26                <antcall target="compress-component"><param name="component" value="imagemagick"/></antcall>
     27                <antcall target="compress-component"><param name="component" value="ghostscript"/></antcall>
     28    </target>
    16629
    16730</project>
Note: See TracChangeset for help on using the changeset viewer.