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

Last change on this file since 17468 was 17468, checked in by oranfry, 14 years ago

importing the sevenzip task into all installer build.xmls

File size: 4.2 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 <!-- 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 -->
16 <typedef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/>
17 <typedef name="adduser" classname="org.greenstone.anttasks.AddGreenstoneUserToDatabase" classpathref="project.classpath"/>
18 <taskdef name="sevenzip" classname="org.apache.tools.ant.SevenZip" classpathref="project.classpath"/>
19
20 <condition property="bundled.java.exists">
21 <available file="../@java.extracted@/bin/java"/>
22 </condition>
23
24
25 <target name="install-core-components" depends="">
26
27 <echo>basedir: ${basedir}</echo>
28 <echo>installDir: ${installDir}</echo>
29 <echo>antinstaller.jar: ${antinstaller.jar}</echo>
30
31 <!-- create the installation directory -->
32 <echo message="Creating Installation directory"/>
33 <mkdir dir="${installDir}"/>
34
35 <!-- install files -->
36 <echo message="Installing Core Files"/>
37 <unzip src="${antinstaller.jar}" dest="${installDir}">
38 <patternset>
39
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/**/*"/>
50
51 <include name="Install.sh"/>
52 <include name="setup.bash"/>
53 <include name="setup.csh"/>
54 <include name="LICENSE.txt"/>
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"/>
61 <include name="Uninstall.jar"/>
62 </patternset>
63 </unzip>
64 <echo/>
65
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
70 <echo message="Setting Binaries to Executable"/>
71 <chmod dir="${installDir}" includes="*.sh,*.bash" perm="775"/>
72 <chmod dir="${installDir}/bin/darwin" includes="*" perm="775"/>
73 <chmod dir="${installDir}/cgi-bin" includes="*" perm="775"/>
74 <chmod dir="${installDir}/bin/script" includes="**/*" perm="775"/>
75 <chmod dir="${installDir}/gli" includes="*.sh" perm="775"/>
76 <echo/>
77
78 <echo message="Filling in concrete values in config files"/>
79 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
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"/>
82 <echo/>
83
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
99 <!-- delete unneeded files -->
100 <echo message="Deleting some unneeded files"/>
101 <delete dir="${installDir}/resources/icons"/>
102 <delete file="${installDir}/resources/*.png"/>
103
104 <echo>Creating installation properties file</echo>
105 <echo file="${installDir}/etc/installation.properties">#this file is just a placeholder for now</echo>
106
107 <echo message="Finished"/>
108
109 </target>
110
111 <!-- Source -->
112 <target name="install-source-code" depends="">
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>
122 </target>
123
124 <target name="cleanuptarget"></target>
125
126
127</project>
Note: See TracBrowser for help on using the repository browser.