source: release-kits/wirk2/installer/build.xml@ 19379

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

added one more shortcut to the start menu for client gli, and fixed icon paths after new web directory was created

File size: 9.2 KB
RevLine 
[15023]1<?xml version="1.0"?>
2<!--
3This is the build.xml run by AntInstaller for the installer
4-->
5
[16087]6<project name="Installation">
[15023]7
[16931]8 <!-- classpath -->
9 <path id="project.classpath"><pathelement path="${antinstaller.jar}"/></path>
[15023]10
11 <!-- custom tasks -->
[16633]12 <taskdef name="shortcut" classname="com.orangevolt.tools.ant.Win32ShortcutTask" classpathref="project.classpath"/>
13 <taskdef name="winprops" classname="com.orangevolt.tools.ant.Win32PropertiesTask" classpathref="project.classpath"/>
[17107]14 <typedef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/>
15 <typedef name="getfreepath" classname="org.greenstone.anttasks.GetFreePath" classpathref="project.classpath"/>
16 <typedef name="adduser" classname="org.greenstone.anttasks.AddGreenstoneUserToDatabase" classpathref="project.classpath"/>
[17478]17
[16931]18 <!-- pick up the properties generated during the install pages -->
19 <property file="${basedir}/ant.install.properties"/>
20
21 <!-- determine if there is an existing installation in the installDir-->
22 <available file="${installDir}\etc\installation.properties" property="is.overinstall"/>
[15023]23
[16633]24 <!-- load windows properties -->
25 <winprops/>
[16931]26
27 <!-- create a local installDir String -->
28 <path id="installDir.path"><pathelement location="${installDir}"/></path>
29 <property name="installDir.local" refid="installDir.path"/>
30
[17583]31 <target name="Looking For Previous Installation" if="is.overinstall">
[16931]32 <property file="${installDir}\etc\installation.properties"/>
[17638]33 <delete dir="${installed.startmenu.path}" failonerror="false"/>
[16931]34 </target>
[16087]35
[17583]36 <target name="Installing Core System">
[16087]37
[17652]38 <!-- figure out the start menu path -->
[17125]39 <getfreepath path="${win32.personal.programs_menu}\Greenstone-@version@" property="startmenu.path"/>
[17638]40 <path id="startmenu.path.path" path="${startmenu.path}"/>
41 <pathconvert targetos="unix" property="startmenu.path.unix" refid="startmenu.path.path"/>
42
[15023]43 <echo>basedir: ${basedir}</echo>
44 <echo>installDir: ${installDir}</echo>
45 <echo>antinstaller.jar: ${antinstaller.jar}</echo>
[17125]46 <echo>startmenu.path: ${startmenu.path}</echo>
[16087]47
48 <!-- create the installation directory -->
49 <echo message="Creating Installation directory"/>
[15023]50 <mkdir dir="${installDir}"/>
[17413]51
[17381]52 <!-- extract 7za tool -->
53 <unzip src="${antinstaller.jar}" dest="${basedir}">
54 <patternset><include name="7za.exe"/></patternset>
[15023]55 </unzip>
[17413]56
[17381]57 <!-- install files -->
58 <echo message="Installing Core Component"/>
59 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="core.lzma"/></patternset></unzip>
60 <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x core.lzma"/></exec>
[17413]61 <!--<sevenzip task="decode" input="${basedir}/core.lzma" output="${basedir}/core.comp"/>-->
[17381]62 <delete file="core.lzma"/>
63 <unzip src="${basedir}/core.comp" dest="${installDir}"/>
64 <delete file="core.comp"/>
[17444]65
66 <!-- jre -->
67 <mkdir dir="${installDir}/packages"/>
[17583]68 <copy todir="${installDir}/packages/jre" failonerror="false">
[17444]69 <fileset dir="../@windows-java.extracted@"/>
[17470]70 </copy>
[17381]71
[18976]72 <echo>Correcting perl shebangs in perl scripts</echo>
73 <property name="perl.executable" value="${installDir.local}\bin\windows\perl\perl.exe"/>
74 <rsr file="${installDir}/cgi-bin/gliserver.pl" pattern="^#!.*" replacement="#!${perl.executable} -w" lines="1"/>
75
[18980]76 <echo>Creating the english dictionary</echo>
77 <copy file="${installDir}/gli/classes/dictionary.properties" tofile="${installDir}/gli/classes/dictionary_en.properties"/>
78 <echo/>
79
[16948]80 <echo message="Creating installation properties file"/>
[17638]81 <echo file="${installDir}\etc\installation.properties">installed.startmenu.path:${startmenu.path.unix}</echo>
[17125]82
[16087]83 <echo message="Finished"/>
[16633]84
[15023]85 </target>
86
[17583]87 <target name="Installing ImageMagick">
[17381]88 <echo message="Installing ImageMagick"/>
89 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="imagemagick.lzma"/></patternset></unzip>
90 <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x imagemagick.lzma"/></exec>
[17413]91 <!--<sevenzip task="decode" input="${basedir}/imagemagick.lzma" output="${basedir}/imagemagick.comp"/>-->
[17381]92 <delete file="imagemagick.lzma"/>
93 <unzip src="${basedir}/imagemagick.comp" dest="${installDir}/bin/windows"/>
94 <delete file="imagemagick.comp"/>
95 </target>
96
[17576]97 <target name="Installing Ghostscript">
[17381]98 <echo message="Installing GhostScript"/>
99 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="ghostscript.lzma"/></patternset></unzip>
100 <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x ghostscript.lzma"/></exec>
[17413]101 <!--<sevenzip task="decode" input="${basedir}/ghostscript.lzma" output="${basedir}/ghostscript.comp"/>-->
[17381]102 <delete file="ghostscript.lzma"/>
103 <unzip src="${basedir}/ghostscript.comp" dest="${installDir}/bin/windows"/>
104 <delete file="ghostscript.comp"/>
105 </target>
106
[16633]107 <!-- Start menu shortcuts -->
[17576]108 <target name="Installing Start Menu Shortcuts">
[15023]109
[16917]110 <mkdir dir="${startmenu.path}\Documentation"/>
111
[16633]112 <shortcut
[18059]113 file="${startmenu.path}\Greenstone Server.lnk"
[16774]114 execute="${installDir}\server.exe"
[16633]115 workingDirectory="${installDir}"
[19379]116 iconFile="${installDir}\web\images\serverico.ico"
[16633]117 iconIndex="0" />
[17814]118
[16633]119 <shortcut
[18047]120 file="${startmenu.path}\Librarian Interface (GLI).lnk"
[16633]121 execute="${installDir}\gli\gli.bat"
122 workingDirectory="${installDir}\gli"
[19379]123 iconFile="${installDir}\web\images\icon.ico"
[16633]124 iconIndex="0" />
[17814]125
[16633]126 <shortcut
[19379]127 file="${startmenu.path}\Librarian Interface for Remote Server (Client GLI).lnk"
128 execute="${installDir}\gli\client-gli.bat"
129 workingDirectory="${installDir}\gli"
130 iconFile="${installDir}\web\images\icon.ico"
131 iconIndex="0" />
132
133 <shortcut
[18059]134 file="${startmenu.path}\Metadata Set Editor (GEMS).lnk"
[17381]135 execute="${installDir}\gli\gems.bat"
[16633]136 workingDirectory="${installDir}\gli"
[19379]137 iconFile="${installDir}\web\images\gems.ico"
[16633]138 iconIndex="0" />
[17814]139
[16633]140 <shortcut
[17257]141 file="${startmenu.path}\Uninstall.lnk"
[17436]142 execute="${installDir}\Uninstall.bat"
[17257]143 workingDirectory="${installDir}"
[19379]144 iconFile="${installDir}\web\images\uninstall.ico"
[17257]145 iconIndex="0" />
[17814]146
[17257]147 <shortcut
[16917]148 file="${startmenu.path}\Documentation\READMEen.lnk"
[16633]149 execute="${installDir}\READMEen.txt" />
[17814]150
[16633]151 <shortcut
[18067]152 file="${startmenu.path}\Documentation\Greenstone Wiki.url"
153 url="http://wiki.greenstone.org" />
154
[19379]155 <shortcut
[18067]156 file="${startmenu.path}\Documentation\Greenstone Website.url"
157 url="http://www.greenstone.org" />
158
159<!--
160 <shortcut
[16917]161 file="${startmenu.path}\Documentation\READMEes.lnk"
[16633]162 execute="${installDir}\READMEes.txt" />
[17814]163
[16633]164 <shortcut
[16917]165 file="${startmenu.path}\Documentation\READMEar.lnk"
[16633]166 execute="${installDir}\READMEar.txt" />
[17814]167
[16633]168 <shortcut
[16917]169 file="${startmenu.path}\Documentation\READMEfr.lnk"
[16633]170 execute="${installDir}\READMEfr.txt" />
[17814]171
[16633]172 <shortcut
[16917]173 file="${startmenu.path}\Documentation\READMEru.lnk"
[16633]174 execute="${installDir}\READMEru.txt" />
[18067]175 -->
[17814]176
[15023]177 </target>
[16633]178
[17815]179 <target name="Source Release" depends="">
180
181 <!-- create the installation directory -->
182 <echo message="Creating Installation directory"/>
183 <mkdir dir="${installDir}"/>
184
185 <!-- extract 7za tool -->
186 <unzip src="${antinstaller.jar}" dest="${basedir}">
187 <patternset><include name="7za.exe"/></patternset>
188 </unzip>
189
190 <echo>Installing Source Release</echo>
191 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="source-release.lzma"/></patternset></unzip>
192 <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x source-release.lzma"/></exec>
193 <delete file="source-release.lzma"/>
194 <unzip src="${basedir}/source-release.comp" dest="${installDir}"/>
195 <delete file="source-release.comp"/>
196
197 <!-- figure out the start menu path -->
198 <getfreepath path="${win32.personal.programs_menu}\Greenstone-@version@" property="startmenu.path"/>
199 <path id="startmenu.path.path" path="${startmenu.path}"/>
200 <pathconvert targetos="unix" property="startmenu.path.unix" refid="startmenu.path.path"/>
201
202 <echo message="Filling in concrete values in config files"/>
203 <rsr file="${installDir}/setup.bat" pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
204 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg">
205 <job pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
206 <job pattern="^(#?httpprefix).*" replacement="$1 /gsdl"/>
207 <job pattern="^(#?httpimg).*" replacement="$1 /gsdl/images"/>
208 </rsr>
209
210 <echo>Create usage.txt</echo>
211 <echo file="${installDir}/etc/usage.txt"></echo>
212
213 <echo message="Creating installation properties file"/>
214 <echo file="${installDir}\etc\installation.properties">installed.startmenu.path:${startmenu.path.unix}</echo>
215
216 <echo message="Finished"/>
217
218 </target>
219
[19201]220 <target name="Configuring Administration Pages" if="enable.admin.pages">
221 <echo>Enabling Admin Pages</echo>
222 <rsr file="${installDir}/etc/main.cfg" pattern="^\s*status\s+.*" replacement="status enabled"/>
223 <echo message="Creating admin and demo users"/>
224 <adduser
225 txt2db="${installDir}/bin/windows/txt2db"
226 usersDb="${installDir}/etc/users.gdb"
227 username="admin"
228 password="${admin.password}"
[19256]229 groups="administrator,colbuilder,all-collections-editor"
[19201]230 comment="created at install time"/>
231 <adduser
232 txt2db="${installDir}/bin/windows/txt2db"
233 usersDb="${installDir}/etc/users.gdb"
234 username="demo"
235 password="demo"
236 groups="demo"
237 comment="Dummy 'demo' user with password 'demo' for authen-e collection"/>
238 </target>
[17815]239
[19201]240
241
[15023]242</project>
Note: See TracBrowser for help on using the repository browser.