source: release-kits/wirk3/installer/build.xml@ 15023

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

did the bulk of the work on wirk3

File size: 5.8 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" default="" basedir="${basedir}">
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="RegexSearchReplace" classpathref="project.classpath"/>
17
18 <target name="default" depends="">
19
20 <!-- create the installation directory -->
21 <echo message="Creating Installation directory"/>
22 <echo>basedir: ${basedir}</echo>
23 <echo>installDir: ${installDir}</echo>
24 <echo>antinstaller.jar: ${antinstaller.jar}</echo>
25 <mkdir dir="${installDir}"/>
26
27
28 <!-- install binaries -->
29 <echo message="Installing Executable Binaries (bin)"/>
30 <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="bin/**/*"/></patternset></unzip>
31 <echo/>
32
33 <echo message="Installing Documentation (docs)"/>
34 <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="docs/**/*"/></patternset></unzip>
35 <echo/>
36
37 <echo message="Installing GLI (gli)"/>
38 <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="gli/**/*"/></patternset></unzip>
39 <echo/>
40
41 <echo message="Installing gs2build (gs2build)"/>
42 <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="gs2build/**/*"/></patternset></unzip>
43 <echo/>
44
45 <echo message="Installing Libraries (lib)"/>
46 <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="lib/**/*"/></patternset></unzip>
47 <echo/>
48
49 <echo message="Installing Web Content (web)"/>
50 <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="web/**/*"/></patternset></unzip>
51 <echo/>
52
53 <echo message="Installing Packages (packages)"/>
54 <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="packages/**/*"/></patternset></unzip>
55 <echo/>
56
57 <echo message="Installing Resources (resources)"/>
58 <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="resources/**/*"/></patternset></unzip>
59 <echo/>
60
61 <echo message="Installing Windows Utility Commands (winutil)"/>
62 <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="winutil/**/*"/></patternset></unzip>
63 <echo/>
64
65
66 <echo message="Installing Top Level Files"/>
67 <unzip src="${antinstaller.jar}" dest="${installDir}">
68 <patternset>
69 <include name="build.xml"/>
70 <include name="build.properties"/>
71 <include name="gs3-server.bat"/>
72 <include name="gs3-setup.bat"/>
73 <include name="LICENSE.txt"/>
74 <include name="README.txt"/>
75 <include name="server.jar"/>
76 </patternset>
77 </unzip>
78 <echo/>
79
80 <!-- change the tomcat ports in build.properties -->
81 <echo message="Changing tomcat ports in build.properties"/>
82 <rsr file="${installDir}/build.properties" pattern="(tomcat.port[=:]).*" replacement="$1${tomcat.port}" />
83 <rsr file="${installDir}/build.properties" pattern="(tomcat.shutdown.port[=:]).*" replacement="$1${tomcat.shutdown.port}" />
84
85 <!-- change the tomcat ports in tomcats server.xml -->
86 <echo message="Changing tomcat ports tomcat's server.xml"/>
87 <copy file="${installDir}/resources/tomcat/server.xml" tofile="${installDir}/packages/tomcat/conf/server.xml" overwrite="true"/>
88 <rsr file="${installDir}/packages/tomcat/conf/server.xml" pattern="(.*)@port@(.*)" replacement="$1${tomcat.port}$2" />
89 <rsr file="${installDir}/packages/tomcat/conf/server.xml" pattern="(.*)@shutdown-port@(.*)" replacement="$1${tomcat.shutdown.port}$2" />
90
91 <!-- copy the greenstone3.xml file to tomcat -->
92 <echo message="Copying greenstone3.xml to tomcat directory"/>
93 <copy file="${installDir}/resources/tomcat/greenstone3.xml" tofile="${installDir}/packages/tomcat/conf/Catalina/localhost/greenstone3.xml" overwrite="true"/>
94 <rsr file="${installDir}/packages/tomcat/conf/Catalina/localhost/greenstone3.xml" pattern="(.*)@gsdl3webhome@(.*)" replacement="$1${installDir}/web$2" />
95
96 <!-- set up global properties -->
97 <echo message="Setting up global properties"/>
98 <copy file="${installDir}/resources/java/global.properties.in" tofile="${installDir}/web/WEB-INF/classes/global.properties" overwrite="true"/>
99 <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@gsdl3home@(.*)" replacement="$1${installDir}/web$2" />
100 <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@tomcat.server@(.*)" replacement="$1localhost$2" />
101 <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="(.*)@tomcat.port@(.*)" replacement="$1${tomcat.port}$2" />
102
103 <!-- set up log4j properties-->
104 <echo message="Setting up log4j properties"/>
105 <copy file="${installDir}/resources/java/log4j.properties.in" tofile="${installDir}/web/WEB-INF/classes/log4j.properties" overwrite="true"/>
106 <rsr file="${installDir}/web/WEB-INF/classes/log4j.properties" pattern="(.*)@gsdl3home@(.*)" replacement="$1${installDir}/web$2" />
107
108 <!-- in the gs3-setup.sh file, set ANT_HOME and put it in PATH -->
109 <echo>In the gs3-setup.sh file, set ANT_HOME and put it in PATH</echo>
110 <exec executable="cmd" output="${installDir}/gs3-setup.sh" append="true">
111 <arg
112 line="/C echo set ANT_HOME=${installDir}/packages/ant
113set PATH=%ANT_HOME%/bin:%PATH%"/>
114 </exec>
115
116 <!-- delete unneeded files -->
117 <delete dir="${installDir}/resources/icons"/>
118 <delete file="${installDir}/resources/*.png"/>
119
120 </target>
121
122 <!-- Source -->
123 <target name="tgsrc" depends="">
124 <echo message="Installing Source Code (src)"/>
125 <mkdir dir="${installDir}/src"/>
126 <unzip src="${antinstaller.jar}" dest="${installDir}">
127 <patternset>
128 <include name="src/**/*"/>
129 </patternset>
130 </unzip>
131 </target>
132
133 <target name="cleanuptarget">
134 </target>
135
136
137</project>
Note: See TracBrowser for help on using the repository browser.