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}/main/${branch.path}/greenstone3" destPath="compiled" revision="${branch.revision}"/>
|
---|
100 | </svn>
|
---|
101 | </target>
|
---|
102 |
|
---|
103 | <target name="export-greenstone3">
|
---|
104 | <svn>
|
---|
105 | <export srcUrl="${svn.root}/main/${branch.path}/greenstone3" destPath="${dest}" revision="${branch.revision}"/>
|
---|
106 | </svn>
|
---|
107 | </target>
|
---|
108 |
|
---|
109 | <target name="insert-xml-parser">
|
---|
110 | <copy todir="compiled/gs2build/perllib/cpan">
|
---|
111 | <fileset dir="${rk.home}/greenstone3" includes="XML-Parser/**/*"/>
|
---|
112 | </copy>
|
---|
113 | </target>
|
---|
114 |
|
---|
115 | <target name="insert-documented-examples">
|
---|
116 | <echo>NOT IMPLEMENTED: Remember to put code in this target to grab and install the documented examples.</echo>
|
---|
117 | <!-- copy the doc eg colls from /home/nzdl - note we don't include the formatting ones -->
|
---|
118 | </target>
|
---|
119 |
|
---|
120 | <target name="prepare-documentation">
|
---|
121 |
|
---|
122 | <mkdir dir="compiled/gsdl-manuals"/>
|
---|
123 | <svn>
|
---|
124 | <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="compiled/gsdl-manuals/manuals"/>
|
---|
125 | <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="compiled/gsdl-manuals/shared"/>
|
---|
126 | </svn>
|
---|
127 | <path id="documentation.compile.classpath">
|
---|
128 | <fileset dir="compiled/gsdl-manuals">
|
---|
129 | <include name="**/*.jar"/>
|
---|
130 | </fileset>
|
---|
131 | <pathelement path="compiled/gsdl-manuals/shared"/>
|
---|
132 | <pathelement path="compiled/gsdl-manuals/manuals"/>
|
---|
133 | </path>
|
---|
134 | <javac srcdir="compiled/gsdl-manuals/shared"
|
---|
135 | destdir="compiled/gsdl-manuals/shared"
|
---|
136 | debug="on"
|
---|
137 | classpathref="documentation.compile.classpath">
|
---|
138 | <include name="*.java"/>
|
---|
139 | </javac>
|
---|
140 | <unzip src="compiled/gsdl-manuals/shared/fop.zip" dest="compiled/gsdl-manuals/shared"/>
|
---|
141 |
|
---|
142 | <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="compiled/gsdl-manuals/manuals/xml-source/en/help-en.xml">
|
---|
143 | <arg value="compiled/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" />
|
---|
144 | <arg value="compiled/gli/help/en/help.xml" />
|
---|
145 | <arg value="compiled" />
|
---|
146 | </java>
|
---|
147 |
|
---|
148 | <chmod perm="a+x" file="compiled/gsdl-manuals/shared/fop/fop.sh"/>
|
---|
149 | <echo>Run generate-pdf script</echo>
|
---|
150 | <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
|
---|
151 | <exec dir="compiled/gsdl-manuals/manuals" executable="cmd">
|
---|
152 | <arg value="/C" />
|
---|
153 | <arg file="${basedir}/compiled/gsdl-manuals/manuals/generate-pdf.bat" />
|
---|
154 | <arg value="u" />
|
---|
155 | <arg value="en" />
|
---|
156 | </exec>
|
---|
157 | <else>
|
---|
158 | <exec dir="compiled/gsdl-manuals/manuals" executable="/bin/bash">
|
---|
159 | <arg line="generate-pdf.sh u en" />
|
---|
160 | </exec>
|
---|
161 | </else></if>
|
---|
162 | </target>
|
---|
163 |
|
---|
164 | <target name="clean">
|
---|
165 | <antcall target="clean-compiled"/>
|
---|
166 | <antcall target="clean-distributions"/>
|
---|
167 | <antcall target="clean-components"/>
|
---|
168 | <antcall target="clean-installer"/>
|
---|
169 | <antcall target="clean-wrapped-installer"/>
|
---|
170 | </target>
|
---|
171 |
|
---|
172 | <target name="clean-compiled">
|
---|
173 | <delete dir="compiled"/>
|
---|
174 | </target>
|
---|
175 |
|
---|
176 | <target name="clean-distribution">
|
---|
177 | <delete dir="distributions"/>
|
---|
178 | </target>
|
---|
179 |
|
---|
180 | <target name="clean-components">
|
---|
181 | <delete dir="components"/>
|
---|
182 | </target>
|
---|
183 |
|
---|
184 | <target name="clean-installer">
|
---|
185 | <delete dir="installer"/>
|
---|
186 | </target>
|
---|
187 |
|
---|
188 | <target name="clean-wrapped-installer">
|
---|
189 | <delete dir="wrapped-installer"/>
|
---|
190 | </target>
|
---|
191 |
|
---|
192 | <target name="clean-user-manual">
|
---|
193 | <copy file="distributions/web/gsdl-manuals/manuals/build/en/pdf/User_en.pdf" tofile="distributions/web/docs/manual/gs2_user_en.pdf"/>
|
---|
194 | <delete dir="distributions/web/gsdl-manuals"/>
|
---|
195 | </target>
|
---|
196 |
|
---|
197 | <target name="clean-uninstaller">
|
---|
198 | <delete dir="distributions/web/uninstaller"/>
|
---|
199 | </target>
|
---|
200 |
|
---|
201 | <target name="insert-windows-icon">
|
---|
202 | <copy
|
---|
203 | file="${rk3.home}/greenstone3/icon/icon.ico"
|
---|
204 | tofile="compiled/resources/images/gs3.ico"/>
|
---|
205 | </target>
|
---|
206 |
|
---|
207 |
|
---|
208 |
|
---|
209 |
|
---|
210 | </project>
|
---|