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

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

prepare source releases on each os

File size: 8.0 KB
RevLine 
[14982]1<?xml version="1.0"?>
2<!--
3This is the build.xml run by AntInstaller for the installer
4-->
5
[15205]6<project name="Installation">
[14982]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 -->
[17107]16 <typedef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/>
[17468]17 <taskdef name="sevenzip" classname="org.apache.tools.ant.SevenZip" classpathref="project.classpath"/>
[14982]18
[17754]19 <condition property="bundled.java.exists">
20 <available file="../@linux-java.extracted@/bin/java"/>
21 </condition>
[14982]22
[17765]23 <target name="Initialising" if="bundled.java.exists">
[17754]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
[17764]31 <target name="Installing Core System">
[17754]32
[14982]33 <!-- create the installation directory -->
34 <mkdir dir="${installDir}"/>
35
[16686]36 <!-- install files -->
[17155]37 <echo>Installing Core Files</echo>
[17446]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"/>
[14982]43
[17123]44 <echo>Setting Binaries to Executable</echo>
[14982]45 <chmod dir="${installDir}" includes="*.sh" perm="775"/>
46 <chmod dir="${installDir}/bin/script" includes="*" perm="775"/>
[15142]47 <chmod dir="${installDir}/bin" includes="*" perm="775"/>
[14982]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
[17123]53 <echo>Changing tomcat ports in build.properties</echo>
[14982]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
[17123]57 <echo>Setting up global properties</echo>
[14982]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
[17123]63 <echo>Setting up log4j properties</echo>
[14982]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
[17814]67 <echo>Create usage.txt</echo>
68 <echo file="${installDir}/gs2build/etc/usage.txt"></echo>
69
[17257]70 <echo>Creating installation properties file</echo>
71 <echo file="${installDir}/installation.properties">#this file is just a placeholder for now</echo>
72
[17123]73 <echo>Finished</echo>
[15142]74
[14982]75 </target>
76
[17646]77 <!-- imagemagick -->
78 <target name="Installing ImageMagick">
79 <echo>Installing ImageMagick</echo>
80 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="imagemagick.lzma"/></patternset></unzip>
81 <sevenzip task="decode" input="${basedir}/imagemagick.lzma" output="${basedir}/imagemagick.comp"/>
82 <delete file="imagemagick.lzma"/>
83 <unzip src="${basedir}/imagemagick.comp" dest="${installDir}/gs2build/bin/linux"/>
84 <delete file="imagemagick.comp"/>
[17699]85 <echo>Setting Binaries to Executable</echo>
86 <chmod dir="${installDir}/gs2build/bin/linux/imagemagick/bin" includes="*" perm="775"/>
[14982]87 </target>
88
[17646]89
[17596]90 <target name="Installing Tomcat">
[17123]91 <echo>Installing Tomcat (packages/tomcat)</echo>
[17446]92 <mkdir dir="packages"/>
93 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="tomcat.lzma"/></patternset></unzip>
94 <sevenzip task="decode" input="${basedir}/tomcat.lzma" output="${basedir}/tomcat.comp"/>
95 <delete file="tomcat.lzma"/>
96 <unzip src="${basedir}/tomcat.comp" dest="${installDir}/packages"/>
97 <delete file="tomcat.comp"/>
98
[17123]99 <echo>Changing tomcat ports tomcat's server.xml</echo>
[15973]100 <copy file="${installDir}/resources/tomcat/server.xml" tofile="${installDir}/packages/tomcat/conf/server.xml" overwrite="true"/>
101 <rsr file="${installDir}/packages/tomcat/conf/server.xml" pattern="(.*)@port@(.*)" replacement="$1${tomcat.port}$2" />
102 <rsr file="${installDir}/packages/tomcat/conf/server.xml" pattern="(.*)@shutdown-port@(.*)" replacement="$1${tomcat.shutdown.port}$2" />
103
[17123]104 <echo>Copying greenstone3.xml to tomcat directory</echo>
[15973]105 <copy file="${installDir}/resources/tomcat/greenstone3.xml" tofile="${installDir}/packages/tomcat/conf/Catalina/localhost/greenstone3.xml" overwrite="true"/>
106 <rsr file="${installDir}/packages/tomcat/conf/Catalina/localhost/greenstone3.xml" pattern="(.*)@gsdl3webhome@(.*)" replacement="$1${installDir}/web$2" />
107
[17123]108 <echo>Setting tomcat binaries to executable</echo>
[15973]109 <chmod dir="${installDir}/packages/tomcat/bin" includes="*.sh" perm="775"/>
110 <echo/>
[15142]111 </target>
[15205]112
[17596]113 <target name="Installing Ant">
[17123]114 <echo>Installing Ant (packages/ant)</echo>
[17446]115 <mkdir dir="packages"/>
116 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="ant.lzma"/></patternset></unzip>
117 <sevenzip task="decode" input="${basedir}/ant.lzma" output="${basedir}/ant.comp"/>
118 <delete file="ant.lzma"/>
119 <unzip src="${basedir}/ant.comp" dest="${installDir}/packages"/>
120 <delete file="ant.comp"/>
121
[17123]122 <echo>Setting ant binaries to executable</echo>
[15973]123 <chmod dir="${installDir}/packages/ant/bin" includes="*" perm="775"/>
124 <echo/>
[15205]125 </target>
126
[17786]127 <!-- source release -->
128 <target name="Source Release">
129
130 <echo>Installing Source Release</echo>
131 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="source-release.lzma"/></patternset></unzip>
132 <sevenzip task="decode" input="${basedir}/source-release.lzma" output="${basedir}/source-release.comp"/>
133 <delete file="source-release.lzma"/>
134 <unzip src="${basedir}/source-release.comp" dest="${installDir}"/>
135 <delete file="source-release.comp"/>
136
[17814]137 <echo>Setting Binaries to Executable</echo>
138 <chmod dir="${installDir}" includes="*.sh,**/configure" perm="775"/>
139 <chmod dir="${installDir}/bin/script" includes="*" perm="775"/>
140 <chmod dir="${installDir}/bin" includes="*" perm="775"/>
141 <chmod dir="${installDir}/gs2build/bin/linux" includes="*" perm="775"/>
142 <chmod dir="${installDir}/gs2build/bin/script" includes="**/*" perm="775"/>
143 <chmod dir="${installDir}/gli" includes="*.sh" perm="775"/>
144 <echo/>
145
[17786]146 <echo>Setting up global properties</echo>
147 <copy file="${installDir}/resources/java/global.properties.in" tofile="${installDir}/web/WEB-INF/classes/global.properties" overwrite="true"/>
148 <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@gsdl3home@(.*)" replacement="$1${installDir}/web$2" />
149 <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@tomcat.server@(.*)" replacement="$1localhost$2" />
150 <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@tomcat.port@(.*)" replacement="$1${tomcat.port}$2" />
151
152 <echo>Setting up log4j properties</echo>
153 <copy file="${installDir}/resources/java/log4j.properties.in" tofile="${installDir}/web/WEB-INF/classes/log4j.properties" overwrite="true"/>
154 <rsr file="${installDir}/web/WEB-INF/classes/log4j.properties" pattern="(.*)@gsdl3home@(.*)" replacement="$1${installDir}/web$2" />
155
[17814]156 <echo>Create usage.txt</echo>
157 <echo file="${installDir}/gs2build/etc/usage.txt"></echo>
158
[17786]159 <echo>Creating installation properties file</echo>
160 <echo file="${installDir}/installation.properties">#this file is just a placeholder for now</echo>
161
162 </target>
163
164
[14982]165</project>
Note: See TracBrowser for help on using the repository browser.