[15023] | 1 | <?xml version="1.0"?>
|
---|
| 2 | <!--
|
---|
| 3 | This is the build.xml run by AntInstaller for the installer
|
---|
| 4 | -->
|
---|
| 5 |
|
---|
[16087] | 6 | <project name="Installation">
|
---|
[15023] | 7 |
|
---|
[16931] | 8 | <!-- classpath -->
|
---|
| 9 | <path id="project.classpath"><pathelement path="${antinstaller.jar}"/></path>
|
---|
[15023] | 10 |
|
---|
| 11 | <!-- custom tasks -->
|
---|
[16633] | 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"/>
|
---|
[17107] | 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"/>
|
---|
[17478] | 17 |
|
---|
[16931] | 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"/>
|
---|
[15023] | 23 |
|
---|
[16633] | 24 | <!-- load windows properties -->
|
---|
| 25 | <winprops/>
|
---|
[16931] | 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 |
|
---|
[17583] | 31 | <target name="Looking For Previous Installation" if="is.overinstall">
|
---|
[16931] | 32 | <property file="${installDir}\etc\installation.properties"/>
|
---|
[17638] | 33 | <delete dir="${installed.startmenu.path}" failonerror="false"/>
|
---|
[16931] | 34 | </target>
|
---|
[16087] | 35 |
|
---|
[17583] | 36 | <target name="Installing Core System">
|
---|
[16087] | 37 |
|
---|
[17652] | 38 | <!-- figure out the start menu path -->
|
---|
[17125] | 39 | <getfreepath path="${win32.personal.programs_menu}\Greenstone-@version@" property="startmenu.path"/>
|
---|
[17638] | 40 | <path id="startmenu.path.path" path="${startmenu.path}"/>
|
---|
| 41 | <pathconvert targetos="unix" property="startmenu.path.unix" refid="startmenu.path.path"/>
|
---|
| 42 |
|
---|
[15023] | 43 | <echo>basedir: ${basedir}</echo>
|
---|
| 44 | <echo>installDir: ${installDir}</echo>
|
---|
| 45 | <echo>antinstaller.jar: ${antinstaller.jar}</echo>
|
---|
[17125] | 46 | <echo>startmenu.path: ${startmenu.path}</echo>
|
---|
[16087] | 47 |
|
---|
| 48 | <!-- create the installation directory -->
|
---|
| 49 | <echo message="Creating Installation directory"/>
|
---|
[15023] | 50 | <mkdir dir="${installDir}"/>
|
---|
[17413] | 51 |
|
---|
[17381] | 52 | <!-- extract 7za tool -->
|
---|
| 53 | <unzip src="${antinstaller.jar}" dest="${basedir}">
|
---|
| 54 | <patternset><include name="7za.exe"/></patternset>
|
---|
[15023] | 55 | </unzip>
|
---|
[17413] | 56 |
|
---|
[17381] | 57 | <!-- install files -->
|
---|
| 58 | <echo message="Installing Core Component"/>
|
---|
[19510] | 59 |
|
---|
| 60 | <!-- start web -->
|
---|
[17381] | 61 | <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="core.lzma"/></patternset></unzip>
|
---|
| 62 | <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x core.lzma"/></exec>
|
---|
| 63 | <delete file="core.lzma"/>
|
---|
| 64 | <unzip src="${basedir}/core.comp" dest="${installDir}"/>
|
---|
| 65 | <delete file="core.comp"/>
|
---|
[19510] | 66 | <!-- end web -->
|
---|
[17444] | 67 |
|
---|
[19510] | 68 | <!-- start cdrom -->
|
---|
| 69 | <copy todir="${installDir}">
|
---|
| 70 | <fileset dir="${orig.dir}/Software/core/all"/>
|
---|
| 71 | <fileset dir="${orig.dir}/Software/core/windows"/>
|
---|
| 72 | </copy>
|
---|
| 73 | <!-- end cdrom -->
|
---|
| 74 |
|
---|
[17444] | 75 | <!-- jre -->
|
---|
| 76 | <mkdir dir="${installDir}/packages"/>
|
---|
[17583] | 77 | <copy todir="${installDir}/packages/jre" failonerror="false">
|
---|
[17444] | 78 | <fileset dir="../@windows-java.extracted@"/>
|
---|
[17470] | 79 | </copy>
|
---|
[17381] | 80 |
|
---|
[18976] | 81 | <echo>Correcting perl shebangs in perl scripts</echo>
|
---|
| 82 | <property name="perl.executable" value="${installDir.local}\bin\windows\perl\perl.exe"/>
|
---|
| 83 | <rsr file="${installDir}/cgi-bin/gliserver.pl" pattern="^#!.*" replacement="#!${perl.executable} -w" lines="1"/>
|
---|
| 84 |
|
---|
[18980] | 85 | <echo>Creating the english dictionary</echo>
|
---|
| 86 | <copy file="${installDir}/gli/classes/dictionary.properties" tofile="${installDir}/gli/classes/dictionary_en.properties"/>
|
---|
| 87 | <echo/>
|
---|
| 88 |
|
---|
[16948] | 89 | <echo message="Creating installation properties file"/>
|
---|
[17638] | 90 | <echo file="${installDir}\etc\installation.properties">installed.startmenu.path:${startmenu.path.unix}</echo>
|
---|
[17125] | 91 |
|
---|
[16087] | 92 | <echo message="Finished"/>
|
---|
[16633] | 93 |
|
---|
[15023] | 94 | </target>
|
---|
| 95 |
|
---|
[17583] | 96 | <target name="Installing ImageMagick">
|
---|
[17381] | 97 | <echo message="Installing ImageMagick"/>
|
---|
[19510] | 98 | <!-- start web -->
|
---|
[17381] | 99 | <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="imagemagick.lzma"/></patternset></unzip>
|
---|
| 100 | <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x imagemagick.lzma"/></exec>
|
---|
| 101 | <delete file="imagemagick.lzma"/>
|
---|
| 102 | <unzip src="${basedir}/imagemagick.comp" dest="${installDir}/bin/windows"/>
|
---|
| 103 | <delete file="imagemagick.comp"/>
|
---|
[19510] | 104 | <!-- end web -->
|
---|
| 105 |
|
---|
| 106 | <!-- start cdrom -->
|
---|
| 107 | <copy todir="${installDir}/bin/windows">
|
---|
| 108 | <fileset dir="${orig.dir}/Software/imagemagick/windows"/>
|
---|
| 109 | </copy>
|
---|
| 110 | <!-- end cdrom -->
|
---|
| 111 |
|
---|
[17381] | 112 | </target>
|
---|
| 113 |
|
---|
[17576] | 114 | <target name="Installing Ghostscript">
|
---|
[17381] | 115 | <echo message="Installing GhostScript"/>
|
---|
[19510] | 116 | <!-- start web -->
|
---|
[17381] | 117 | <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="ghostscript.lzma"/></patternset></unzip>
|
---|
| 118 | <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x ghostscript.lzma"/></exec>
|
---|
| 119 | <delete file="ghostscript.lzma"/>
|
---|
| 120 | <unzip src="${basedir}/ghostscript.comp" dest="${installDir}/bin/windows"/>
|
---|
| 121 | <delete file="ghostscript.comp"/>
|
---|
[19510] | 122 | <!-- end web -->
|
---|
| 123 |
|
---|
| 124 | <!-- start cdrom -->
|
---|
| 125 | <copy todir="${installDir}/bin/windows">
|
---|
| 126 | <fileset dir="${orig.dir}/Software/ghostscript/windows"/>
|
---|
| 127 | </copy>
|
---|
| 128 | <!-- end cdrom -->
|
---|
| 129 |
|
---|
[17381] | 130 | </target>
|
---|
| 131 |
|
---|
[16633] | 132 | <!-- Start menu shortcuts -->
|
---|
[17576] | 133 | <target name="Installing Start Menu Shortcuts">
|
---|
[15023] | 134 |
|
---|
[16917] | 135 | <mkdir dir="${startmenu.path}\Documentation"/>
|
---|
| 136 |
|
---|
[16633] | 137 | <shortcut
|
---|
[18059] | 138 | file="${startmenu.path}\Greenstone Server.lnk"
|
---|
[16774] | 139 | execute="${installDir}\server.exe"
|
---|
[16633] | 140 | workingDirectory="${installDir}"
|
---|
[19379] | 141 | iconFile="${installDir}\web\images\serverico.ico"
|
---|
[16633] | 142 | iconIndex="0" />
|
---|
[17814] | 143 |
|
---|
[16633] | 144 | <shortcut
|
---|
[18047] | 145 | file="${startmenu.path}\Librarian Interface (GLI).lnk"
|
---|
[16633] | 146 | execute="${installDir}\gli\gli.bat"
|
---|
| 147 | workingDirectory="${installDir}\gli"
|
---|
[19379] | 148 | iconFile="${installDir}\web\images\icon.ico"
|
---|
[16633] | 149 | iconIndex="0" />
|
---|
[17814] | 150 |
|
---|
[16633] | 151 | <shortcut
|
---|
[19379] | 152 | file="${startmenu.path}\Librarian Interface for Remote Server (Client GLI).lnk"
|
---|
| 153 | execute="${installDir}\gli\client-gli.bat"
|
---|
| 154 | workingDirectory="${installDir}\gli"
|
---|
| 155 | iconFile="${installDir}\web\images\icon.ico"
|
---|
| 156 | iconIndex="0" />
|
---|
| 157 |
|
---|
| 158 | <shortcut
|
---|
[18059] | 159 | file="${startmenu.path}\Metadata Set Editor (GEMS).lnk"
|
---|
[17381] | 160 | execute="${installDir}\gli\gems.bat"
|
---|
[16633] | 161 | workingDirectory="${installDir}\gli"
|
---|
[19379] | 162 | iconFile="${installDir}\web\images\gems.ico"
|
---|
[16633] | 163 | iconIndex="0" />
|
---|
[17814] | 164 |
|
---|
[16633] | 165 | <shortcut
|
---|
[17257] | 166 | file="${startmenu.path}\Uninstall.lnk"
|
---|
[17436] | 167 | execute="${installDir}\Uninstall.bat"
|
---|
[17257] | 168 | workingDirectory="${installDir}"
|
---|
[19379] | 169 | iconFile="${installDir}\web\images\uninstall.ico"
|
---|
[17257] | 170 | iconIndex="0" />
|
---|
[17814] | 171 |
|
---|
[17257] | 172 | <shortcut
|
---|
[16917] | 173 | file="${startmenu.path}\Documentation\READMEen.lnk"
|
---|
[16633] | 174 | execute="${installDir}\READMEen.txt" />
|
---|
[17814] | 175 |
|
---|
[16633] | 176 | <shortcut
|
---|
[18067] | 177 | file="${startmenu.path}\Documentation\Greenstone Wiki.url"
|
---|
| 178 | url="http://wiki.greenstone.org" />
|
---|
| 179 |
|
---|
[19379] | 180 | <shortcut
|
---|
[18067] | 181 | file="${startmenu.path}\Documentation\Greenstone Website.url"
|
---|
| 182 | url="http://www.greenstone.org" />
|
---|
| 183 |
|
---|
| 184 | <!--
|
---|
| 185 | <shortcut
|
---|
[16917] | 186 | file="${startmenu.path}\Documentation\READMEes.lnk"
|
---|
[16633] | 187 | execute="${installDir}\READMEes.txt" />
|
---|
[17814] | 188 |
|
---|
[16633] | 189 | <shortcut
|
---|
[16917] | 190 | file="${startmenu.path}\Documentation\READMEar.lnk"
|
---|
[16633] | 191 | execute="${installDir}\READMEar.txt" />
|
---|
[17814] | 192 |
|
---|
[16633] | 193 | <shortcut
|
---|
[16917] | 194 | file="${startmenu.path}\Documentation\READMEfr.lnk"
|
---|
[16633] | 195 | execute="${installDir}\READMEfr.txt" />
|
---|
[17814] | 196 |
|
---|
[16633] | 197 | <shortcut
|
---|
[16917] | 198 | file="${startmenu.path}\Documentation\READMEru.lnk"
|
---|
[16633] | 199 | execute="${installDir}\READMEru.txt" />
|
---|
[18067] | 200 | -->
|
---|
[17814] | 201 |
|
---|
[15023] | 202 | </target>
|
---|
[16633] | 203 |
|
---|
[17815] | 204 | <target name="Source Release" depends="">
|
---|
| 205 |
|
---|
| 206 | <!-- create the installation directory -->
|
---|
| 207 | <echo message="Creating Installation directory"/>
|
---|
| 208 | <mkdir dir="${installDir}"/>
|
---|
| 209 |
|
---|
| 210 | <!-- extract 7za tool -->
|
---|
| 211 | <unzip src="${antinstaller.jar}" dest="${basedir}">
|
---|
| 212 | <patternset><include name="7za.exe"/></patternset>
|
---|
| 213 | </unzip>
|
---|
| 214 |
|
---|
| 215 | <echo>Installing Source Release</echo>
|
---|
| 216 | <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="source-release.lzma"/></patternset></unzip>
|
---|
| 217 | <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x source-release.lzma"/></exec>
|
---|
| 218 | <delete file="source-release.lzma"/>
|
---|
| 219 | <unzip src="${basedir}/source-release.comp" dest="${installDir}"/>
|
---|
| 220 | <delete file="source-release.comp"/>
|
---|
| 221 |
|
---|
| 222 | <!-- figure out the start menu path -->
|
---|
| 223 | <getfreepath path="${win32.personal.programs_menu}\Greenstone-@version@" property="startmenu.path"/>
|
---|
| 224 | <path id="startmenu.path.path" path="${startmenu.path}"/>
|
---|
| 225 | <pathconvert targetos="unix" property="startmenu.path.unix" refid="startmenu.path.path"/>
|
---|
| 226 |
|
---|
| 227 | <echo message="Filling in concrete values in config files"/>
|
---|
| 228 | <rsr file="${installDir}/setup.bat" pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
|
---|
| 229 | <rsr file="${installDir}/cgi-bin/gsdlsite.cfg">
|
---|
| 230 | <job pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
|
---|
| 231 | <job pattern="^(#?httpprefix).*" replacement="$1 /gsdl"/>
|
---|
| 232 | <job pattern="^(#?httpimg).*" replacement="$1 /gsdl/images"/>
|
---|
| 233 | </rsr>
|
---|
| 234 |
|
---|
| 235 | <echo>Create usage.txt</echo>
|
---|
| 236 | <echo file="${installDir}/etc/usage.txt"></echo>
|
---|
| 237 |
|
---|
| 238 | <echo message="Creating installation properties file"/>
|
---|
| 239 | <echo file="${installDir}\etc\installation.properties">installed.startmenu.path:${startmenu.path.unix}</echo>
|
---|
| 240 |
|
---|
| 241 | <echo message="Finished"/>
|
---|
| 242 |
|
---|
| 243 | </target>
|
---|
| 244 |
|
---|
[19201] | 245 | <target name="Configuring Administration Pages" if="enable.admin.pages">
|
---|
| 246 | <echo>Enabling Admin Pages</echo>
|
---|
| 247 | <rsr file="${installDir}/etc/main.cfg" pattern="^\s*status\s+.*" replacement="status enabled"/>
|
---|
| 248 | <echo message="Creating admin and demo users"/>
|
---|
| 249 | <adduser
|
---|
| 250 | txt2db="${installDir}/bin/windows/txt2db"
|
---|
| 251 | usersDb="${installDir}/etc/users.gdb"
|
---|
| 252 | username="admin"
|
---|
| 253 | password="${admin.password}"
|
---|
[19256] | 254 | groups="administrator,colbuilder,all-collections-editor"
|
---|
[19201] | 255 | comment="created at install time"/>
|
---|
| 256 | <adduser
|
---|
| 257 | txt2db="${installDir}/bin/windows/txt2db"
|
---|
| 258 | usersDb="${installDir}/etc/users.gdb"
|
---|
| 259 | username="demo"
|
---|
| 260 | password="demo"
|
---|
| 261 | groups="demo"
|
---|
| 262 | comment="Dummy 'demo' user with password 'demo' for authen-e collection"/>
|
---|
| 263 | </target>
|
---|
[17815] | 264 |
|
---|
[19624] | 265 | <target name="Installing Documented Examples">
|
---|
| 266 | <copy todir="${installDir}/collect">
|
---|
| 267 | <fileset dir="${orig.dir}/Documented Examples" includes="documented-examples/**/*"/>
|
---|
| 268 | </copy>
|
---|
| 269 | </target>
|
---|
[19201] | 270 |
|
---|
| 271 |
|
---|
[15023] | 272 | </project>
|
---|