1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
2 | <!--
|
---|
3 | ..........................................................
|
---|
4 | August 2008
|
---|
5 | Targets for Greenstone3 release kits
|
---|
6 | Oran Fry
|
---|
7 | ..........................................................
|
---|
8 | -->
|
---|
9 |
|
---|
10 | <project name="rk3-targets">
|
---|
11 |
|
---|
12 | <property name="version.major" value="3"/>
|
---|
13 |
|
---|
14 | <!-- create the property set to be forwarded to greenstone3 -->
|
---|
15 | <propertyset id="forward.properties">
|
---|
16 | <propertyref prefix="forward."/>
|
---|
17 | <mapper type="glob" from="forward.*" to="*"/>
|
---|
18 | <propertyref name="app.version"/>
|
---|
19 | <propertyref name="branch.path"/>
|
---|
20 | <propertyref name="branch.revision"/>
|
---|
21 | </propertyset>
|
---|
22 |
|
---|
23 | <target name="greenstone3-set-version-numbers">
|
---|
24 | <rsr
|
---|
25 | file="${greenstone3basedir}/resources/java/global.properties.in"
|
---|
26 | pattern="@gsdl3version@"
|
---|
27 | replacement="${version}" />
|
---|
28 | <rsr
|
---|
29 | file="${greenstone3basedir}/resources/java/server.properties"
|
---|
30 | pattern="^(Server3Control\.Version=).*$"
|
---|
31 | replacement="$1${version}" />
|
---|
32 |
|
---|
33 | </target>
|
---|
34 |
|
---|
35 | <target name="gs3-init">
|
---|
36 |
|
---|
37 | <!-- don't let greenstone3 block and wait for user input to accept
|
---|
38 | the properties for the build -->
|
---|
39 | <property name="forward.properties.accepted" value="true"/>
|
---|
40 |
|
---|
41 | <!-- make sure all c++ compilation is done statically on linux -->
|
---|
42 | <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
|
---|
43 | <property name="forward.compile.static" value="true"/>
|
---|
44 | </if>
|
---|
45 |
|
---|
46 | <!-- show the property set to be forwarded to greenstone3 -->
|
---|
47 | <echo>Properties to be forwarded to greenstone3 build</echo>
|
---|
48 | <echoproperties><propertyset refid="forward.properties"/></echoproperties>
|
---|
49 |
|
---|
50 | </target>
|
---|
51 |
|
---|
52 | <target name="insert-uninstaller-jar">
|
---|
53 | <copy file="compiled/uninst.jar" tofile="distributions/web/uninst.jar"/>
|
---|
54 | </target>
|
---|
55 |
|
---|
56 | <!--
|
---|
57 | inserts a copy of the release kit's own ant into the greenstone3
|
---|
58 | installation. the ant from the release kit is minified so is a good choice.
|
---|
59 | -->
|
---|
60 | <target name="insert-ant">
|
---|
61 |
|
---|
62 | <!-- remove any existing ant -->
|
---|
63 | <delete dir="compiled/packages/ant"/>
|
---|
64 |
|
---|
65 | <!-- windows copy -->
|
---|
66 | <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
|
---|
67 | <copy todir="compiled/packages">
|
---|
68 | <fileset dir="${rk.home}/core" includes="ant/**/*"/>
|
---|
69 | </copy>
|
---|
70 |
|
---|
71 | <!-- linux, mac copy-->
|
---|
72 | <else><if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
|
---|
73 | <exec executable="cp">
|
---|
74 | <arg value="-r"/>
|
---|
75 | <arg value="${rk.home}/core/ant"/>
|
---|
76 | <arg value="compiled/packages"/>
|
---|
77 | </exec>
|
---|
78 |
|
---|
79 | <!-- otherwise fail -->
|
---|
80 | <else>
|
---|
81 | <fail>this target does not support the current os</fail>
|
---|
82 |
|
---|
83 | </else></if></else></if>
|
---|
84 |
|
---|
85 | </target>
|
---|
86 |
|
---|
87 | <target name="generate-build-properties">
|
---|
88 | <copy file="${greenstone3.basedir}/build.properties.in" tofile="${greenstone3.basedir}/build.properties"/>
|
---|
89 | <if><bool><istrue value="${install.flax}"/></bool>
|
---|
90 | <rsr file="${greenstone3.basedir}/build.properties" pattern="^#install.flax\s*[=:].*" replacement="install.flax=true"/>
|
---|
91 | </if>
|
---|
92 | <if><bool><isset property="server.default.servlet"/></bool>
|
---|
93 | <rsr file="${greenstone3.basedir}/build.properties" pattern="^#?server.default.servlet\s*[=:].*" replacement="server.default.servlet=${server.default.servlet}"/>
|
---|
94 | </if>
|
---|
95 | </target>
|
---|
96 |
|
---|
97 | <target name="checkout-greenstone3">
|
---|
98 | <svn>
|
---|
99 | <checkout url="${svn.root}/greenstone3/${branch.path}" destPath="compiled" revision="${branch.revision}"/>
|
---|
100 | <!-- <checkout url="${svn.root}/gli/${branch.path}" destPath="compiled/gli" revision="${branch.revision}"/> -->
|
---|
101 | </svn>
|
---|
102 | </target>
|
---|
103 |
|
---|
104 | <target name="export-greenstone3">
|
---|
105 | <svn>
|
---|
106 | <export srcUrl="${svn.root}/greenstone3/${branch.path}" destPath="${dest}" revision="${branch.revision}"/>
|
---|
107 | </svn>
|
---|
108 | </target>
|
---|
109 |
|
---|
110 | <target name="insert-xml-parser">
|
---|
111 | <copy todir="compiled/gs2build/perllib/cpan">
|
---|
112 | <fileset dir="${rk.home}/greenstone3" includes="XML-Parser/**/*"/>
|
---|
113 | </copy>
|
---|
114 | </target>
|
---|
115 |
|
---|
116 | <target name="insert-documented-examples">
|
---|
117 | <echo>NOT IMPLEMENTED: Remember to put code in this target to grab and install the documented examples.</echo>
|
---|
118 | <!-- copy the doc eg colls from /home/nzdl - note we don't include the formatting ones -->
|
---|
119 | </target>
|
---|
120 |
|
---|
121 | <target name="prepare-documentation">
|
---|
122 |
|
---|
123 | <mkdir dir="compiled/gsdl-manuals"/>
|
---|
124 | <svn>
|
---|
125 | <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="compiled/gsdl-manuals/manuals"/>
|
---|
126 | <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="compiled/gsdl-manuals/shared"/>
|
---|
127 | </svn>
|
---|
128 | <path id="documentation.compile.classpath">
|
---|
129 | <fileset dir="compiled/gsdl-manuals">
|
---|
130 | <include name="**/*.jar"/>
|
---|
131 | </fileset>
|
---|
132 | <pathelement path="compiled/gsdl-manuals/shared"/>
|
---|
133 | <pathelement path="compiled/gsdl-manuals/manuals"/>
|
---|
134 | </path>
|
---|
135 | <javac srcdir="compiled/gsdl-manuals/shared"
|
---|
136 | destdir="compiled/gsdl-manuals/shared"
|
---|
137 | debug="on"
|
---|
138 | classpathref="documentation.compile.classpath">
|
---|
139 | <include name="*.java"/>
|
---|
140 | </javac>
|
---|
141 | <unzip src="compiled/gsdl-manuals/shared/fop.zip" dest="compiled/gsdl-manuals/shared"/>
|
---|
142 |
|
---|
143 | <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="compiled/gsdl-manuals/manuals/xml-source/en/help-en.xml">
|
---|
144 | <arg value="compiled/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" />
|
---|
145 | <arg value="compiled/gli/help/en/help.xml" />
|
---|
146 | <arg value="compiled" />
|
---|
147 | </java>
|
---|
148 |
|
---|
149 | <chmod perm="a+x" file="compiled/gsdl-manuals/shared/fop/fop.sh"/>
|
---|
150 | <echo>Run generate-pdf script</echo>
|
---|
151 | <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
|
---|
152 | <exec dir="compiled/gsdl-manuals/manuals" executable="cmd">
|
---|
153 | <arg value="/C" />
|
---|
154 | <arg file="${basedir}/compiled/gsdl-manuals/manuals/generate-pdf.bat" />
|
---|
155 | <arg value="u" />
|
---|
156 | <arg value="en" />
|
---|
157 | </exec>
|
---|
158 | <else>
|
---|
159 | <exec dir="compiled/gsdl-manuals/manuals" executable="/bin/bash">
|
---|
160 | <arg line="generate-pdf.sh u en" />
|
---|
161 | </exec>
|
---|
162 | </else></if>
|
---|
163 | </target>
|
---|
164 |
|
---|
165 | <target name="clean">
|
---|
166 | <antcall target="clean-compiled"/>
|
---|
167 | <antcall target="clean-distributions"/>
|
---|
168 | <antcall target="clean-components"/>
|
---|
169 | <antcall target="clean-installer"/>
|
---|
170 | <antcall target="clean-wrapped-installer"/>
|
---|
171 | </target>
|
---|
172 |
|
---|
173 | <target name="clean-compiled">
|
---|
174 | <delete dir="compiled"/>
|
---|
175 | </target>
|
---|
176 |
|
---|
177 | <target name="clean-distribution">
|
---|
178 | <delete dir="distributions"/>
|
---|
179 | </target>
|
---|
180 |
|
---|
181 | <target name="clean-components">
|
---|
182 | <delete dir="components"/>
|
---|
183 | </target>
|
---|
184 |
|
---|
185 | <target name="clean-installer">
|
---|
186 | <delete dir="installer"/>
|
---|
187 | </target>
|
---|
188 |
|
---|
189 | <target name="clean-wrapped-installer">
|
---|
190 | <delete dir="wrapped-installer"/>
|
---|
191 | </target>
|
---|
192 |
|
---|
193 | <target name="clean-user-manual">
|
---|
194 | <copy file="distributions/web/gsdl-manuals/manuals/build/en/pdf/User_en.pdf" tofile="distributions/web/docs/manual/gs2_user_en.pdf"/>
|
---|
195 | <delete dir="distributions/web/gsdl-manuals"/>
|
---|
196 | </target>
|
---|
197 |
|
---|
198 | <target name="clean-uninstaller">
|
---|
199 | <delete dir="distributions/web/uninstaller"/>
|
---|
200 | </target>
|
---|
201 |
|
---|
202 | <target name="insert-windows-icon">
|
---|
203 | <copy
|
---|
204 | file="${rk3.home}/greenstone3/icon/icon.ico"
|
---|
205 | tofile="compiled/resources/images/gs3.ico"/>
|
---|
206 | </target>
|
---|
207 |
|
---|
208 |
|
---|
209 |
|
---|
210 |
|
---|
211 | </project>
|
---|