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

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

create the english gli dictionary at install

File size: 10.9 KB
RevLine 
[15023]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 -->
[15381]16 <taskdef name="shortcut" classname="com.orangevolt.tools.ant.Win32ShortcutTask" classpathref="project.classpath"/>
17 <taskdef name="winprops" classname="com.orangevolt.tools.ant.Win32PropertiesTask" classpathref="project.classpath"/>
[17107]18 <typedef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/>
19 <typedef name="getfreepath" classname="org.greenstone.anttasks.GetFreePath" classpathref="project.classpath"/>
[17477]20
[15095]21 <!-- create a local installDir String -->
22 <path id="installDir.path">
23 <pathelement location="${installDir}"/>
24 </path>
25 <property name="installDir.local" refid="installDir.path"/>
[17370]26 <pathconvert targetos="unix" property="installDir.unix" refid="installDir.path"/>
[17636]27
[16631]28 <!-- load windows properties -->
29 <winprops/>
[16930]30
31 <!-- determine if there is an existing installation in the installDir-->
32 <available file="${installDir}\installation.properties" property="is.overinstall"/>
33
[17597]34 <target name="Looking For Previous Installation" if="is.overinstall">
[17636]35 <property file="${installDir}\installation.properties"/>
36 <delete dir="${installed.startmenu.path}" failonerror="false"/>
[16930]37 </target>
[15095]38
[17597]39 <target name="Installing Core System">
[15023]40
[17652]41 <!-- figure out the start menu path -->
[17124]42 <getfreepath path="${win32.personal.programs_menu}\Greenstone-@version@" property="startmenu.path"/>
[17636]43 <path id="startmenu.path.path" path="${startmenu.path}"/>
44 <pathconvert targetos="unix" property="startmenu.path.unix" refid="startmenu.path.path"/>
45
[15023]46 <echo>basedir: ${basedir}</echo>
47 <echo>installDir: ${installDir}</echo>
48 <echo>antinstaller.jar: ${antinstaller.jar}</echo>
[17124]49 <echo>startmenu.path: ${startmenu.path}</echo>
50
51 <!-- create the installation directory -->
52 <echo message="Creating Installation directory"/>
[15023]53 <mkdir dir="${installDir}"/>
[17370]54
55 <!-- extract 7za tool -->
56 <unzip src="${antinstaller.jar}" dest="${basedir}">
57 <patternset><include name="7za.exe"/></patternset>
58 </unzip>
[17124]59
[16749]60 <!-- install files -->
[17370]61 <echo message="Installing Core Component"/>
62 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="core.lzma"/></patternset></unzip>
63 <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x core.lzma"/></exec>
64 <delete file="core.lzma"/>
65 <unzip src="${basedir}/core.comp" dest="${installDir}"/>
66 <delete file="core.comp"/>
[17444]67
68 <!-- jre -->
69 <mkdir dir="${installDir}/packages"/>
[17641]70 <copy todir="${installDir}/packages/jre" failonerror="false">
[17444]71 <fileset dir="../@windows-java.extracted@"/>
[17470]72 </copy>
[17444]73
[17652]74 <!-- change the tomcat ports in build.properties -->
75 <echo message="Changing tomcat ports in build.properties"/>
76 <rsr file="${installDir}/build.properties" pattern="(tomcat.port[=:]).*" replacement="$1${tomcat.port}" />
77 <rsr file="${installDir}/build.properties" pattern="(tomcat.shutdown.port[=:]).*" replacement="$1${tomcat.shutdown.port}" />
78 <echo message="Changing tomcat ports in resources/tomcat/server.xml"/>
79 <copy file="${installDir}/resources/tomcat/server.xml" tofile="${installDir.local}/packages/tomcat/conf/server.xml" overwrite="true"/>
[15812]80
[17652]81 <!-- set gsdlhome in gs2build setup.bat -->
82 <echo message="Setting %GSDLHOME% in gs2build\setup.bat"/>
83 <rsr file="${installDir}/gs2build/setup.bat" pattern="\*\*GSDLHOME\*\*" replacement="${installDir.local}\gs2build" />
84 <!-- copy the greenstone3.xml file to tomcat -->
85 <echo message="Copying greenstone3.xml to tomcat directory"/>
86 <copy file="${installDir}/resources/tomcat/greenstone3.xml" tofile="${installDir}/packages/tomcat/conf/Catalina/localhost/greenstone3.xml" overwrite="true"/>
87 <rsr file="${installDir}/packages/tomcat/conf/Catalina/localhost/greenstone3.xml" pattern="@gsdl3webhome@" replacement="${installDir.local}\web" />
88
89 <!-- set up global properties -->
90 <echo message="Setting up global properties"/>
91 <copy file="${installDir}/resources/java/global.properties.in" tofile="${installDir}/web/WEB-INF/classes/global.properties" overwrite="true"/>
92 <rsr file="${installDir}/web/WEB-INF/classes/global.properties">
93 <job pattern="@gsdl3home@" replacement="${installDir.unix}/web" />
94 <job pattern="@tomcat.server@" replacement="${tomcat.server}" />
95 <job pattern="@tomcat.port@" replacement="${tomcat.port}" />
96 </rsr>
97
98 <!-- set up log4j properties-->
99 <echo message="Setting up log4j properties"/>
100 <copy file="${installDir}/resources/java/log4j.properties.in" tofile="${installDir}/web/WEB-INF/classes/log4j.properties" overwrite="true"/>
101 <rsr file="${installDir}/web/WEB-INF/classes/log4j.properties" pattern="@gsdl3home@" replacement="${installDir.unix}/web"/>
102
[18980]103 <echo>Creating the english dictionary</echo>
104 <copy file="${installDir}/gli/classes/dictionary.properties" tofile="${installDir}/gli/classes/dictionary_en.properties"/>
105 <echo/>
106
[17814]107 <echo>Create usage.txt</echo>
108 <echo file="${installDir}/gs2build/etc/usage.txt"></echo>
109
[17652]110 <echo message="Creating installation properties file"/>
111 <echo file="${installDir}\installation.properties">installed.startmenu.path:${startmenu.path.unix}</echo>
112
113 </target>
114
115
[17597]116 <target name="Installing Tomcat">
[15356]117
118 <echo message="Installing Apache Tomcat"/>
[17370]119 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="tomcat.lzma"/></patternset></unzip>
120 <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x tomcat.lzma"/></exec>
121 <delete file="tomcat.lzma"/>
122 <unzip src="${basedir}/tomcat.comp" dest="${installDir}/packages"/>
123 <delete file="tomcat.comp"/>
124
[15356]125 <!-- change the tomcat ports in tomcats server.xml -->
126 <rsr file="${installDir}/packages/tomcat/conf/server.xml" pattern="@server@" replacement="${tomcat.server}" />
127 <rsr file="${installDir}/packages/tomcat/conf/server.xml" pattern="@port@" replacement="${tomcat.port}" />
128 <rsr file="${installDir}/packages/tomcat/conf/server.xml" pattern="@shutdown-port@" replacement="${tomcat.shutdown.port}" />
129
130 </target>
[17370]131
[17597]132 <target name="Installing Ant">
[15356]133 <echo message="Installing Apache Ant"/>
[17370]134 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="ant.lzma"/></patternset></unzip>
135 <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x ant.lzma"/></exec>
136 <delete file="ant.lzma"/>
137 <unzip src="${basedir}/ant.comp" dest="${installDir}/packages"/>
138 <delete file="ant.comp"/>
[15356]139 </target>
[17370]140
[17597]141 <target name="Installing ImageMagick">
[17370]142 <echo message="Installing ImageMagick"/>
143 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="imagemagick.lzma"/></patternset></unzip>
144 <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x imagemagick.lzma"/></exec>
145 <delete file="imagemagick.lzma"/>
146 <unzip src="${basedir}/imagemagick.comp" dest="${installDir}/gs2build/bin/windows"/>
147 <delete file="imagemagick.comp"/>
148 </target>
149
[17597]150 <target name="Installing Ghostscript">
[17370]151 <echo message="Installing GhostScript"/>
152 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="ghostscript.lzma"/></patternset></unzip>
153 <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x ghostscript.lzma"/></exec>
154 <delete file="ghostscript.lzma"/>
155 <unzip src="${basedir}/ghostscript.comp" dest="${installDir}/gs2build/bin/windows"/>
156 <delete file="ghostscript.comp"/>
157 </target>
[15356]158
[17597]159 <target name="Installing Start Menu Shortcuts">
[15023]160
[16930]161 <mkdir dir="${startmenu.path}\Documentation"/>
162
[15381]163 <shortcut
[16930]164 file="${startmenu.path}\Greenstone3 Server.lnk"
[15691]165 execute="${installDir}\gs3-server.bat"
[15381]166 workingDirectory="${installDir}"
[15691]167 iconFile="${installDir}\resources\images\gs3.ico"
[15381]168 iconIndex="0" />
[15691]169
170 <shortcut
[16930]171 file="${startmenu.path}\Greenstone Librarian Interface (GLI).lnk"
[16284]172 execute="${installDir}\gli\gli.bat"
[15691]173 workingDirectory="${installDir}\gli"
174 iconFile="${installDir}\resources\images\gs3.ico"
175 iconIndex="0" />
[15381]176
[15691]177 <shortcut
[16930]178 file="${startmenu.path}\Greenstone Editor for Metadata Sets (GEMS).lnk"
[17255]179 execute="${installDir}\gli\gems.bat"
[15691]180 workingDirectory="${installDir}\gli"
181 iconFile="${installDir}\resources\images\gs3.ico"
182 iconIndex="0" />
[17257]183
184 <shortcut
185 file="${startmenu.path}\Uninstall.lnk"
[17473]186 execute="${installDir}\Uninstall.bat"
[17257]187 workingDirectory="${installDir}"
[17610]188 iconFile="${installDir}\resources\images\gs3.ico"
[17257]189 iconIndex="0" />
[17339]190
[15691]191 <shortcut
[16930]192 file="${startmenu.path}\Documentation\README.lnk"
[15691]193 execute="${installDir}\README.txt" />
[16930]194
[15691]195 <shortcut
[16930]196 file="${startmenu.path}\Documentation\Greenstone3 Users' Guide.lnk"
[15691]197 execute="${installDir}\documentation\manual\manual.pdf" />
[16930]198
[15691]199 <shortcut
[16930]200 file="${startmenu.path}\Documentation\Greenstone2 Users' Guide.lnk"
[15691]201 execute="${installDir}\documentation\manual\gs2_user_en.pdf" />
[16930]202
[15381]203 </target>
[17815]204
205 <target name="Source Release" depends="">
206
207 <!-- create the installation directory -->
208 <echo message="Creating Installation directory"/>
209 <mkdir dir="${installDir}"/>
210
211 <!-- extract 7za tool -->
212 <unzip src="${antinstaller.jar}" dest="${basedir}">
213 <patternset><include name="7za.exe"/></patternset>
214 </unzip>
215
216 <echo>Installing Source Release</echo>
217 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="source-release.lzma"/></patternset></unzip>
218 <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x source-release.lzma"/></exec>
219 <delete file="source-release.lzma"/>
220 <unzip src="${basedir}/source-release.comp" dest="${installDir}"/>
221 <delete file="source-release.comp"/>
222
223 <!-- set gsdlhome in gs2build setup.bat -->
224 <echo message="Setting %GSDLHOME% in gs2build\setup.bat"/>
225 <rsr file="${installDir}/gs2build/setup.bat" pattern="\*\*GSDLHOME\*\*" replacement="${installDir.local}\gs2build" />
226
227 <!-- set up global properties -->
228 <echo message="Setting up global properties"/>
229 <copy file="${installDir}/resources/java/global.properties.in" tofile="${installDir}/web/WEB-INF/classes/global.properties" overwrite="true"/>
230 <rsr file="${installDir}/web/WEB-INF/classes/global.properties">
231 <job pattern="@gsdl3home@" replacement="${installDir.unix}/web" />
232 <job pattern="@tomcat.server@" replacement="${tomcat.server}" />
233 <job pattern="@tomcat.port@" replacement="${tomcat.port}" />
234 </rsr>
235
236 <!-- set up log4j properties-->
237 <echo message="Setting up log4j properties"/>
238 <copy file="${installDir}/resources/java/log4j.properties.in" tofile="${installDir}/web/WEB-INF/classes/log4j.properties" overwrite="true"/>
239 <rsr file="${installDir}/web/WEB-INF/classes/log4j.properties" pattern="@gsdl3home@" replacement="${installDir.unix}/web"/>
240
241 <echo>Create usage.txt</echo>
242 <echo file="${installDir}/gs2build/etc/usage.txt"></echo>
243
244 <echo message="Creating installation properties file"/>
245 <echo file="${installDir}\installation.properties">installed.startmenu.path:${startmenu.path.unix}</echo>
246
247 </target>
248
249
[15381]250
[15023]251</project>
Note: See TracBrowser for help on using the repository browser.