source: release-kits/wirk3/ant-scripts/operations-on-gs3home.xml@ 17473

Last change on this file since 17473 was 17473, checked in by oranfry, 14 years ago

corrected a startmenu shortcut

File size: 10.0 KB
Line 
1<?xml version="1.0"?>
2
3<!-- ======================================================================
4 March 2005
5
6 Greenstone3 build and install script
7
8 kjdon
9 ====================================================================== -->
10
11<project name="opeations-on-gs3home" default="usage">
12
13 <!-- include standard build file -->
14 <import file="${basedir}/build.xml"/>
15
16 <property name="documented.collections.home" value="/home/nzdl/for-distributions/collect"/>
17 <property name="greenstone3-change-date" value="Tue Feb 20 12:13:42 NZDT 2007"/>
18 <property name="gs2build-change-date" value="Wed Dec 13 10:35:57 NZDT 2006"/>
19
20 <!-- ====================== DISTRIBUTION Targets ========================= -->
21
22 <!-- these two, do we need tomcat and axis for compilation??-->
23 <!-- Create the binaries for windows distribution -->
24 <target name="prepare-windows" depends="init">
25 <antcall target="checkout-gs2build"/>
26 <antcall target="checkout-gli"/>
27 <antcall target="unzip-windows-packages"/>
28 <antcall target="checkout-winbin"/>
29 <antcall target="get-perl-for-windows"/>
30 </target>
31
32 <target name="build-windows" depends="init">
33 <antcall target="svnupdate-distribution"/>
34 <antcall target="update-winbin"/>
35 <antcall target="get-windows-binaries"/>
36 <antcall target="compile-gs2build"/>
37 <antcall target="compile-packages"/>
38 </target>
39
40
41 <target name="create-distribution-1" depends="init" description="do all the initial downloading and setting up">
42
43 <antcall target="checkout-gs2build"/>
44 <delete file="${gli.home}/gli.sh"/>
45 <delete file="${gli.home}/gems.sh"/>
46
47 <!-- <antcall target="unzip-windows-packages"/> do we need this? -->
48 <antcall target="prepare-tomcat"/>
49 <antcall target="prepare-axis"/>
50
51
52 <!-- delete old axis dir -->
53 <delete dir="${packages.home}/axis"/>
54 <mkdir dir="${web.home}/applet"/>
55 <mkdir dir="${web.home}/logs"/>
56 <antcall target="prepare-ant"/>
57 <antcall target="prepare-collections"/>
58
59 <!-- get good XML-Parser - does this work? -->
60 <antcall target="get-xml-parser"/>
61
62 <delete>
63 <fileset dir="${packages.home}" includes="*.zip"/>
64 </delete>
65
66
67 <!-- documented collections -->
68 <antcall target="get-documented-collections"/>
69
70 <delete file="${basedir}/README-CVS.txt"/>
71 <delete file="${basedir}/TODO.txt"/>
72
73 <!-- create extra directories necessary the releases -->
74 <mkdir dir="${gs2build.home}/source"/>
75
76 </target>
77
78 <target name="create-distribution-2" description="do all the compilation">
79 <!-- compile the java stuff -->
80 <antcall target="compile-web"/>
81 <antcall target="compile-packages-and-indexers-javaonly"/>
82 <antcall target="distclean-packages"/>
83 <antcall target="compile-core"/>
84 <antcall target="compile-gli"/>
85 </target>
86
87 <target name="create-distribution-3" depends="init" description="Do the rearranging of source code etc">
88
89 <!-- put gs2build source code in a tidy place -->
90 <move todir="${gs2build.home}/source/src" failonerror="false"><fileset dir="${gs2build.home}/src" defaultexcludes="no"/></move>
91 <move todir="${gs2build.home}/source/lib" failonerror="false"><fileset dir="${gs2build.home}/lib" defaultexcludes="no"/></move>
92 <move todir="${gs2build.home}/source/packages" failonerror="false"><fileset dir="${gs2build.home}/packages" defaultexcludes="no"/></move>
93 <move todir="${gs2build.home}/source/indexers" failonerror="false"><fileset dir="${gs2build.home}/indexers" defaultexcludes="no"/></move>
94 <move file="${gs2build.home}/win32.mak" tofile="${gs2build.home}/source/win32.mak"/>
95 <!--<move file="${gs2build.home}/setup.bat" tofile="${gs2build.home}/source/setup.bat"/>-->
96 <!--<move file="${gs2build.home}/win32cfg.h" tofile="${gs2build.home}/source/win32cfg.h"/>-->
97
98 <!-- clean up -->
99 <delete includeemptydirs="true">
100 <fileset dir="${basedir}" defaultexcludes="false">
101 <include name="**/.svn/**" />
102 <include name="**/.svn/" />
103 <include name=".svn/**" />
104 <include name=".svn/" />
105 </fileset>
106 </delete>
107 <delete><fileset dir="${basedir}" includes="*.sh"/></delete>
108 <delete><fileset dir="${basedir}/gli" includes="*.sh"/></delete>
109 <delete><fileset dir="${basedir}/gs2build" includes="*.sh"/></delete>
110 <delete><fileset dir="${basedir}/bin/script" includes="*.sh"/></delete>
111
112 <delete dir="${basedir}/build"/>
113 <delete dir="${basedir}/lib/jni"/>
114 <delete dir="${basedir}/dist-resources"/>
115 <delete dir="${basedir}/gs2build/source"/>
116
117 <delete>
118 <fileset dir="${gs2build.home}">
119 <include name="config*"/>
120 <include name="ac*"/>
121 <include name="install-sh"/>
122 <include name="setup.bash"/>
123 <include name="Makefile.in"/>
124 </fileset>
125 </delete>
126
127 <!-- generate modified build.xml file -->
128 <antcall target="run-xslt-binary"/>
129
130 </target>
131
132 <!-- Supplementary targets -->
133 <target name="svnupdate-distribution" depends="init">
134 <antcall target="svnupdate-packages"/>
135 <antcall target="svnupdate-core"/>
136 <antcall target="svnupdate-gs2build"/>
137 <antcall target="svnupdate-web"/>
138 </target>
139
140 <target name="run-xslt-source" depends="init">
141 <xslt in="${basedir}/build.xml" out="${basedir}/dist-build.xml" style="${basedir}/dist-resources/convert-build-xml-source.xsl"/>
142 </target>
143
144 <target name="run-xslt-binary" depends="init">
145 <xslt in="${basedir}/build.xml" out="${basedir}/modified-build.xml" style="${wirk3.home}/greenstone3/xsl/convert-build-xml.xsl"/>
146 </target>
147
148 <target name="compile-packages-and-indexers-javaonly" depends="init">
149 <echo>Getting Indexer Jars</echo>
150 <!-- install the jar files -->
151 <copy file="${basedir}/../../greenstone3/gs2build/common-src/indexers/mg/mg.jar" todir="${lib.jni}"/>
152 <copy file="${basedir}/../../greenstone3/gs2build/common-src/indexers/mgpp/mgpp.jar" todir="${lib.jni}"/>
153 <copy file="${basedir}/../../greenstone3/gs2build/common-src/indexers/lucene-gs/LuceneWrapper.jar" todir="${web.lib}"/>
154 <!-- javagdbm -->
155 <!-- install the jar file -->
156 <copy file="${basedir}/../../greenstone3/src/packages/javagdbm/javagdbm.jar" todir="${lib.jni}" />
157 </target>
158
159 <target name="delete-windows-files" depends="init" unless="current.os.iswindows">
160 <delete dir="${basedir}/winutil"/>
161 <delete>
162 <fileset dir="${lib.jni}" includes="*.dll"/>
163 </delete>
164 </target>
165
166 <target name="get-perl-for-windows" depends="init" if="current.os.iswindows">
167 <mkdir dir="${gs2build.home}/bin/windows"/>
168 <get src="http://www.greenstone.org/gs3files/perl-for-windows.zip" dest="${gs2build.home}/bin/windows/perl-for-windows.zip" usetimestamp="true"/>
169 <unzip src="${gs2build.home}/bin/windows/perl-for-windows.zip" dest="${gs2build.home}/bin/windows"/>
170 <delete file="${gs2build.home}/bin/windows/perl-for-windows.zip"/>
171 </target>
172
173 <!-- copy the doc eg colls from /home/nzdl - note we don't include the formatting ones -->
174 <target name="get-documented-collections" depends="init">
175 <property name="collect.home" value="${basedir}/web/sites/localsite/collect"/>
176
177 <!-- <copy todir="${collect.home}/authen-e">
178 <fileset dir="${documented.collections.home}/authen-e"/>
179 </copy>
180 <copy todir="${collect.home}/bibliog1">
181 <fileset dir="${documented.collections.home}/bibliog1"/>
182 </copy>
183 <copy todir="${collect.home}/bibliogr">
184 <fileset dir="${documented.collections.home}/bibliogr"/>
185 </copy>
186 <copy todir="${collect.home}/dls-e">
187 <fileset dir="${documented.collections.home}/dls-e"/>
188 </copy>
189 <copy todir="${collect.home}/dspace-e">
190 <fileset dir="${documented.collections.home}/dspace-e"/>
191 </copy>
192 <copy todir="${collect.home}/gsarch-e">
193 <fileset dir="${documented.collections.home}/gsarch-e"/>
194 </copy>
195 <copy todir="${collect.home}/image-e">
196 <fileset dir="${documented.collections.home}/image-e"/>
197 </copy>
198 <copy todir="${collect.home}/isis-e">
199 <fileset dir="${documented.collections.home}/isis-e"/>
200 </copy>
201 <copy todir="${collect.home}/oai-e">
202 <fileset dir="${documented.collections.home}/oai-e"/>
203 </copy>
204 <copy todir="${collect.home}/pagedimg-e">
205 <fileset dir="${documented.collections.home}/pagedimg-e"/>
206 </copy>
207 <copy todir="${collect.home}/wrdpdf-e">
208 <fileset dir="${documented.collections.home}/wrdpdf-e"/>
209 </copy>
210
211 <copy todir="${collect.home}/garish">
212 <fileset dir="${documented.collections.home}/garish"/>
213 </copy>
214 <copy todir="${collect.home}/marcexam">
215 <fileset dir="${documented.collections.home}/marcexam"/>
216 </copy>
217 <copy todir="${collect.home}/style-e">
218 <fileset dir="${documented.collections.home}/style-e"/>
219 </copy>
220 <copy todir="${collect.home}/wiki">
221 <fileset dir="${documented.collections.home}/wiki"/>
222 </copy> -->
223 </target>
224
225 <target name="get-xml-parser" depends="init">
226 <get src="http://www.greenstone.org/gs3files/XML-Parser.tar.gz" dest="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz" usetimestamp="true"/>
227 <untar src="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz" dest="${gs2build.home}/perllib/cpan/" compression="gzip"/>
228 <delete file="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz"/>
229 </target>
230
231 <!-- new targets to go in distribution build.xml files -->
232
233 <!-- new usage target for binary release -->
234 <target name="usage-for-binary-dist" description="Print a help message">
235 <echo message=" Execute 'ant -projecthelp' for a list of targets."/>
236 <echo message=" Execute 'ant -help' for Ant help."/>
237 </target>
238
239 <!-- new install target for source distribution -->
240 <target name="install-for-source-dist" depends="init" description="install the source distribution. Includes configuring and compiling">
241 <antcall target="unzip-windows-packages"/>
242 <!-- do the java version dependent stuff -->
243 <antcall target="configure-java-version"/>
244 <antcall target="install-macos-extra"/>
245 <!-- set gsdlhome in setup.bat -->
246 <antcall target="gs2build-edit-setup-bat"/>
247 <antcall target="install-indexer-files"/>
248 <antcall target="configure"/>
249 <antcall target="configure-c++"/>
250 <antcall target="compile"/>
251 <!-- make sure we have execute permission for the .sh files -->
252 <chmod dir="${basedir}" perm="ugo+rx" includes="*.sh"/>
253 </target>
254
255</project>
256
Note: See TracBrowser for help on using the repository browser.