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

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

imagemagick components for linux release kits

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