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

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

have the installer use the new license file

File size: 5.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 <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
69 </patternset>
70 </unzip>
71 <echo/>
72
73 <!-- delete unneeded files -->
74 <echo message="Deleting some unneeded files"/>
75 <delete dir="${installDir}/resources/icons"/>
76 <delete file="${installDir}/resources/*.png"/>
77
78 <echo message="Setting GSDLHOME in config files"/>
79 <rsr
80 file="${installDir}/setup.bat"
81 pattern="\*\*GSDLHOME\*\*"
82 replacement="${installDir}"/>
83 <rsr
84 file="${installDir}/cgi-bin/gsdlsite.cfg"
85 pattern="\*\*GSDLHOME\*\*"
86 replacement="${installDir}"/>
87
88 <echo message="Creating installation properties file"/>
89 <echo file="${installDir}\etc\installation.properties">startmenu.path:@startmanu.path@</echo>
90
91 <echo message="Finished"/>
92
93 </target>
94
95 <!-- Source -->
96 <target name="install-source-code" depends="">
97
98 <echo message="Installing Source Code"/>
99 <unzip src="${antinstaller.jar}" dest="${installDir}">
100 <patternset>
101 <include name="common-src/**/*"/>
102 <include name="runtime-src/**/*"/>
103 <include name="build-src/**/*"/>
104 <include name="packages/**/*"/>
105 </patternset>
106 </unzip>
107
108 </target>
109
110 <!-- Start menu shortcuts -->
111 <target name="install-start-menu-shortcuts">
112
113 <!-- figure out the start menu path (if not already set from previous installation) -->
114 <getfreepath path="${win32.personal.programs_menu}\Greenstone-@version@" property="startmenu.path"/>
115
116 <mkdir dir="${startmenu.path}\Documentation"/>
117
118 <shortcut
119 file="${startmenu.path}\Greenstone2 Server.lnk"
120 execute="${installDir}\server.exe"
121 workingDirectory="${installDir}"
122 iconFile="${installDir}\images\icon.ico"
123 iconIndex="0" />
124
125 <shortcut
126 file="${startmenu.path}\Greenstone Librarian Interface (GLI).lnk"
127 execute="${installDir}\gli\gli.bat"
128 workingDirectory="${installDir}\gli"
129 iconFile="${installDir}\images\icon.ico"
130 iconIndex="0" />
131
132 <shortcut
133 file="${startmenu.path}\Greenstone Editor for Metadata Sets (GEMS).lnk"
134 execute="${installDir}\gli\gems4gs3.bat"
135 workingDirectory="${installDir}\gli"
136 iconFile="${installDir}\images\icon.ico"
137 iconIndex="0" />
138
139 <shortcut
140 file="${startmenu.path}\Documentation\READMEen.lnk"
141 execute="${installDir}\READMEen.txt" />
142 <shortcut
143 file="${startmenu.path}\Documentation\READMEes.lnk"
144 execute="${installDir}\READMEes.txt" />
145 <shortcut
146 file="${startmenu.path}\Documentation\READMEar.lnk"
147 execute="${installDir}\READMEar.txt" />
148 <shortcut
149 file="${startmenu.path}\Documentation\READMEfr.lnk"
150 execute="${installDir}\READMEfr.txt" />
151 <shortcut
152 file="${startmenu.path}\Documentation\READMEru.lnk"
153 execute="${installDir}\READMEru.txt" />
154
155 <rsr file="${installDir}\etc\installation.properties" pattern="@startmenu.path@" replacement="${startmenu.path}" winPath="true"/>
156
157 </target>
158
159
160 <target name="cleanuptarget"></target>
161
162
163</project>
Note: See TracBrowser for help on using the repository browser.