[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"/>
|
---|
[14982] | 18 |
|
---|
[15142] | 19 | <condition property="bundled.java.exists">
|
---|
| 20 | <available file="../@java.extracted@/bin/java"/>
|
---|
| 21 | </condition>
|
---|
| 22 |
|
---|
| 23 |
|
---|
[15205] | 24 | <target name="install-core-components" depends="">
|
---|
[14982] | 25 |
|
---|
| 26 | <echo>basedir: ${basedir}</echo>
|
---|
| 27 | <echo>installDir: ${installDir}</echo>
|
---|
| 28 | <echo>antinstaller.jar: ${antinstaller.jar}</echo>
|
---|
[15980] | 29 |
|
---|
| 30 | <!-- create the installation directory -->
|
---|
| 31 | <echo message="Creating Installation directory"/>
|
---|
[14982] | 32 | <mkdir dir="${installDir}"/>
|
---|
| 33 |
|
---|
[15980] | 34 | <!-- install files -->
|
---|
[16742] | 35 | <echo message="Installing Core Files"/>
|
---|
| 36 | <unzip src="${antinstaller.jar}" dest="${installDir}">
|
---|
| 37 | <patternset>
|
---|
[15980] | 38 |
|
---|
[16742] | 39 | <include name="gli/**/*"/>
|
---|
| 40 | <include name="bin/**/*"/>
|
---|
| 41 | <include name="cgi-bin/**/*"/>
|
---|
| 42 | <include name="etc/**/*"/>
|
---|
| 43 | <include name="mappings/**/*"/>
|
---|
| 44 | <include name="images/**/*"/>
|
---|
| 45 | <include name="perllib/**/*"/>
|
---|
| 46 | <include name="indexers/**/*"/>
|
---|
| 47 | <include name="macros/**/*"/>
|
---|
| 48 | <include name="collect/**/*"/>
|
---|
[14982] | 49 |
|
---|
[16238] | 50 | <include name="Install.sh"/>
|
---|
[15980] | 51 | <include name="setup.bash"/>
|
---|
[16237] | 52 | <include name="setup.csh"/>
|
---|
[17040] | 53 | <include name="LICENSE.txt"/>
|
---|
[16237] | 54 | <include name="READMEar.txt"/>
|
---|
| 55 | <include name="READMEen.txt"/>
|
---|
| 56 | <include name="READMEes.txt"/>
|
---|
| 57 | <include name="READMEfr.txt"/>
|
---|
| 58 | <include name="READMEes.txt"/>
|
---|
| 59 | <include name="Support.htm"/>
|
---|
[14982] | 60 | </patternset>
|
---|
| 61 | </unzip>
|
---|
| 62 | <echo/>
|
---|
| 63 |
|
---|
| 64 | <echo message="Setting Binaries to Executable"/>
|
---|
[15980] | 65 | <chmod dir="${installDir}" includes="*.sh,*.bash" perm="775"/>
|
---|
[16469] | 66 | <chmod dir="${installDir}/bin/darwin" includes="*" perm="775"/>
|
---|
[15980] | 67 | <chmod dir="${installDir}/cgi-bin" includes="*" perm="775"/>
|
---|
| 68 | <chmod dir="${installDir}/bin/script" includes="**/*" perm="775"/>
|
---|
[14982] | 69 | <chmod dir="${installDir}/gli" includes="*.sh" perm="775"/>
|
---|
| 70 | <echo/>
|
---|
| 71 |
|
---|
[16469] | 72 | <echo message="Filling in concrete values in config files"/>
|
---|
| 73 | <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
|
---|
[17076] | 74 | <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpprefix).*" replacement="$1 /gsdl"/>
|
---|
| 75 | <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpimg).*" replacement="$1 /gsdl/images"/>
|
---|
[16469] | 76 | <echo/>
|
---|
| 77 |
|
---|
[17107] | 78 | <echo message="Creating admin and demo users"/>
|
---|
| 79 | <adduser txt2db="${installDir}/bin/linux/txt2db"
|
---|
| 80 | usersDb="${installDir}/etc/users.db"
|
---|
| 81 | username="admin"
|
---|
| 82 | password="${admin.password}"
|
---|
| 83 | groups="administrator,colbuilder"
|
---|
| 84 | comment="created at install time"/>
|
---|
| 85 | <adduser
|
---|
| 86 | txt2db="${installDir}/bin/linux/txt2db"
|
---|
| 87 | usersDb="${installDir}/etc/users.db"
|
---|
| 88 | username="demo"
|
---|
| 89 | password="demo"
|
---|
| 90 | groups="demo"
|
---|
| 91 | comment="Dummy 'demo' user with password 'demo' for authen-e collection"/>
|
---|
| 92 |
|
---|
[14982] | 93 | <!-- delete unneeded files -->
|
---|
[16832] | 94 | <echo message="Deleting some unneeded files"/>
|
---|
[14982] | 95 | <delete dir="${installDir}/resources/icons"/>
|
---|
| 96 | <delete file="${installDir}/resources/*.png"/>
|
---|
| 97 |
|
---|
[15142] | 98 | <echo message="Finished"/>
|
---|
| 99 |
|
---|
[14982] | 100 | </target>
|
---|
| 101 |
|
---|
| 102 | <!-- Source -->
|
---|
[15205] | 103 | <target name="install-source-code" depends="">
|
---|
[16818] | 104 | <echo message="Installing Source Code"/>
|
---|
| 105 | <unzip src="${antinstaller.jar}" dest="${installDir}">
|
---|
| 106 | <patternset>
|
---|
| 107 | <include name="common-src/**/*"/>
|
---|
| 108 | <include name="runtime-src/**/*"/>
|
---|
| 109 | <include name="build-src/**/*"/>
|
---|
| 110 | <include name="packages/**/*"/>
|
---|
| 111 | </patternset>
|
---|
| 112 | </unzip>
|
---|
[14982] | 113 | </target>
|
---|
| 114 |
|
---|
[15205] | 115 | <target name="install-java">
|
---|
[15142] | 116 | <echo message="Installing bundled java"/>
|
---|
| 117 | <copy todir="${installDir}/packages/jre">
|
---|
| 118 | <fileset dir="../@java.extracted@"/>
|
---|
| 119 | </copy>
|
---|
| 120 | <chmod dir="${installDir}/packages/jre/bin" includes="*" perm="775"/>
|
---|
[14982] | 121 | </target>
|
---|
[15142] | 122 |
|
---|
[15205] | 123 | <target name="cleanuptarget">
|
---|
| 124 | </target>
|
---|
[14982] | 125 |
|
---|
| 126 |
|
---|
| 127 | </project>
|
---|