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

Last change on this file since 17446 was 17446, checked in by oranfry, 16 years ago

got the component scheme working in lirk3

File size: 5.9 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"/>
[14982]17
[15205]18 <target name="install-core-components" depends="">
[14982]19
20 <!-- create the installation directory -->
[17257]21 <echo>Creating Installation directory</echo>
[14982]22 <echo>basedir: ${basedir}</echo>
23 <echo>installDir: ${installDir}</echo>
24 <echo>antinstaller.jar: ${antinstaller.jar}</echo>
25 <mkdir dir="${installDir}"/>
26
27
[16686]28 <!-- install files -->
[17155]29 <echo>Installing Core Files</echo>
[17446]30 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="core.lzma"/></patternset></unzip>
31 <sevenzip task="decode" input="${basedir}/core.lzma" output="${basedir}/core.comp"/>
32 <delete file="core.lzma"/>
33 <unzip src="${basedir}/core.comp" dest="${installDir}"/>
34 <delete file="core.comp"/>
[14982]35
[17444]36 <!-- jre -->
[17446]37 <mkdir dir="packages"/>
[17444]38 <move todir="${installDir}/packages/jre">
39 <fileset dir="../@linux-java.extracted@"/>
40 </move>
41 <chmod dir="${installDir}/packages/jre/bin" includes="*" perm="775"/>
42
43
[17123]44 <echo>Renaming greenstone3-build.xml back to build.xml</echo>
[16686]45 <move file="${installDir}/greenstone3-build.xml" tofile="${installDir}/build.xml" overwrite="true"/>
46
[17123]47 <echo>Setting Binaries to Executable</echo>
[14982]48 <chmod dir="${installDir}" includes="*.sh" perm="775"/>
49 <chmod dir="${installDir}/bin/script" includes="*" perm="775"/>
[15142]50 <chmod dir="${installDir}/bin" includes="*" perm="775"/>
[14982]51 <chmod dir="${installDir}/gs2build/bin/linux" includes="*" perm="775"/>
52 <chmod dir="${installDir}/gs2build/bin/script" includes="**/*" perm="775"/>
53 <chmod dir="${installDir}/gli" includes="*.sh" perm="775"/>
54 <echo/>
55
[17123]56 <echo>Changing tomcat ports in build.properties</echo>
[14982]57 <rsr file="${installDir}/build.properties" pattern="(tomcat.port[=:]).*" replacement="$1${tomcat.port}" />
58 <rsr file="${installDir}/build.properties" pattern="(tomcat.shutdown.port[=:]).*" replacement="$1${tomcat.shutdown.port}" />
59
[17123]60 <echo>Setting up global properties</echo>
[14982]61 <copy file="${installDir}/resources/java/global.properties.in" tofile="${installDir}/web/WEB-INF/classes/global.properties" overwrite="true"/>
62 <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@gsdl3home@(.*)" replacement="$1${installDir}/web$2" />
63 <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@tomcat.server@(.*)" replacement="$1localhost$2" />
64 <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@tomcat.port@(.*)" replacement="$1${tomcat.port}$2" />
65
[17123]66 <echo>Setting up log4j properties</echo>
[14982]67 <copy file="${installDir}/resources/java/log4j.properties.in" tofile="${installDir}/web/WEB-INF/classes/log4j.properties" overwrite="true"/>
68 <rsr file="${installDir}/web/WEB-INF/classes/log4j.properties" pattern="(.*)@gsdl3home@(.*)" replacement="$1${installDir}/web$2" />
69
[17123]70 <echo>Deleting some unneeded files</echo>
[14982]71 <delete dir="${installDir}/resources/icons"/>
72 <delete file="${installDir}/resources/*.png"/>
73
[17257]74 <echo>Creating installation properties file</echo>
75 <echo file="${installDir}/installation.properties">#this file is just a placeholder for now</echo>
76
[17123]77 <echo>Finished</echo>
[15142]78
[14982]79 </target>
80
81 <!-- Source -->
[15205]82 <target name="install-source-code" depends="">
[17123]83
[17257]84 <echo>Installing Source Code</echo>
[17446]85 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="sourcecode.lzma"/></patternset></unzip>
86 <sevenzip task="decode" input="${basedir}/sourcecode.lzma" output="${basedir}/sourcecode.comp"/>
87 <delete file="sourcecode.lzma"/>
88 <unzip src="${basedir}/sourcecode.comp" dest="${installDir}"/>
89 <delete file="sourcecode.comp"/>
90
91
[14982]92 </target>
93
[15205]94 <target name="install-tomcat">
[17123]95 <echo>Installing Tomcat (packages/tomcat)</echo>
[17446]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
[17123]103 <echo>Changing tomcat ports tomcat's server.xml</echo>
[15973]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
[17123]108 <echo>Copying greenstone3.xml to tomcat directory</echo>
[15973]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
[17123]112 <echo>Setting tomcat binaries to executable</echo>
[15973]113 <chmod dir="${installDir}/packages/tomcat/bin" includes="*.sh" perm="775"/>
114 <echo/>
[15142]115 </target>
[15205]116
117 <target name="install-ant">
[17123]118 <echo>Installing Ant (packages/ant)</echo>
[17446]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
[17123]126 <echo>Setting ant binaries to executable</echo>
[15973]127 <chmod dir="${installDir}/packages/ant/bin" includes="*" perm="775"/>
128 <echo/>
[15205]129 </target>
130
[17123]131 <target name="cleanuptarget"></target>
[14982]132
133</project>
Note: See TracBrowser for help on using the repository browser.