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

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

jre now part of core

File size: 7.6 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 <taskdef name="sevenzip" classname="org.apache.tools.ant.SevenZip" classpathref="project.classpath"/>
18
19 <!-- pick up the properties generated during the install pages -->
20 <property file="${basedir}/ant.install.properties"/>
21
22 <!-- determine if there is an existing installation in the installDir-->
23 <available file="${installDir}\etc\installation.properties" property="is.overinstall"/>
24
25 <!-- load windows properties -->
26 <winprops/>
27
28 <!-- create a local installDir String -->
29 <path id="installDir.path"><pathelement location="${installDir}"/></path>
30 <property name="installDir.local" refid="installDir.path"/>
31
32 <target name="load-previous-props" if="is.overinstall">
33 <property file="${installDir}\etc\installation.properties"/>
34 </target>
35
36 <target name="install-core-components" depends="load-previous-props">
37
38 <!-- figure out the start menu path (if not already set from previous installation) -->
39 <getfreepath path="${win32.personal.programs_menu}\Greenstone-@version@" property="startmenu.path"/>
40
41 <echo>basedir: ${basedir}</echo>
42 <echo>installDir: ${installDir}</echo>
43 <echo>antinstaller.jar: ${antinstaller.jar}</echo>
44 <echo>startmenu.path: ${startmenu.path}</echo>
45
46 <!-- create the installation directory -->
47 <echo message="Creating Installation directory"/>
48 <mkdir dir="${installDir}"/>
49
50 <!-- extract 7za tool -->
51 <unzip src="${antinstaller.jar}" dest="${basedir}">
52 <patternset><include name="7za.exe"/></patternset>
53 </unzip>
54
55 <!-- install files -->
56 <echo message="Installing Core Component"/>
57 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="core.lzma"/></patternset></unzip>
58 <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x core.lzma"/></exec>
59 <!--<sevenzip task="decode" input="${basedir}/core.lzma" output="${basedir}/core.comp"/>-->
60 <delete file="core.lzma"/>
61 <unzip src="${basedir}/core.comp" dest="${installDir}"/>
62 <delete file="core.comp"/>
63
64 <!-- jre -->
65 <mkdir dir="${installDir}/packages"/>
66 <move todir="${installDir}/packages/jre">
67 <fileset dir="../@windows-java.extracted@"/>
68 </move>
69
70 <echo message="Creating admin and demo users"/>
71 <adduser
72 txt2db="${installDir}/bin/windows/txt2db"
73 usersDb="${installDir}/etc/users.db"
74 username="admin"
75 password="${admin.password}"
76 groups="administrator,colbuilder"
77 comment="created at install time"/>
78 <adduser
79 txt2db="${installDir}/bin/windows/txt2db"
80 usersDb="${installDir}/etc/users.db"
81 username="demo"
82 password="demo"
83 groups="demo"
84 comment="Dummy 'demo' user with password 'demo' for authen-e collection"/>
85
86 <echo message="Installing Servers"/>
87 <copy todir="${installDir}" file="${installDir}/bin/windows/server.exe"/>
88 <copy tofile="${installDir}/cgi-bin/oaiserver" file="${installDir}/bin/windows/oaiserver.exe"/>
89 <copy tofile="${installDir}/cgi-bin/library" file="${installDir}/bin/windows/library.exe"/>
90
91 <echo message="Filling in concrete values in config files"/>
92 <rsr file="${installDir}/setup.bat" pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
93 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg">
94 <job pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
95 <job pattern="^(#?httpprefix).*" replacement="$1 /gsdl"/>
96 <job pattern="^(#?httpimg).*" replacement="$1 /gsdl/images"/>
97 </rsr>
98 <rsr file="${installDir}/gsdlsite.cfg" pattern="@gsdlhome@" replacement="${installDir}"/>
99
100 <echo message="Creating installation properties file"/>
101 <echo file="${installDir}\etc\installation.properties">startmenu.path:${startmenu.path}</echo>
102
103 <echo message="Finished"/>
104
105 </target>
106
107 <!-- Source -->
108 <target name="install-source-code" depends="">
109 <echo message="Installing Source Code"/>
110 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="sourcecode.lzma"/></patternset></unzip>
111 <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x sourcecode.lzma"/></exec>
112 <!--<sevenzip task="decode" input="${basedir}/sourcecode.lzma" output="${basedir}/sourcecode.comp"/>-->
113 <delete file="sourcecode.lzma"/>
114 <unzip src="${basedir}/sourcecode.comp" dest="${installDir}"/>
115 <delete file="sourcecode.comp"/>
116 </target>
117
118 <target name="install-imagemagick">
119 <echo message="Installing ImageMagick"/>
120 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="imagemagick.lzma"/></patternset></unzip>
121 <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x imagemagick.lzma"/></exec>
122 <!--<sevenzip task="decode" input="${basedir}/imagemagick.lzma" output="${basedir}/imagemagick.comp"/>-->
123 <delete file="imagemagick.lzma"/>
124 <unzip src="${basedir}/imagemagick.comp" dest="${installDir}/bin/windows"/>
125 <delete file="imagemagick.comp"/>
126 </target>
127
128 <target name="install-ghostscript">
129 <echo message="Installing GhostScript"/>
130 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="ghostscript.lzma"/></patternset></unzip>
131 <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x ghostscript.lzma"/></exec>
132 <!--<sevenzip task="decode" input="${basedir}/ghostscript.lzma" output="${basedir}/ghostscript.comp"/>-->
133 <delete file="ghostscript.lzma"/>
134 <unzip src="${basedir}/ghostscript.comp" dest="${installDir}/bin/windows"/>
135 <delete file="ghostscript.comp"/>
136 </target>
137
138 <!-- Start menu shortcuts -->
139 <target name="install-start-menu-shortcuts">
140
141 <mkdir dir="${startmenu.path}\Documentation"/>
142
143 <shortcut
144 file="${startmenu.path}\Greenstone2 Server.lnk"
145 execute="${installDir}\server.exe"
146 workingDirectory="${installDir}"
147 iconFile="${installDir}\images\icon.ico"
148 iconIndex="0" />
149 <shortcut
150 file="${startmenu.path}\Greenstone Librarian Interface (GLI).lnk"
151 execute="${installDir}\gli\gli.bat"
152 workingDirectory="${installDir}\gli"
153 iconFile="${installDir}\images\icon.ico"
154 iconIndex="0" />
155 <shortcut
156 file="${startmenu.path}\Greenstone Editor for Metadata Sets (GEMS).lnk"
157 execute="${installDir}\gli\gems.bat"
158 workingDirectory="${installDir}\gli"
159 iconFile="${installDir}\images\icon.ico"
160 iconIndex="0" />
161 <shortcut
162 file="${startmenu.path}\Uninstall.lnk"
163 execute="${installDir}\Uninstall.bat"
164 workingDirectory="${installDir}"
165 iconFile="${installDir}\images\icon.ico"
166 iconIndex="0" />
167 <shortcut
168 file="${startmenu.path}\Documentation\READMEen.lnk"
169 execute="${installDir}\READMEen.txt" />
170 <shortcut
171 file="${startmenu.path}\Documentation\READMEes.lnk"
172 execute="${installDir}\READMEes.txt" />
173 <shortcut
174 file="${startmenu.path}\Documentation\READMEar.lnk"
175 execute="${installDir}\READMEar.txt" />
176 <shortcut
177 file="${startmenu.path}\Documentation\READMEfr.lnk"
178 execute="${installDir}\READMEfr.txt" />
179 <shortcut
180 file="${startmenu.path}\Documentation\READMEru.lnk"
181 execute="${installDir}\READMEru.txt" />
182 </target>
183
184 <target name="cleanuptarget"></target>
185
186
187</project>
Note: See TracBrowser for help on using the repository browser.