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

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

dont try to load the sevenzip task as it is no longer included in wirk2 installer

File size: 7.5 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 <!-- extract 7za tool -->
50 <unzip src="${antinstaller.jar}" dest="${basedir}">
51 <patternset><include name="7za.exe"/></patternset>
52 </unzip>
53
54 <!-- install files -->
55 <echo message="Installing Core Component"/>
56 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="core.lzma"/></patternset></unzip>
57 <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x core.lzma"/></exec>
58 <!--<sevenzip task="decode" input="${basedir}/core.lzma" output="${basedir}/core.comp"/>-->
59 <delete file="core.lzma"/>
60 <unzip src="${basedir}/core.comp" dest="${installDir}"/>
61 <delete file="core.comp"/>
62
63 <!-- jre -->
64 <mkdir dir="${installDir}/packages"/>
65 <copy todir="${installDir}/packages/jre">
66 <fileset dir="../@windows-java.extracted@"/>
67 </copy>
68
69 <echo message="Creating admin and demo users"/>
70 <adduser
71 txt2db="${installDir}/bin/windows/txt2db"
72 usersDb="${installDir}/etc/users.db"
73 username="admin"
74 password="${admin.password}"
75 groups="administrator,colbuilder"
76 comment="created at install time"/>
77 <adduser
78 txt2db="${installDir}/bin/windows/txt2db"
79 usersDb="${installDir}/etc/users.db"
80 username="demo"
81 password="demo"
82 groups="demo"
83 comment="Dummy 'demo' user with password 'demo' for authen-e collection"/>
84
85 <echo message="Installing Servers"/>
86 <copy todir="${installDir}" file="${installDir}/bin/windows/server.exe"/>
87 <copy tofile="${installDir}/cgi-bin/oaiserver" file="${installDir}/bin/windows/oaiserver.exe"/>
88 <copy tofile="${installDir}/cgi-bin/library" file="${installDir}/bin/windows/library.exe"/>
89
90 <echo message="Filling in concrete values in config files"/>
91 <rsr file="${installDir}/setup.bat" pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
92 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg">
93 <job pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
94 <job pattern="^(#?httpprefix).*" replacement="$1 /gsdl"/>
95 <job pattern="^(#?httpimg).*" replacement="$1 /gsdl/images"/>
96 </rsr>
97 <rsr file="${installDir}/gsdlsite.cfg" pattern="@gsdlhome@" replacement="${installDir}"/>
98
99 <echo message="Creating installation properties file"/>
100 <echo file="${installDir}\etc\installation.properties">startmenu.path:${startmenu.path}</echo>
101
102 <echo message="Finished"/>
103
104 </target>
105
106 <!-- Source -->
107 <target name="install-source-code" depends="">
108 <echo message="Installing Source Code"/>
109 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="sourcecode.lzma"/></patternset></unzip>
110 <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x sourcecode.lzma"/></exec>
111 <!--<sevenzip task="decode" input="${basedir}/sourcecode.lzma" output="${basedir}/sourcecode.comp"/>-->
112 <delete file="sourcecode.lzma"/>
113 <unzip src="${basedir}/sourcecode.comp" dest="${installDir}"/>
114 <delete file="sourcecode.comp"/>
115 </target>
116
117 <target name="install-imagemagick">
118 <echo message="Installing ImageMagick"/>
119 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="imagemagick.lzma"/></patternset></unzip>
120 <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x imagemagick.lzma"/></exec>
121 <!--<sevenzip task="decode" input="${basedir}/imagemagick.lzma" output="${basedir}/imagemagick.comp"/>-->
122 <delete file="imagemagick.lzma"/>
123 <unzip src="${basedir}/imagemagick.comp" dest="${installDir}/bin/windows"/>
124 <delete file="imagemagick.comp"/>
125 </target>
126
127 <target name="install-ghostscript">
128 <echo message="Installing GhostScript"/>
129 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="ghostscript.lzma"/></patternset></unzip>
130 <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x ghostscript.lzma"/></exec>
131 <!--<sevenzip task="decode" input="${basedir}/ghostscript.lzma" output="${basedir}/ghostscript.comp"/>-->
132 <delete file="ghostscript.lzma"/>
133 <unzip src="${basedir}/ghostscript.comp" dest="${installDir}/bin/windows"/>
134 <delete file="ghostscript.comp"/>
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\gems.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}\Uninstall.bat"
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.