Changeset 18768

Show
Ignore:
Timestamp:
24.03.2009 15:13:01 (10 years ago)
Author:
oranfry
Message:

more required externals and lots more functionality

Location:
release-kits/cdrk2
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • release-kits/cdrk2

    • Property svn:externals
      •  

        old new  
        11linux http://svn.greenstone.org/release-kits/shared/linux 
        2  
         2greenstone2 http://svn.greenstone.org/release-kits/shared/greenstone2 
         3lib http://svn.greenstone.org/release-kits/shared/lib 
  • release-kits/cdrk2/ant-scripts/build.xml

    r18737 r18768  
    2020    <!-- IMPORT OTHER ANT SCRIPTS --> 
    2121    <import file="shared-ant-scripts/init.xml"/> 
    22     <import file="shared-ant-scripts/operations-on-gli.xml"/> 
    2322    <import file="../greenstone2/ant-scripts/rk2-targets.xml"/> 
     23 
     24    <!-- figure out where the compiled software is coming from --> 
     25    <property name="software.archive.linux" value="http://greenstone.org/release-snapshots/cdrom-components-${version}-linux.tar.gz"/> 
     26    <property name="software.archive.windows" value="http://greenstone.org/release-snapshots/cdrom-components-${version}-windows.tar.gz"/> 
     27    <property name="software.archive.mac" value="http://greenstone.org/release-snapshots/cdrom-components-${version}-mac.tar.gz"/> 
    2428 
    2529    <!-- THE MAIN TARGET --> 
    2630    <target name="cdrk2" depends="init"> 
     31        <antcall target="checkout-and-compile-documentation"/> 
     32        <antcall target="build-tutorials"/> 
     33        <antcall target="build-documentation"/> 
    2734        <antcall target="export-documented-example-collections"/> 
     35        <antcall target="insert-readmes"/> 
     36        <antcall target="insert-software"/> 
     37        <antcall target="create-image"/> 
     38    </target> 
     39 
     40    <target name="checkout-and-compile-documentation"> 
     41        <svn> 
     42            <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="documentation/shared"/> 
     43        </svn>       
     44        <javac srcdir="documentation/shared" destdir="documentation/shared" debug="on"> 
     45            <include name="*.java"/> 
     46        </javac> 
    2847 
    2948    </target> 
    3049 
     50    <target name="build-tutorials"> 
     51        <svn> 
     52            <checkout url="${svn.root}/documentation/${branch.path}/tutorials" destPath="documentation/tutorials"/> 
     53            <checkout url="${svn.root}/gli/${branch.path}" destPath="documentation/gli"/> 
     54            <checkout url="${svn.root}/gsdl/${branch.path}/perllib" destPath="documentation/perllib"/> 
     55            <checkout url="${svn.root}/gsdl/${branch.path}/macros" destPath="documentation/macros"/> 
     56        </svn> 
     57 
     58        <delete dir="documentation/tutorials/html"/> 
     59        <exec dir="documentation/tutorials" executable="/bin/bash"> 
     60            <arg value="generate-html.sh"/> 
     61            <env key="GSDLHOME" value="${basedir}/documentation"/> 
     62        </exec> 
     63 
     64        <delete dir="cdrom/Tutorial Exercises"/> 
     65        <copy todir="cdrom/Tutorial Exercises/English"><fileset dir="documentation/tutorials/html/en"/></copy> 
     66        <copy todir="cdrom/Tutorial Exercises/French"><fileset dir="documentation/tutorials/html/fr"/></copy> 
     67        <copy todir="cdrom/Tutorial Exercises/Spanish"><fileset dir="documentation/tutorials/html/es"/></copy> 
     68        <copy todir="cdrom/Tutorial Exercises/Russian"><fileset dir="documentation/tutorials/html/ru"/></copy> 
     69    </target> 
     70 
     71    <target name="build-documentation"> 
     72        <svn> 
     73            <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="documentation/manuals"/> 
     74            <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="documentation/shared"/> 
     75            <checkout url="${svn.root}/gli/${branch.path}" destPath="documentation/gli"/> 
     76        </svn> 
     77        <unzip src="documentation/shared/fop.zip" dest="documentation/shared"/> 
     78        <chmod perm="a+x" file="documentation/shared/fop/fop.sh"/> 
     79 
     80        <antcall target="generate-gli-chapter"><param name="language" value="en"/></antcall> 
     81        <antcall target="generate-gli-chapter"><param name="language" value="fr"/></antcall> 
     82        <antcall target="generate-gli-chapter"><param name="language" value="es"/></antcall> 
     83        <antcall target="generate-gli-chapter"><param name="language" value="ru"/></antcall> 
     84 
     85        <delete dir="documentation/manuals/build"/> 
     86        <exec dir="documentation/manuals" executable="/bin/bash"> 
     87            <arg value="generate-pdf.sh"/> 
     88            <arg value="all"/> 
     89            <arg value="en es ru fr"/> 
     90        </exec> 
     91 
     92        <exec spawn="true" dir="documentation/manuals" executable="/bin/bash"> 
     93            <arg value="generate-pdf.sh"/> 
     94            <arg value="Install"/> 
     95            <arg value="ar"/> 
     96        </exec> 
     97 
     98        <delete dir="cdrom/Documentation"/> 
     99        <copy todir="cdrom/Documentation/English"><fileset dir="documentation/manuals/build/en/pdf"/></copy> 
     100        <copy todir="cdrom/Documentation/French"><fileset dir="documentation/manuals/build/fr/pdf"/></copy> 
     101        <copy todir="cdrom/Documentation/Spanish"><fileset dir="documentation/manuals/build/es/pdf"/></copy> 
     102        <copy todir="cdrom/Documentation/Russian"><fileset dir="documentation/manuals/build/ru/pdf"/></copy> 
     103        <copy todir="cdrom/Documentation/Arabic"><fileset dir="documentation/manuals/build/ar/pdf"/></copy> 
     104    </target> 
     105 
    31106    <target name="export-documented-example-collections"> 
    32         <mkdir dir="cd"/> 
    33107        <svn> 
    34             <export srcurl="${svn.root}/documented-example-collections/${branch.path}" destPath="cd"/> 
     108            <export srcurl="${svn.root}/documented-example-collections/${branch.path}" destPath="cdrom/Documented Example Collections"/> 
    35109        </svn> 
    36110    </target> 
    37111 
     112 
     113    <target name="generate-gli-chapter"> 
     114        <path id="documentation.compile.classpath"> 
     115            <fileset dir="documentation"> 
     116                <include name="**/*.jar"/> 
     117            </fileset> 
     118            <pathelement path="documentation/gli/classes"/> 
     119            <pathelement path="documentation/shared"/> 
     120            <pathelement path="documentation/manuals"/> 
     121        </path> 
     122        <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="documentation/manuals/xml-source/${language}/help-${language}.xml"> 
     123            <arg value="documentation/manuals/processing/gen-gli-help-to-manual-chapter.xsl" /> 
     124            <arg value="documentation/gli/help/${language}/help.xml" /> 
     125            <arg value="compiled" /> 
     126        </java> 
     127        <copy file="documentation/manuals/xml-source/${language}/help-${language}.xml" todir="documentation/manuals"/> 
     128    </target> 
     129 
     130    <target name="insert-readmes"> 
     131        <copy todir="cdrom"><fileset dir="${rk.home}/greenstone2/docs"/></copy> 
     132        <antcall target="gsdl-set-dates-in-readmes"><param name="gsdl.basedir" value="${basedir}/cdrom"/></antcall> 
     133    </target> 
     134 
     135    <target name="insert-software"> 
     136        <antcall target="insert-software-linux"/> 
     137        <antcall target="insert-software-windows"/> 
     138<!-- 
     139        <antcall target="insert-software-mac"/> 
     140--> 
     141    </target> 
     142 
     143    <target name="insert-software-linux"> 
     144        <mkdir dir="cdrom/Software"/> 
     145        <mkdir dir="software"/> 
     146        <get src="${software.archive.linux}" dest="software/linux.tar.gz"/> 
     147        <untar src="software/linux.tar.gz" dest="cdrom/Software" compression="gzip" overwrite="true"/> 
     148    </target> 
     149 
     150    <target name="insert-software-windows"> 
     151        <mkdir dir="cdrom/Software"/> 
     152        <mkdir dir="software"/> 
     153        <get src="${software.archive.windows}" dest="software/windows.tar.gz"/> 
     154        <untar src="software/windows.tar.gz" dest="cdrom/Software" compression="gzip" overwrite="true"/> 
     155    </target> 
     156 
     157    <target name="create-image"> 
     158        <mkdir dir="products"/> 
     159        <!-- mkisofs -o products/Greenstone-CDROM.iso -J -R -D cdrom --> 
     160        <exec executable="mkisofs"> 
     161            <arg value="-input-charset"/> 
     162            <arg value="utf-8"/> 
     163            <arg value="-o"/> 
     164            <arg value="products/Greenstone-CDROM-${version}.iso"/> 
     165            <arg value="-J"/> 
     166            <arg value="-R"/> 
     167            <arg value="-D"/> 
     168            <arg value="cdrom"/> 
     169        </exec> 
     170    </target> 
     171 
    38172</project>