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

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

added the uninstaller to all release kits

File size: 6.3 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 <!-- classpath -->
9 <path id="project.classpath"><pathelement path="${antinstaller.jar}"/></path>
10
11 <!-- custom tasks -->
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"/>
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"/>
17
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"/>
23
24 <!-- load windows properties -->
25 <winprops/>
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
31 <target name="load-previous-props" if="is.overinstall">
32 <property file="${installDir}\etc\installation.properties"/>
33 </target>
34
35 <target name="install-core-components" depends="load-previous-props">
36
37 <!-- figure out the start menu path (if not already set from previous installation) -->
38 <getfreepath path="${win32.personal.programs_menu}\Greenstone-@version@" property="startmenu.path"/>
39
40 <echo>basedir: ${basedir}</echo>
41 <echo>installDir: ${installDir}</echo>
42 <echo>antinstaller.jar: ${antinstaller.jar}</echo>
43 <echo>startmenu.path: ${startmenu.path}</echo>
44
45 <!-- create the installation directory -->
46 <echo message="Creating Installation directory"/>
47 <mkdir dir="${installDir}"/>
48
49 <!-- install files -->
50 <echo message="Installing Files"/>
51 <unzip src="${antinstaller.jar}" dest="${installDir}">
52 <patternset>
53
54 <include name="gli/**/*"/>
55 <include name="bin/**/*"/>
56 <include name="cgi-bin/**/*"/>
57 <include name="etc/**/*"/>
58 <include name="mappings/**/*"/>
59 <include name="images/**/*"/>
60 <include name="perllib/**/*"/>
61 <include name="indexers/**/*"/>
62 <include name="macros/**/*"/>
63 <include name="collect/**/*"/>
64
65 <include name="LICENSE.txt"/>
66 <include name="READMEar.txt"/>
67 <include name="READMEes.txt"/>
68 <include name="READMEen.txt"/>
69 <include name="READMEfr.txt"/>
70 <include name="READMEru.txt"/>
71 <include name="setup.bat"/>
72 <include name="server.exe"/>
73 <include name="Uninstall.jar"/>
74 <include name="gsdlsite.cfg"/>
75
76 </patternset>
77 </unzip>
78 <echo/>
79
80 <echo message="Creating admin and demo users"/>
81 <adduser txt2db="${installDir}/bin/windows/txt2db"
82 usersDb="${installDir}/etc/users.db"
83 username="admin"
84 password="${admin.password}"
85 groups="administrator,colbuilder"
86 comment="created at install time"/>
87 <adduser
88 txt2db="${installDir}/bin/windows/txt2db"
89 usersDb="${installDir}/etc/users.db"
90 username="demo"
91 password="demo"
92 groups="demo"
93 comment="Dummy 'demo' user with password 'demo' for authen-e collection"/>
94
95 <!-- delete unneeded files -->
96 <echo message="Deleting some unneeded files"/>
97 <delete dir="${installDir}/resources/icons"/>
98 <delete file="${installDir}/resources/*.png"/>
99
100 <echo message="Filling in concrete values in config files"/>
101 <rsr
102 file="${installDir}/setup.bat"
103 pattern="\*\*GSDLHOME\*\*"
104 replacement="${installDir}"/>
105 <rsr
106 file="${installDir}/cgi-bin/gsdlsite.cfg"
107 pattern="\*\*GSDLHOME\*\*"
108 replacement="${installDir}"/>
109
110 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpprefix).*" replacement="$1 /gsdl"/>
111 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpimg).*" replacement="$1 /gsdl/images"/>
112
113 <rsr file="${installDir}/gsdlsite.cfg" pattern="@gsdlhome@" replacement="${installDir}"/>
114
115 <echo message="Creating installation properties file"/>
116 <echo file="${installDir}\etc\installation.properties">startmenu.path:${startmenu.path}</echo>
117
118 <echo message="Finished"/>
119
120 </target>
121
122 <!-- Source -->
123 <target name="install-source-code" depends="">
124
125 <echo message="Installing Source Code"/>
126 <unzip src="${antinstaller.jar}" dest="${installDir}">
127 <patternset>
128 <include name="common-src/**/*"/>
129 <include name="runtime-src/**/*"/>
130 <include name="build-src/**/*"/>
131 <include name="packages/**/*"/>
132 </patternset>
133 </unzip>
134
135 </target>
136
137 <!-- Start menu shortcuts -->
138 <target name="install-start-menu-shortcuts">
139
140 <mkdir dir="${startmenu.path}\Documentation"/>
141
142 <shortcut
143 file="${startmenu.path}\Greenstone2 Server.lnk"
144 execute="${installDir}\server.exe"
145 workingDirectory="${installDir}"
146 iconFile="${installDir}\images\icon.ico"
147 iconIndex="0" />
148 <shortcut
149 file="${startmenu.path}\Greenstone Librarian Interface (GLI).lnk"
150 execute="${installDir}\gli\gli.bat"
151 workingDirectory="${installDir}\gli"
152 iconFile="${installDir}\images\icon.ico"
153 iconIndex="0" />
154 <shortcut
155 file="${startmenu.path}\Greenstone Editor for Metadata Sets (GEMS).lnk"
156 execute="${installDir}\gli\gems4gs3.bat"
157 workingDirectory="${installDir}\gli"
158 iconFile="${installDir}\images\icon.ico"
159 iconIndex="0" />
160 <shortcut
161 file="${startmenu.path}\Uninstall.lnk"
162 execute="${installDir}\bin\windows\search4j.exe -h packages\jre -l Uninstaller.jar"
163 workingDirectory="${installDir}"
164 iconFile="${installDir}\images\icon.ico"
165 iconIndex="0" />
166 <shortcut
167 file="${startmenu.path}\Documentation\READMEen.lnk"
168 execute="${installDir}\READMEen.txt" />
169 <shortcut
170 file="${startmenu.path}\Documentation\READMEes.lnk"
171 execute="${installDir}\READMEes.txt" />
172 <shortcut
173 file="${startmenu.path}\Documentation\READMEar.lnk"
174 execute="${installDir}\READMEar.txt" />
175 <shortcut
176 file="${startmenu.path}\Documentation\READMEfr.lnk"
177 execute="${installDir}\READMEfr.txt" />
178 <shortcut
179 file="${startmenu.path}\Documentation\READMEru.lnk"
180 execute="${installDir}\READMEru.txt" />
181 </target>
182
183 <target name="cleanuptarget"></target>
184
185
186</project>
Note: See TracBrowser for help on using the repository browser.