source: release-kits/mark2/installer/build.xml@ 17608

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

fixes to make mark in sync with lirk

File size: 3.8 KB
RevLine 
[14982]1<?xml version="1.0"?>
2<!--
3This 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
[17576]25 <target name="Installing Core System" 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
[17608]36 <echo>Installing Core Files</echo>
37 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="core.lzma"/></patternset></unzip>
38 <sevenzip task="decode" input="${basedir}/core.lzma" output="${basedir}/core.comp"/>
39 <delete file="core.lzma"/>
40 <unzip src="${basedir}/core.comp" dest="${installDir}"/>
41 <delete file="core.comp"/>
[14982]42
[17437]43 <echo message="Installing Servers"/>
44 <copy tofile="${installDir}/cgi-bin/oaiserver" file="${installDir}/bin/darwin/oaiserver"/>
45 <copy tofile="${installDir}/cgi-bin/library" file="${installDir}/bin/darwin/library"/>
46
[14982]47 <echo message="Setting Binaries to Executable"/>
[15980]48 <chmod dir="${installDir}" includes="*.sh,*.bash" perm="775"/>
[16469]49 <chmod dir="${installDir}/bin/darwin" includes="*" perm="775"/>
[17470]50 <chmod dir="${installDir}/bin" includes="*" perm="775"/>
[15980]51 <chmod dir="${installDir}/cgi-bin" includes="*" perm="775"/>
52 <chmod dir="${installDir}/bin/script" includes="**/*" perm="775"/>
[14982]53 <chmod dir="${installDir}/gli" includes="*.sh" perm="775"/>
54 <echo/>
55
[16469]56 <echo message="Filling in concrete values in config files"/>
57 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
[17076]58 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpprefix).*" replacement="$1 /gsdl"/>
59 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpimg).*" replacement="$1 /gsdl/images"/>
[16469]60 <echo/>
61
[17107]62 <echo message="Creating admin and demo users"/>
63 <adduser txt2db="${installDir}/bin/linux/txt2db"
64 usersDb="${installDir}/etc/users.db"
65 username="admin"
66 password="${admin.password}"
67 groups="administrator,colbuilder"
68 comment="created at install time"/>
69 <adduser
70 txt2db="${installDir}/bin/linux/txt2db"
71 usersDb="${installDir}/etc/users.db"
72 username="demo"
73 password="demo"
74 groups="demo"
75 comment="Dummy 'demo' user with password 'demo' for authen-e collection"/>
76
[14982]77 <!-- delete unneeded files -->
[16832]78 <echo message="Deleting some unneeded files"/>
[14982]79 <delete dir="${installDir}/resources/icons"/>
80 <delete file="${installDir}/resources/*.png"/>
81
[17257]82 <echo>Creating installation properties file</echo>
83 <echo file="${installDir}/etc/installation.properties">#this file is just a placeholder for now</echo>
84
[15142]85 <echo message="Finished"/>
86
[14982]87 </target>
88
89 <!-- Source -->
[17576]90 <target name="Installing Source Code" depends="">
[16818]91 <echo message="Installing Source Code"/>
[17608]92 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="sourcecode.lzma"/></patternset></unzip>
93 <sevenzip task="decode" input="${basedir}/sourcecode.lzma" output="${basedir}/sourcecode.comp"/>
94 <delete file="sourcecode.lzma"/>
95 <unzip src="${basedir}/sourcecode.comp" dest="${installDir}"/>
96 <delete file="sourcecode.comp"/>
97
[14982]98 </target>
99
100</project>
Note: See TracBrowser for help on using the repository browser.