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

Last change on this file since 17119 was 17119, checked in by davidb, 16 years ago

changed linux->windows for db2txt. Looks like an oversight (copy and paste error) when bringing this into the Windows release kit

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