source: release-kits/lirk3/installer/build.xml@ 18980

Last change on this file since 18980 was 18980, checked in by oranfry, 15 years ago

create the english gli dictionary at install

File size: 8.2 KB
Line 
1<?xml version="1.0"?>
2<!--
3This is the build.xml run by AntInstaller for the installer
4-->
5
6<project name="Installation">
7
8 <!-- this is required to pick up the properties generated during the install pages -->
9 <property file="${basedir}/ant.install.properties"/>
10
11 <path id="project.classpath">
12 <pathelement path="${antinstaller.jar}"/>
13 </path>
14
15 <!-- custom tasks -->
16 <typedef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/>
17 <taskdef name="sevenzip" classname="org.apache.tools.ant.SevenZip" classpathref="project.classpath"/>
18
19 <condition property="bundled.java.exists">
20 <available file="../@linux-java.extracted@/bin/java"/>
21 </condition>
22
23 <target name="Initialising" if="bundled.java.exists">
24 <mkdir dir="${installDir}"/>
25 <copy todir="${installDir}/packages/jre" failonerror="false">
26 <fileset dir="../@linux-java.extracted@"/>
27 </copy>
28 <chmod dir="${installDir}/packages/jre/bin" includes="*" perm="775"/>
29 </target>
30
31 <target name="Installing Core System">
32
33 <!-- create the installation directory -->
34 <mkdir dir="${installDir}"/>
35
36 <!-- install files -->
37 <echo>Installing Core Files</echo>
38 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="core.lzma"/></patternset></unzip>
39 <sevenzip task="decode" input="${basedir}/core.lzma" output="${basedir}/core.comp"/>
40 <delete file="core.lzma"/>
41 <unzip src="${basedir}/core.comp" dest="${installDir}"/>
42 <delete file="core.comp"/>
43
44 <echo>Setting Binaries to Executable</echo>
45 <chmod dir="${installDir}" includes="*.sh" perm="775"/>
46 <chmod dir="${installDir}/bin/script" includes="*" perm="775"/>
47 <chmod dir="${installDir}/bin" includes="*" perm="775"/>
48 <chmod dir="${installDir}/gs2build/bin/linux" includes="*" perm="775"/>
49 <chmod dir="${installDir}/gs2build/bin/script" includes="**/*" perm="775"/>
50 <chmod dir="${installDir}/gli" includes="*.sh" perm="775"/>
51 <echo/>
52
53 <echo>Changing tomcat ports in build.properties</echo>
54 <rsr file="${installDir}/build.properties" pattern="(tomcat.port[=:]).*" replacement="$1${tomcat.port}" />
55 <rsr file="${installDir}/build.properties" pattern="(tomcat.shutdown.port[=:]).*" replacement="$1${tomcat.shutdown.port}" />
56
57 <echo>Setting up global properties</echo>
58 <copy file="${installDir}/resources/java/global.properties.in" tofile="${installDir}/web/WEB-INF/classes/global.properties" overwrite="true"/>
59 <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@gsdl3home@(.*)" replacement="$1${installDir}/web$2" />
60 <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@tomcat.server@(.*)" replacement="$1localhost$2" />
61 <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@tomcat.port@(.*)" replacement="$1${tomcat.port}$2" />
62
63 <echo>Setting up log4j properties</echo>
64 <copy file="${installDir}/resources/java/log4j.properties.in" tofile="${installDir}/web/WEB-INF/classes/log4j.properties" overwrite="true"/>
65 <rsr file="${installDir}/web/WEB-INF/classes/log4j.properties" pattern="(.*)@gsdl3home@(.*)" replacement="$1${installDir}/web$2" />
66
67 <echo>Creating the english dictionary</echo>
68 <copy file="${installDir}/gli/classes/dictionary.properties" tofile="${installDir}/gli/classes/dictionary_en.properties"/>
69 <echo/>
70
71 <echo>Create usage.txt</echo>
72 <echo file="${installDir}/gs2build/etc/usage.txt"></echo>
73
74 <echo>Creating installation properties file</echo>
75 <echo file="${installDir}/installation.properties">#this file is just a placeholder for now</echo>
76
77 <echo>Finished</echo>
78
79 </target>
80
81 <!-- imagemagick -->
82 <target name="Installing ImageMagick">
83 <echo>Installing ImageMagick</echo>
84 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="imagemagick.lzma"/></patternset></unzip>
85 <sevenzip task="decode" input="${basedir}/imagemagick.lzma" output="${basedir}/imagemagick.comp"/>
86 <delete file="imagemagick.lzma"/>
87 <unzip src="${basedir}/imagemagick.comp" dest="${installDir}/gs2build/bin/linux"/>
88 <delete file="imagemagick.comp"/>
89 <echo>Setting Binaries to Executable</echo>
90 <chmod dir="${installDir}/gs2build/bin/linux/imagemagick/bin" includes="*" perm="775"/>
91 </target>
92
93
94 <target name="Installing Tomcat">
95 <echo>Installing Tomcat (packages/tomcat)</echo>
96 <mkdir dir="packages"/>
97 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="tomcat.lzma"/></patternset></unzip>
98 <sevenzip task="decode" input="${basedir}/tomcat.lzma" output="${basedir}/tomcat.comp"/>
99 <delete file="tomcat.lzma"/>
100 <unzip src="${basedir}/tomcat.comp" dest="${installDir}/packages"/>
101 <delete file="tomcat.comp"/>
102
103 <echo>Changing tomcat ports tomcat's server.xml</echo>
104 <copy file="${installDir}/resources/tomcat/server.xml" tofile="${installDir}/packages/tomcat/conf/server.xml" overwrite="true"/>
105 <rsr file="${installDir}/packages/tomcat/conf/server.xml" pattern="(.*)@port@(.*)" replacement="$1${tomcat.port}$2" />
106 <rsr file="${installDir}/packages/tomcat/conf/server.xml" pattern="(.*)@shutdown-port@(.*)" replacement="$1${tomcat.shutdown.port}$2" />
107
108 <echo>Copying greenstone3.xml to tomcat directory</echo>
109 <copy file="${installDir}/resources/tomcat/greenstone3.xml" tofile="${installDir}/packages/tomcat/conf/Catalina/localhost/greenstone3.xml" overwrite="true"/>
110 <rsr file="${installDir}/packages/tomcat/conf/Catalina/localhost/greenstone3.xml" pattern="(.*)@gsdl3webhome@(.*)" replacement="$1${installDir}/web$2" />
111
112 <echo>Setting tomcat binaries to executable</echo>
113 <chmod dir="${installDir}/packages/tomcat/bin" includes="*.sh" perm="775"/>
114 <echo/>
115 </target>
116
117 <target name="Installing Ant">
118 <echo>Installing Ant (packages/ant)</echo>
119 <mkdir dir="packages"/>
120 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="ant.lzma"/></patternset></unzip>
121 <sevenzip task="decode" input="${basedir}/ant.lzma" output="${basedir}/ant.comp"/>
122 <delete file="ant.lzma"/>
123 <unzip src="${basedir}/ant.comp" dest="${installDir}/packages"/>
124 <delete file="ant.comp"/>
125
126 <echo>Setting ant binaries to executable</echo>
127 <chmod dir="${installDir}/packages/ant/bin" includes="*" perm="775"/>
128 <echo/>
129 </target>
130
131 <!-- source release -->
132 <target name="Source Release">
133
134 <echo>Installing Source Release</echo>
135 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="source-release.lzma"/></patternset></unzip>
136 <sevenzip task="decode" input="${basedir}/source-release.lzma" output="${basedir}/source-release.comp"/>
137 <delete file="source-release.lzma"/>
138 <unzip src="${basedir}/source-release.comp" dest="${installDir}"/>
139 <delete file="source-release.comp"/>
140
141 <echo>Setting Binaries to Executable</echo>
142 <chmod dir="${installDir}" includes="*.sh,**/configure" perm="775"/>
143 <chmod dir="${installDir}/bin/script" includes="*" perm="775"/>
144 <chmod dir="${installDir}/bin" includes="*" perm="775"/>
145 <chmod dir="${installDir}/gs2build/bin/linux" includes="*" perm="775"/>
146 <chmod dir="${installDir}/gs2build/bin/script" includes="**/*" perm="775"/>
147 <chmod dir="${installDir}/gli" includes="*.sh" perm="775"/>
148 <echo/>
149
150 <echo>Setting up global properties</echo>
151 <copy file="${installDir}/resources/java/global.properties.in" tofile="${installDir}/web/WEB-INF/classes/global.properties" overwrite="true"/>
152 <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@gsdl3home@(.*)" replacement="$1${installDir}/web$2" />
153 <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@tomcat.server@(.*)" replacement="$1localhost$2" />
154 <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@tomcat.port@(.*)" replacement="$1${tomcat.port}$2" />
155
156 <echo>Setting up log4j properties</echo>
157 <copy file="${installDir}/resources/java/log4j.properties.in" tofile="${installDir}/web/WEB-INF/classes/log4j.properties" overwrite="true"/>
158 <rsr file="${installDir}/web/WEB-INF/classes/log4j.properties" pattern="(.*)@gsdl3home@(.*)" replacement="$1${installDir}/web$2" />
159
160 <echo>Create usage.txt</echo>
161 <echo file="${installDir}/gs2build/etc/usage.txt"></echo>
162
163 <echo>Creating installation properties file</echo>
164 <echo file="${installDir}/installation.properties">#this file is just a placeholder for now</echo>
165
166 </target>
167
168
169</project>
Note: See TracBrowser for help on using the repository browser.