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

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

changes to the ant scripts to accompany the changes in the wrapper and jar installer

File size: 7.9 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 <taskdef name="shortcut" classname="com.orangevolt.tools.ant.Win32ShortcutTask" classpathref="project.classpath"/>
18 <taskdef name="winprops" classname="com.orangevolt.tools.ant.Win32PropertiesTask" classpathref="project.classpath"/>
19
20 <!-- create a local installDir String -->
21 <path id="installDir.path">
22 <pathelement location="${installDir}"/>
23 </path>
24 <property name="installDir.local" refid="installDir.path"/>
25
26
27 <target name="install-core-components">
28 <!-- load windows properties -->
29 <winprops/>
30
31 <!-- create the installation directory -->
32 <echo message="Creating Installation directory"/>
33 <echo>basedir: ${basedir}</echo>
34 <echo>installDir: ${installDir}</echo>
35 <echo>antinstaller.jar: ${antinstaller.jar}</echo>
36 <mkdir dir="${installDir}"/>
37
38 <!-- install binaries -->
39 <echo message="Installing Executable Binaries (bin)"/>
40 <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="bin/**/*"/></patternset></unzip>
41 <echo/>
42
43 <echo message="Installing Documentation (docs)"/>
44 <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="docs/**/*"/></patternset></unzip>
45 <echo/>
46
47 <echo message="Installing GLI (gli)"/>
48 <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="gli/**/*"/></patternset></unzip>
49 <echo/>
50
51 <echo message="Installing gs2build (gs2build)"/>
52 <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="gs2build/**/*"/></patternset></unzip>
53 <echo/>
54
55 <echo message="Installing Libraries (lib)"/>
56 <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="lib/**/*"/></patternset></unzip>
57 <echo/>
58
59 <echo message="Installing Web Content (web)"/>
60 <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="web/**/*"/></patternset></unzip>
61 <echo/>
62
63 <!--
64 <echo message="Installing Packages (packages)"/>
65 <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="packages/**/*"/></patternset></unzip>
66 <echo/>
67 -->
68
69 <echo message="Installing Resources (resources)"/>
70 <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="resources/**/*"/></patternset></unzip>
71 <echo/>
72
73 <echo message="Installing Windows Utility Commands (winutil)"/>
74 <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="winutil/**/*"/></patternset></unzip>
75 <echo/>
76
77
78 <echo message="Installing Top Level Files"/>
79 <unzip src="${antinstaller.jar}" dest="${installDir}">
80 <patternset>
81 <include name="build.xml"/>
82 <include name="build.properties"/>
83 <include name="gs3-server.bat"/>
84 <include name="gs3-setup.bat"/>
85 <include name="LICENSE.txt"/>
86 <include name="README.txt"/>
87 <include name="server.jar"/>
88 </patternset>
89 </unzip>
90 <echo/>
91
92 <!-- change the tomcat ports in build.properties -->
93 <echo message="Changing tomcat ports in build.properties"/>
94 <rsr file="${installDir}/build.properties" pattern="(tomcat.port[=:]).*" replacement="$1${tomcat.port}" />
95 <rsr file="${installDir}/build.properties" pattern="(tomcat.shutdown.port[=:]).*" replacement="$1${tomcat.shutdown.port}" />
96 <echo message="Changing tomcat ports in resources/tomcat/server.xml"/>
97 <copy file="${installDir}/resources/tomcat/server.xml" tofile="${installDir.local}/packages/tomcat/conf/server.xml" overwrite="true"/>
98
99 <!-- copy the greenstone3.xml file to tomcat -->
100 <echo message="Copying greenstone3.xml to tomcat directory"/>
101 <copy file="${installDir}/resources/tomcat/greenstone3.xml" tofile="${installDir}/packages/tomcat/conf/Catalina/localhost/greenstone3.xml" overwrite="true"/>
102 <rsr file="${installDir}/packages/tomcat/conf/Catalina/localhost/greenstone3.xml" pattern="@gsdl3webhome@" replacement="${installDir.local}\web" />
103
104 <!-- set up global properties -->
105 <echo message="Setting up global properties"/>
106 <copy file="${installDir}/resources/java/global.properties.in" tofile="${installDir}/web/WEB-INF/classes/global.properties" overwrite="true"/>
107 <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="@gsdl3home@" replacement="${installDir.local}\web" />
108 <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="@tomcat.server@" replacement="${tomcat.server}" />
109 <rsr file="${installDir}/web/WEB-INF/classes/global.properties" pattern="@tomcat.port@" replacement="${tomcat.port}" />
110
111 <!-- set up log4j properties-->
112 <echo message="Setting up log4j properties"/>
113 <copy file="${installDir}/resources/java/log4j.properties.in" tofile="${installDir}/web/WEB-INF/classes/log4j.properties" overwrite="true"/>
114 <rsr file="${installDir}/web/WEB-INF/classes/log4j.properties" pattern="@gsdl3home@" replacement="${installDir.local}\web" />
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="install-source-code">
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="install-tomcat">
134
135 <echo message="Installing Apache Tomcat"/>
136 <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="packages/tomcat/**/*"/></patternset></unzip>
137
138 <!-- change the tomcat ports in tomcats server.xml -->
139 <rsr file="${installDir}/packages/tomcat/conf/server.xml" pattern="@server@" replacement="${tomcat.server}" />
140 <rsr file="${installDir}/packages/tomcat/conf/server.xml" pattern="@port@" replacement="${tomcat.port}" />
141 <rsr file="${installDir}/packages/tomcat/conf/server.xml" pattern="@shutdown-port@" replacement="${tomcat.shutdown.port}" />
142
143 </target>
144 <target name="install-ant">
145 <echo message="Installing Apache Ant"/>
146 <unzip src="${antinstaller.jar}" dest="${installDir}"><patternset><include name="packages/ant/**/*"/></patternset></unzip>
147 </target>
148
149 <target name="cleanuptarget">
150 </target>
151
152 <target name="install-start-menu-shortcuts">
153
154 <mkdir dir="${win32.personal.programs_menu}\Greenstone-@version@\documentation"/>
155
156
157 <shortcut
158 file="${win32.personal.programs_menu}\Greenstone-@version@\Greenstone3 Server.lnk"
159 execute="${installDir}\gs3-server.bat"
160 workingDirectory="${installDir}"
161 iconFile="${installDir}\resources\images\gs3.ico"
162 iconIndex="0" />
163
164 <shortcut
165 file="${win32.personal.programs_menu}\Greenstone-@version@\Greenstone Librarian Interface (GLI).lnk"
166 execute="${installDir}\gli\gli4gs3.bat"
167 workingDirectory="${installDir}\gli"
168 iconFile="${installDir}\resources\images\gs3.ico"
169 iconIndex="0" />
170
171 <shortcut
172 file="${win32.personal.programs_menu}\Greenstone-@version@\Greenstone Editor for Metadata Sets (GEMS).lnk"
173 execute="${installDir}\gli\gems4gs3.bat"
174 workingDirectory="${installDir}\gli"
175 iconFile="${installDir}\resources\images\gs3.ico"
176 iconIndex="0" />
177
178 <shortcut
179 file="${win32.personal.programs_menu}\Greenstone-@version@\documentation\README.lnk"
180 execute="${installDir}\README.txt" />
181
182 <shortcut
183 file="${win32.personal.programs_menu}\Greenstone-@version@\documentation\Greenstone3 Users' Guide.lnk"
184 execute="${installDir}\documentation\manual\manual.pdf" />
185
186 <shortcut
187 file="${win32.personal.programs_menu}\Greenstone-@version@\documentation\Greenstone2 Users' Guide.lnk"
188 execute="${installDir}\documentation\manual\gs2_user_en.pdf" />
189
190
191 </target>
192
193</project>
Note: See TracBrowser for help on using the repository browser.