[14982] | 1 | <?xml version="1.0"?>
|
---|
| 2 | <!--
|
---|
| 3 | This is the build.xml run by AntInstaller for the installer
|
---|
| 4 | -->
|
---|
| 5 |
|
---|
[15205] | 6 | <project name="Installation">
|
---|
[14982] | 7 |
|
---|
| 8 | <!-- this is required to pick up the properties generated during the install pages -->
|
---|
| 9 | <property file="${basedir}/ant.install.properties"/>
|
---|
| 10 |
|
---|
| 11 | <path id="project.classpath">
|
---|
| 12 | <pathelement path="${antinstaller.jar}"/>
|
---|
| 13 | </path>
|
---|
| 14 |
|
---|
| 15 | <!-- custom tasks -->
|
---|
[17107] | 16 | <typedef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/>
|
---|
| 17 | <typedef name="adduser" classname="org.greenstone.anttasks.AddGreenstoneUserToDatabase" classpathref="project.classpath"/>
|
---|
[17468] | 18 | <taskdef name="sevenzip" classname="org.apache.tools.ant.SevenZip" classpathref="project.classpath"/>
|
---|
[14982] | 19 |
|
---|
[15142] | 20 | <condition property="bundled.java.exists">
|
---|
| 21 | <available file="../@java.extracted@/bin/java"/>
|
---|
| 22 | </condition>
|
---|
| 23 |
|
---|
| 24 |
|
---|
[15205] | 25 | <target name="install-core-components" depends="">
|
---|
[14982] | 26 |
|
---|
| 27 | <echo>basedir: ${basedir}</echo>
|
---|
| 28 | <echo>installDir: ${installDir}</echo>
|
---|
| 29 | <echo>antinstaller.jar: ${antinstaller.jar}</echo>
|
---|
[15980] | 30 |
|
---|
| 31 | <!-- create the installation directory -->
|
---|
| 32 | <echo message="Creating Installation directory"/>
|
---|
[14982] | 33 | <mkdir dir="${installDir}"/>
|
---|
| 34 |
|
---|
[15980] | 35 | <!-- install files -->
|
---|
[16742] | 36 | <echo message="Installing Core Files"/>
|
---|
| 37 | <unzip src="${antinstaller.jar}" dest="${installDir}">
|
---|
| 38 | <patternset>
|
---|
[15980] | 39 |
|
---|
[16742] | 40 | <include name="gli/**/*"/>
|
---|
| 41 | <include name="bin/**/*"/>
|
---|
| 42 | <include name="cgi-bin/**/*"/>
|
---|
| 43 | <include name="etc/**/*"/>
|
---|
| 44 | <include name="mappings/**/*"/>
|
---|
| 45 | <include name="images/**/*"/>
|
---|
| 46 | <include name="perllib/**/*"/>
|
---|
| 47 | <include name="indexers/**/*"/>
|
---|
| 48 | <include name="macros/**/*"/>
|
---|
| 49 | <include name="collect/**/*"/>
|
---|
[14982] | 50 |
|
---|
[16238] | 51 | <include name="Install.sh"/>
|
---|
[15980] | 52 | <include name="setup.bash"/>
|
---|
[16237] | 53 | <include name="setup.csh"/>
|
---|
[17040] | 54 | <include name="LICENSE.txt"/>
|
---|
[16237] | 55 | <include name="READMEar.txt"/>
|
---|
| 56 | <include name="READMEen.txt"/>
|
---|
| 57 | <include name="READMEes.txt"/>
|
---|
| 58 | <include name="READMEfr.txt"/>
|
---|
| 59 | <include name="READMEes.txt"/>
|
---|
| 60 | <include name="Support.htm"/>
|
---|
[17257] | 61 | <include name="Uninstall.jar"/>
|
---|
[14982] | 62 | </patternset>
|
---|
| 63 | </unzip>
|
---|
| 64 | <echo/>
|
---|
| 65 |
|
---|
[17437] | 66 | <echo message="Installing Servers"/>
|
---|
| 67 | <copy tofile="${installDir}/cgi-bin/oaiserver" file="${installDir}/bin/darwin/oaiserver"/>
|
---|
| 68 | <copy tofile="${installDir}/cgi-bin/library" file="${installDir}/bin/darwin/library"/>
|
---|
| 69 |
|
---|
[14982] | 70 | <echo message="Setting Binaries to Executable"/>
|
---|
[15980] | 71 | <chmod dir="${installDir}" includes="*.sh,*.bash" perm="775"/>
|
---|
[16469] | 72 | <chmod dir="${installDir}/bin/darwin" includes="*" perm="775"/>
|
---|
[15980] | 73 | <chmod dir="${installDir}/cgi-bin" includes="*" perm="775"/>
|
---|
| 74 | <chmod dir="${installDir}/bin/script" includes="**/*" perm="775"/>
|
---|
[14982] | 75 | <chmod dir="${installDir}/gli" includes="*.sh" perm="775"/>
|
---|
| 76 | <echo/>
|
---|
| 77 |
|
---|
[16469] | 78 | <echo message="Filling in concrete values in config files"/>
|
---|
| 79 | <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
|
---|
[17076] | 80 | <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpprefix).*" replacement="$1 /gsdl"/>
|
---|
| 81 | <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpimg).*" replacement="$1 /gsdl/images"/>
|
---|
[16469] | 82 | <echo/>
|
---|
| 83 |
|
---|
[17107] | 84 | <echo message="Creating admin and demo users"/>
|
---|
| 85 | <adduser txt2db="${installDir}/bin/linux/txt2db"
|
---|
| 86 | usersDb="${installDir}/etc/users.db"
|
---|
| 87 | username="admin"
|
---|
| 88 | password="${admin.password}"
|
---|
| 89 | groups="administrator,colbuilder"
|
---|
| 90 | comment="created at install time"/>
|
---|
| 91 | <adduser
|
---|
| 92 | txt2db="${installDir}/bin/linux/txt2db"
|
---|
| 93 | usersDb="${installDir}/etc/users.db"
|
---|
| 94 | username="demo"
|
---|
| 95 | password="demo"
|
---|
| 96 | groups="demo"
|
---|
| 97 | comment="Dummy 'demo' user with password 'demo' for authen-e collection"/>
|
---|
| 98 |
|
---|
[14982] | 99 | <!-- delete unneeded files -->
|
---|
[16832] | 100 | <echo message="Deleting some unneeded files"/>
|
---|
[14982] | 101 | <delete dir="${installDir}/resources/icons"/>
|
---|
| 102 | <delete file="${installDir}/resources/*.png"/>
|
---|
| 103 |
|
---|
[17257] | 104 | <echo>Creating installation properties file</echo>
|
---|
| 105 | <echo file="${installDir}/etc/installation.properties">#this file is just a placeholder for now</echo>
|
---|
| 106 |
|
---|
[15142] | 107 | <echo message="Finished"/>
|
---|
| 108 |
|
---|
[14982] | 109 | </target>
|
---|
| 110 |
|
---|
| 111 | <!-- Source -->
|
---|
[15205] | 112 | <target name="install-source-code" depends="">
|
---|
[16818] | 113 | <echo message="Installing Source Code"/>
|
---|
| 114 | <unzip src="${antinstaller.jar}" dest="${installDir}">
|
---|
| 115 | <patternset>
|
---|
| 116 | <include name="common-src/**/*"/>
|
---|
| 117 | <include name="runtime-src/**/*"/>
|
---|
| 118 | <include name="build-src/**/*"/>
|
---|
| 119 | <include name="packages/**/*"/>
|
---|
| 120 | </patternset>
|
---|
| 121 | </unzip>
|
---|
[14982] | 122 | </target>
|
---|
| 123 |
|
---|
[17422] | 124 | <target name="cleanuptarget"></target>
|
---|
[14982] | 125 |
|
---|
| 126 |
|
---|
| 127 | </project>
|
---|