[18736] | 1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
| 2 | <!--
|
---|
| 3 | ..........................................................
|
---|
| 4 | March 2009
|
---|
| 5 | CD Release Kit for Greenstone2 (cdrk2)
|
---|
| 6 | Oran Fry
|
---|
| 7 | ..........................................................
|
---|
| 8 | -->
|
---|
| 9 |
|
---|
| 10 | <project name="cdrk2-build" default="cdrk2">
|
---|
| 11 |
|
---|
| 12 | <!-- CONSTANTS -->
|
---|
| 13 |
|
---|
| 14 | <!-- for the benefit of the shared scripts, set release-kit home -->
|
---|
| 15 | <property name="rk.name" value="cdrk2"/>
|
---|
| 16 | <property name="rk.home" value="${cdrk2.home}" />
|
---|
| 17 | <property name="rk.os" value="multi" />
|
---|
| 18 | <property name="os.suffix" value="AnyPlatform"/>
|
---|
| 19 |
|
---|
| 20 | <!-- IMPORT OTHER ANT SCRIPTS -->
|
---|
[19006] | 21 | <import file="../core/ant-scripts/init.xml"/>
|
---|
[18736] | 22 | <import file="../greenstone2/ant-scripts/rk2-targets.xml"/>
|
---|
| 23 |
|
---|
[18768] | 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"/>
|
---|
| 28 |
|
---|
[18736] | 29 | <!-- THE MAIN TARGET -->
|
---|
| 30 | <target name="cdrk2" depends="init">
|
---|
[18768] | 31 | <antcall target="checkout-and-compile-documentation"/>
|
---|
| 32 | <antcall target="build-tutorials"/>
|
---|
| 33 | <antcall target="build-documentation"/>
|
---|
[18737] | 34 | <antcall target="export-documented-example-collections"/>
|
---|
[18768] | 35 | <antcall target="insert-readmes"/>
|
---|
| 36 | <antcall target="insert-software"/>
|
---|
| 37 | <antcall target="create-image"/>
|
---|
| 38 | </target>
|
---|
[18737] | 39 |
|
---|
[19039] | 40 | <target name="properties">
|
---|
| 41 | <echo>Required Properties:</echo>
|
---|
| 42 | <echo>version the version string for the release</echo>
|
---|
| 43 | <echo/>
|
---|
| 44 | </target>
|
---|
| 45 |
|
---|
| 46 |
|
---|
[18768] | 47 | <target name="checkout-and-compile-documentation">
|
---|
| 48 | <svn>
|
---|
| 49 | <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="documentation/shared"/>
|
---|
| 50 | </svn>
|
---|
| 51 | <javac srcdir="documentation/shared" destdir="documentation/shared" debug="on">
|
---|
| 52 | <include name="*.java"/>
|
---|
| 53 | </javac>
|
---|
| 54 |
|
---|
[18736] | 55 | </target>
|
---|
| 56 |
|
---|
[18768] | 57 | <target name="build-tutorials">
|
---|
| 58 | <svn>
|
---|
| 59 | <checkout url="${svn.root}/documentation/${branch.path}/tutorials" destPath="documentation/tutorials"/>
|
---|
| 60 | <checkout url="${svn.root}/gli/${branch.path}" destPath="documentation/gli"/>
|
---|
| 61 | <checkout url="${svn.root}/gsdl/${branch.path}/perllib" destPath="documentation/perllib"/>
|
---|
| 62 | <checkout url="${svn.root}/gsdl/${branch.path}/macros" destPath="documentation/macros"/>
|
---|
| 63 | </svn>
|
---|
| 64 |
|
---|
| 65 | <delete dir="documentation/tutorials/html"/>
|
---|
| 66 | <exec dir="documentation/tutorials" executable="/bin/bash">
|
---|
| 67 | <arg value="generate-html.sh"/>
|
---|
| 68 | <env key="GSDLHOME" value="${basedir}/documentation"/>
|
---|
| 69 | </exec>
|
---|
| 70 |
|
---|
| 71 | <delete dir="cdrom/Tutorial Exercises"/>
|
---|
| 72 | <copy todir="cdrom/Tutorial Exercises/English"><fileset dir="documentation/tutorials/html/en"/></copy>
|
---|
| 73 | <copy todir="cdrom/Tutorial Exercises/French"><fileset dir="documentation/tutorials/html/fr"/></copy>
|
---|
| 74 | <copy todir="cdrom/Tutorial Exercises/Spanish"><fileset dir="documentation/tutorials/html/es"/></copy>
|
---|
| 75 | <copy todir="cdrom/Tutorial Exercises/Russian"><fileset dir="documentation/tutorials/html/ru"/></copy>
|
---|
| 76 | </target>
|
---|
| 77 |
|
---|
| 78 | <target name="build-documentation">
|
---|
| 79 | <svn>
|
---|
| 80 | <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="documentation/manuals"/>
|
---|
| 81 | <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="documentation/shared"/>
|
---|
| 82 | <checkout url="${svn.root}/gli/${branch.path}" destPath="documentation/gli"/>
|
---|
| 83 | </svn>
|
---|
| 84 | <unzip src="documentation/shared/fop.zip" dest="documentation/shared"/>
|
---|
| 85 | <chmod perm="a+x" file="documentation/shared/fop/fop.sh"/>
|
---|
| 86 |
|
---|
| 87 | <antcall target="generate-gli-chapter"><param name="language" value="en"/></antcall>
|
---|
| 88 | <antcall target="generate-gli-chapter"><param name="language" value="fr"/></antcall>
|
---|
| 89 | <antcall target="generate-gli-chapter"><param name="language" value="es"/></antcall>
|
---|
| 90 | <antcall target="generate-gli-chapter"><param name="language" value="ru"/></antcall>
|
---|
| 91 |
|
---|
| 92 | <delete dir="documentation/manuals/build"/>
|
---|
| 93 | <exec dir="documentation/manuals" executable="/bin/bash">
|
---|
| 94 | <arg value="generate-pdf.sh"/>
|
---|
| 95 | <arg value="all"/>
|
---|
| 96 | <arg value="en es ru fr"/>
|
---|
| 97 | </exec>
|
---|
| 98 |
|
---|
| 99 | <exec spawn="true" dir="documentation/manuals" executable="/bin/bash">
|
---|
| 100 | <arg value="generate-pdf.sh"/>
|
---|
| 101 | <arg value="Install"/>
|
---|
| 102 | <arg value="ar"/>
|
---|
| 103 | </exec>
|
---|
| 104 |
|
---|
| 105 | <delete dir="cdrom/Documentation"/>
|
---|
| 106 | <copy todir="cdrom/Documentation/English"><fileset dir="documentation/manuals/build/en/pdf"/></copy>
|
---|
| 107 | <copy todir="cdrom/Documentation/French"><fileset dir="documentation/manuals/build/fr/pdf"/></copy>
|
---|
| 108 | <copy todir="cdrom/Documentation/Spanish"><fileset dir="documentation/manuals/build/es/pdf"/></copy>
|
---|
| 109 | <copy todir="cdrom/Documentation/Russian"><fileset dir="documentation/manuals/build/ru/pdf"/></copy>
|
---|
| 110 | <copy todir="cdrom/Documentation/Arabic"><fileset dir="documentation/manuals/build/ar/pdf"/></copy>
|
---|
| 111 | </target>
|
---|
| 112 |
|
---|
[18737] | 113 | <target name="export-documented-example-collections">
|
---|
| 114 | <svn>
|
---|
[18768] | 115 | <export srcurl="${svn.root}/documented-example-collections/${branch.path}" destPath="cdrom/Documented Example Collections"/>
|
---|
[18737] | 116 | </svn>
|
---|
| 117 | </target>
|
---|
| 118 |
|
---|
[18768] | 119 |
|
---|
| 120 | <target name="generate-gli-chapter">
|
---|
| 121 | <path id="documentation.compile.classpath">
|
---|
| 122 | <fileset dir="documentation">
|
---|
| 123 | <include name="**/*.jar"/>
|
---|
| 124 | </fileset>
|
---|
| 125 | <pathelement path="documentation/gli/classes"/>
|
---|
| 126 | <pathelement path="documentation/shared"/>
|
---|
| 127 | <pathelement path="documentation/manuals"/>
|
---|
| 128 | </path>
|
---|
| 129 | <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="documentation/manuals/xml-source/${language}/help-${language}.xml">
|
---|
| 130 | <arg value="documentation/manuals/processing/gen-gli-help-to-manual-chapter.xsl" />
|
---|
| 131 | <arg value="documentation/gli/help/${language}/help.xml" />
|
---|
| 132 | <arg value="compiled" />
|
---|
| 133 | </java>
|
---|
| 134 | <copy file="documentation/manuals/xml-source/${language}/help-${language}.xml" todir="documentation/manuals"/>
|
---|
| 135 | </target>
|
---|
| 136 |
|
---|
| 137 | <target name="insert-readmes">
|
---|
| 138 | <copy todir="cdrom"><fileset dir="${rk.home}/greenstone2/docs"/></copy>
|
---|
| 139 | <antcall target="gsdl-set-dates-in-readmes"><param name="gsdl.basedir" value="${basedir}/cdrom"/></antcall>
|
---|
| 140 | </target>
|
---|
| 141 |
|
---|
| 142 | <target name="insert-software">
|
---|
| 143 | <antcall target="insert-software-linux"/>
|
---|
| 144 | <antcall target="insert-software-windows"/>
|
---|
| 145 | <!--
|
---|
| 146 | <antcall target="insert-software-mac"/>
|
---|
| 147 | -->
|
---|
| 148 | </target>
|
---|
| 149 |
|
---|
| 150 | <target name="insert-software-linux">
|
---|
| 151 | <mkdir dir="cdrom/Software"/>
|
---|
| 152 | <mkdir dir="software"/>
|
---|
| 153 | <get src="${software.archive.linux}" dest="software/linux.tar.gz"/>
|
---|
| 154 | <untar src="software/linux.tar.gz" dest="cdrom/Software" compression="gzip" overwrite="true"/>
|
---|
| 155 | </target>
|
---|
| 156 |
|
---|
| 157 | <target name="insert-software-windows">
|
---|
| 158 | <mkdir dir="cdrom/Software"/>
|
---|
| 159 | <mkdir dir="software"/>
|
---|
| 160 | <get src="${software.archive.windows}" dest="software/windows.tar.gz"/>
|
---|
| 161 | <untar src="software/windows.tar.gz" dest="cdrom/Software" compression="gzip" overwrite="true"/>
|
---|
| 162 | </target>
|
---|
| 163 |
|
---|
| 164 | <target name="create-image">
|
---|
[18847] | 165 |
|
---|
[18768] | 166 | <mkdir dir="products"/>
|
---|
[18847] | 167 |
|
---|
[18768] | 168 | <exec executable="mkisofs">
|
---|
| 169 | <arg value="-input-charset"/>
|
---|
| 170 | <arg value="utf-8"/>
|
---|
| 171 | <arg value="-o"/>
|
---|
[18847] | 172 | <arg value="products/Greenstone-${version}-cdrom.iso"/>
|
---|
[18768] | 173 | <arg value="-J"/>
|
---|
| 174 | <arg value="-R"/>
|
---|
| 175 | <arg value="-D"/>
|
---|
| 176 | <arg value="cdrom"/>
|
---|
| 177 | </exec>
|
---|
[18847] | 178 |
|
---|
| 179 | <!--
|
---|
| 180 | <exec executable="/bin/bash" dir="products">
|
---|
| 181 | <arg value="-c"/>
|
---|
| 182 | <arg value="cat Greenstone-${version}-cdrom.iso | gzip > Greenstone-${version}-cdrom.iso.gz"/>
|
---|
| 183 | </exec>
|
---|
| 184 | -->
|
---|
| 185 |
|
---|
| 186 | <exec executable="/bin/bash" dir="products">
|
---|
| 187 | <arg value="-c"/>
|
---|
| 188 | <arg value="zip Greenstone-${version}-cdrom.zip Greenstone-${version}-cdrom.iso"/>
|
---|
| 189 | </exec>
|
---|
| 190 |
|
---|
[18768] | 191 | </target>
|
---|
| 192 |
|
---|
[18736] | 193 | </project>
|
---|