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

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

corrected a spelling mistake and made default gsdlsite.cfg appear in root of install at install time

File size: 5.4 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 <typedef name="rsr" classname="RegexSearchReplace" classpathref="project.classpath"/>
13 <typedef name="getfreepath" classname="GetFreePath" classpathref="project.classpath"/>
14 <taskdef name="shortcut" classname="com.orangevolt.tools.ant.Win32ShortcutTask" classpathref="project.classpath"/>
15 <taskdef name="winprops" classname="com.orangevolt.tools.ant.Win32PropertiesTask" classpathref="project.classpath"/>
16
17 <!-- pick up the properties generated during the install pages -->
18 <property file="${basedir}/ant.install.properties"/>
19
20 <!-- determine if there is an existing installation in the installDir-->
21 <available file="${installDir}\etc\installation.properties" property="is.overinstall"/>
22
23 <!-- load windows properties -->
24 <winprops/>
25
26 <!-- create a local installDir String -->
27 <path id="installDir.path"><pathelement location="${installDir}"/></path>
28 <property name="installDir.local" refid="installDir.path"/>
29
30 <target name="load-previous-props" if="is.overinstall">
31 <property file="${installDir}\etc\installation.properties"/>
32 </target>
33
34 <target name="install-core-components" depends="load-previous-props">
35
36 <echo>basedir: ${basedir}</echo>
37 <echo>installDir: ${installDir}</echo>
38 <echo>antinstaller.jar: ${antinstaller.jar}</echo>
39
40 <!-- create the installation directory -->
41 <echo message="Creating Installation directory"/>
42 <mkdir dir="${installDir}"/>
43
44 <!-- install files -->
45 <echo message="Installing Files"/>
46 <unzip src="${antinstaller.jar}" dest="${installDir}">
47 <patternset>
48
49 <include name="gli/**/*"/>
50 <include name="bin/**/*"/>
51 <include name="cgi-bin/**/*"/>
52 <include name="etc/**/*"/>
53 <include name="mappings/**/*"/>
54 <include name="images/**/*"/>
55 <include name="perllib/**/*"/>
56 <include name="indexers/**/*"/>
57 <include name="macros/**/*"/>
58 <include name="collect/**/*"/>
59
60 <include name="LICENSE.txt"/>
61 <include name="READMEar.txt"/>
62 <include name="READMEes.txt"/>
63 <include name="READMEen.txt"/>
64 <include name="READMEfr.txt"/>
65 <include name="READMEru.txt"/>
66 <include name="setup.bat"/>
67 <include name="server.exe"/>
68 <include name="gsdlsite.cfg"/>
69
70 </patternset>
71 </unzip>
72 <echo/>
73
74 <!-- delete unneeded files -->
75 <echo message="Deleting some unneeded files"/>
76 <delete dir="${installDir}/resources/icons"/>
77 <delete file="${installDir}/resources/*.png"/>
78
79 <echo message="Filling in concrete values in config files"/>
80 <rsr
81 file="${installDir}/setup.bat"
82 pattern="\*\*GSDLHOME\*\*"
83 replacement="${installDir}"/>
84 <rsr
85 file="${installDir}/cgi-bin/gsdlsite.cfg"
86 pattern="\*\*GSDLHOME\*\*"
87 replacement="${installDir}"/>
88
89 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpprefix).*" replacement="$1 /gsdl"/>
90 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpimg).*" replacement="$1 /gsdl/images"/>
91
92 <rsr file="${installDir}/gsdlsite.cfg" pattern="@gsdlhome@" replacement="${installDir}"/>
93
94 <echo message="Creating installation properties file"/>
95 <echo file="${installDir}\etc\installation.properties">startmenu.path:@startmenu.path@</echo>
96
97 <echo message="Finished"/>
98
99 </target>
100
101 <!-- Source -->
102 <target name="install-source-code" depends="">
103
104 <echo message="Installing Source Code"/>
105 <unzip src="${antinstaller.jar}" dest="${installDir}">
106 <patternset>
107 <include name="common-src/**/*"/>
108 <include name="runtime-src/**/*"/>
109 <include name="build-src/**/*"/>
110 <include name="packages/**/*"/>
111 </patternset>
112 </unzip>
113
114 </target>
115
116 <!-- Start menu shortcuts -->
117 <target name="install-start-menu-shortcuts">
118
119 <!-- figure out the start menu path (if not already set from previous installation) -->
120 <getfreepath path="${win32.personal.programs_menu}\Greenstone-@version@" property="startmenu.path"/>
121
122 <mkdir dir="${startmenu.path}\Documentation"/>
123
124 <shortcut
125 file="${startmenu.path}\Greenstone2 Server.lnk"
126 execute="${installDir}\server.exe"
127 workingDirectory="${installDir}"
128 iconFile="${installDir}\images\icon.ico"
129 iconIndex="0" />
130
131 <shortcut
132 file="${startmenu.path}\Greenstone Librarian Interface (GLI).lnk"
133 execute="${installDir}\gli\gli.bat"
134 workingDirectory="${installDir}\gli"
135 iconFile="${installDir}\images\icon.ico"
136 iconIndex="0" />
137
138 <shortcut
139 file="${startmenu.path}\Greenstone Editor for Metadata Sets (GEMS).lnk"
140 execute="${installDir}\gli\gems4gs3.bat"
141 workingDirectory="${installDir}\gli"
142 iconFile="${installDir}\images\icon.ico"
143 iconIndex="0" />
144
145 <shortcut
146 file="${startmenu.path}\Documentation\READMEen.lnk"
147 execute="${installDir}\READMEen.txt" />
148 <shortcut
149 file="${startmenu.path}\Documentation\READMEes.lnk"
150 execute="${installDir}\READMEes.txt" />
151 <shortcut
152 file="${startmenu.path}\Documentation\READMEar.lnk"
153 execute="${installDir}\READMEar.txt" />
154 <shortcut
155 file="${startmenu.path}\Documentation\READMEfr.lnk"
156 execute="${installDir}\READMEfr.txt" />
157 <shortcut
158 file="${startmenu.path}\Documentation\READMEru.lnk"
159 execute="${installDir}\READMEru.txt" />
160
161 <rsr file="${installDir}\etc\installation.properties" pattern="@startmenu.path@" replacement="${startmenu.path}" winPath="true"/>
162
163 </target>
164
165
166 <target name="cleanuptarget"></target>
167
168
169</project>
Note: See TracBrowser for help on using the repository browser.