source: release-kits/wirk2/ant-scripts/create-distribution.xml@ 17898

Last change on this file since 17898 was 17898, checked in by oranfry, 12 years ago

Standardised names of directories used in release kits

  • gsdl and greenstone3 -> compiled
  • distribution and distributions -> distributions
  • greenstone3 and web -> web

And, expect more specifically named properties files, e.g., lirk3-build.properties, wirk2-build.properties

File size: 7.3 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="wirk2-create-distribution" default="create-distribution">
3
4 <target name="create-distribution">
5
6 <antcall target="export-gsdl-gli" />
7 <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/distributions/web"/></antcall>
8 <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/web/gli"/></antcall>
9 <antcall target="drop-in-docs" />
10 <antcall target="tweak-files" />
11 <antcall target="insert-uninstaller"><param name="script-format" value="bat"/></antcall> <!-- from rk2-targets -->
12 <antcall target="remove-unneeded-files-1" />
13 <antcall target="dist-unzip-packages"/>
14
15 <antcall target="copy-web-to-source" /> <!-- from init -->
16
17 <antcall target="drop-in-binaries" />
18 <antcall target="drop-in-demo-collection" />
19 <antcall target="drop-in-misc" />
20 <antcall target="compile-gli" />
21 <antcall target="remove-unneeded-files-2" />
22
23 </target>
24
25 <target name="export-gsdl-gli">
26 <mkdir dir="distributions"/>
27 <delete dir="distributions/web"/>
28 <svn>
29 <export srcurl="${svn.root}/gsdl/${branch.path}" destPath="distributions/web"/>
30 <export srcurl="${svn.root}/gli/${branch.path}" destPath="distributions/web/gli"/>
31 </svn>
32 </target>
33
34 <target name="drop-in-binaries">
35 <echo level="info">Dropping compiled binaries into distribution</echo>
36 <delete dir="${basedir}/distributions/web/bin/windows" />
37 <copy todir="${basedir}/distributions/web/bin/windows">
38 <fileset dir="${basedir}/compiled/bin/windows" includes="**/*"/>
39 </copy>
40 <copy todir="${basedir}/distributions/web" file="${basedir}/compiled/bin/windows/server.exe"/>
41
42 <echo level="info">Dropping LuceneWrapper.jar in place</echo>
43 <copy file="${basedir}/gsdl/bin/java/LuceneWrapper.jar" todir="${basedir}/distributions/web/bin/java" />
44 </target>
45
46 <target name="drop-in-demo-collection">
47 <echo level="info">Dropping rebuilt demo collection into distribution</echo>
48 <delete dir="${basedir}/distributions/web/collect/demo" />
49 <copy todir="${basedir}/distributions/web/collect/demo">
50 <fileset dir="${basedir}/compiled/collect/demo" includes="**/*"/>
51 </copy>
52 </target>
53
54 <target name="drop-in-docs">
55 <echo level="info">Dropping gsdl docs into distribution</echo>
56 <copy todir="${basedir}/distributions/web" overwrite="true">
57 <fileset dir="${wirk2.home}/greenstone2/docs"/>
58 </copy>
59 </target>
60
61 <target name="drop-in-misc">
62 <echo level="info">Putting the default gsdlsite.cfg at the root of the distribution</echo>
63 <copy todir="${basedir}/distributions/web" file="${wirk2.home}/resources/gsdlsite.cfg" overwrite="true"/>
64 </target>
65
66 <target name="compile-gli">
67 <echo>Compiling gli...</echo>
68 <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makegli.bat"/>
69
70 <echo>Creating jar...</echo>
71 <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makejar.bat"/>
72
73 <echo>Cleaning up intermediate files...</echo>
74 <delete dir="${basedir}/distributions/web/gli/jar"/>
75 <delete dir="${basedir}/distributions/web/gli/classes/org"/>
76
77 <echo>Putting gli server jar in a better place</echo>
78 <move file="${basedir}/distributions/web/gli/GLIServer.jar" todir="${basedir}/distributions/web/bin/java" />
79 </target>
80
81 <target name="tweak-files">
82 <echo level="info">Changing date and version in the docs</echo>
83 <!-- ar -->
84 <rsr file="${basedir}/distributions/web/READMEar.txt" pattern="(التاريخ : \s*)(.*)" replacement="$1${month.ar} ${current.year}" />
85 <rsr file="${basedir}/distributions/web/READMEar.txt" pattern="(النسخه : \s*)(.*)" replacement="$1${version}" />
86 <!-- es -->
87 <rsr file="${basedir}/distributions/web/READMEes.txt" pattern="^(Fecha\s*)(.*)" replacement="$1${month.es} de ${current.year}" />
88 <rsr file="${basedir}/distributions/web/READMEes.txt" pattern="^(Versi.?n\s*)(.*)" replacement="$1${version}" />
89 <!-- fr -->
90 <rsr file="${basedir}/distributions/web/READMEfr.txt" pattern="^(Date\s*)(.*)" replacement="$1${month.fr} ${current.year}" />
91 <rsr file="${basedir}/distributions/web/READMEfr.txt" pattern="^(Version\s*)(.*)" replacement="$1${version}" />
92 <!-- ru -->
93 <rsr file="${basedir}/distributions/web/READMEru.txt" pattern="^(Дата\s*)(.*)" replacement="$1${month.ru} ${current.year}" />
94 <rsr file="${basedir}/distributions/web/READMEru.txt" pattern="^(ВерсОя\s*)(.*)" replacement="$1${version}" />
95 <!-- en -->
96 <rsr file="${basedir}/distributions/web/READMEen.txt" pattern="^(Date\s*)(.*)" replacement="$1${month.default} ${current.year}" />
97 <rsr file="${basedir}/distributions/web/READMEen.txt" pattern="^(Version\s*)(.*)" replacement="$1${version}" />
98
99 <!-- Support.htm -->
100 <rsr file="${basedir}/distributions/web/Support.htm" pattern="^(\s*Greenstone Digital Library version: ).*(&lt;br&gt;.*)" replacement="$1${version}$2"/>
101 <rsr file="${basedir}/distributions/web/Support.htm" pattern="^(\s*&lt;input.* name=&quot;gsdl version&quot;.* value=&quot;).*(&quot;.*&gt;)" replacement="$1${version}$2"/>
102
103 </target>
104
105 <target name="remove-unneeded-files-1">
106 <delete file="${basedir}/distributions/web/gli/.greenstonestore" />
107 <!-- delete non-windows source stuff -->
108 <delete><fileset dir="${basedir}/distributions/web" includes="*.bash,*.sh,*.csh,install-sh,configure,configure.in,config.sub,config.guess,config.h.in,configtest.pl,Makefile.in,aclocal.m4,acconfig.h,micotest.cpp"/></delete>
109 </target>
110
111 <target name="remove-unneeded-files-2">
112 <delete dir="${basedir}/distributions/web/bin/linux" />
113 <delete><fileset dir="${basedir}/distributions/web" includes="*.bash,*.sh,*.csh,install-sh,configure,configure.in,config.sub,config.guess,config.h.in,configtest.pl,Makefile.in,aclocal.m4,acconfig.h,micotest.cpp,win32.mak,WIN32cfg.h,Install.txt"/></delete>
114 <delete><fileset dir="${basedir}/distributions/web/gli" includes="*.sh,*4gs3.bat"/></delete>
115 <delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" />
116 </target>
117
118 <target name="dist-unzip-packages">
119 <unzip src="${basedir}/distributions/web/common-src/indexers/packages/windows/iconv/iconv.zip" dest="${basedir}/distributions/web/common-src/indexers/packages/windows/iconv"/>
120 <delete file="${basedir}/distributions/web/common-src/indexers/packages/windows/iconv/iconv.zip"/>
121
122 <unzip src="${basedir}/distributions/web/common-src/packages/windows/crypt/crypt.zip" dest="${basedir}/distributions/web/common-src/packages/windows/crypt"/>
123 <delete file="${basedir}/distributions/web/common-src/packages/windows/crypt/crypt.zip"/>
124
125 <unzip src="${basedir}/distributions/web/common-src/packages/windows/expat/expat.zip" dest="${basedir}/distributions/web/common-src/packages/windows/expat"/>
126 <delete file="${basedir}/distributions/web/common-src/packages/windows/expat/expat.zip"/>
127
128 <unzip src="${basedir}/distributions/web/common-src/packages/windows/gdbm/gdbm.zip" dest="${basedir}/distributions/web/common-src/packages/windows/gdbm"/>
129 <delete file="${basedir}/distributions/web/common-src/packages/windows/gdbm/gdbm.zip"/>
130
131 <unzip src="${basedir}/distributions/web/common-src/packages/windows/stlport/stlport.zip" dest="${basedir}/distributions/web/common-src/packages/windows/stlport"/>
132 <delete file="${basedir}/distributions/web/common-src/packages/windows/stlport/stlport.zip"/>
133 </target>
134
135</project>
Note: See TracBrowser for help on using the repository browser.