root/release-kits/mark2/installer/build.xml @ 17076

Revision 17076, 3.3 KB (checked in by oranfry, 12 years ago)

also change the httpprefix and image prefix in gsdlsite.cfg at install

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="RegexSearchReplace" classpathref="project.classpath"/>
17
18    <condition property="bundled.java.exists">
19        <available file="../@java.extracted@/bin/java"/>
20    </condition>
21
22
23    <target name="install-core-components" depends="">
24
25        <echo>basedir: ${basedir}</echo>
26        <echo>installDir: ${installDir}</echo>
27        <echo>antinstaller.jar: ${antinstaller.jar}</echo>
28
29        <!-- create the installation directory -->
30        <echo message="Creating Installation directory"/>
31        <mkdir dir="${installDir}"/>
32
33        <!-- install files -->
34        <echo message="Installing Core Files"/>
35        <unzip src="${antinstaller.jar}" dest="${installDir}">
36            <patternset>
37
38                <include name="gli/**/*"/>
39                <include name="bin/**/*"/>
40                <include name="cgi-bin/**/*"/>
41                <include name="etc/**/*"/>
42                <include name="mappings/**/*"/>
43                <include name="images/**/*"/>
44                <include name="perllib/**/*"/>
45                <include name="indexers/**/*"/>
46                <include name="macros/**/*"/>
47                <include name="collect/**/*"/>
48
49                <include name="Install.sh"/>
50                <include name="setup.bash"/>
51                <include name="setup.csh"/>
52                <include name="LICENSE.txt"/>
53                <include name="READMEar.txt"/>
54                <include name="READMEen.txt"/>
55                <include name="READMEes.txt"/>
56                <include name="READMEfr.txt"/>
57                <include name="READMEes.txt"/>
58                <include name="Support.htm"/>
59            </patternset>
60        </unzip>
61        <echo/>
62
63        <echo message="Setting Binaries to Executable"/>
64        <chmod dir="${installDir}" includes="*.sh,*.bash" perm="775"/>
65        <chmod dir="${installDir}/bin/darwin" includes="*" perm="775"/>
66        <chmod dir="${installDir}/cgi-bin" includes="*" perm="775"/>
67        <chmod dir="${installDir}/bin/script" includes="**/*" perm="775"/>
68        <chmod dir="${installDir}/gli" includes="*.sh" perm="775"/>
69        <echo/>
70
71        <echo message="Filling in concrete values in config files"/>
72        <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
73        <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpprefix).*" replacement="$1 /gsdl"/>
74        <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpimg).*" replacement="$1 /gsdl/images"/>
75        <echo/>
76
77        <!-- delete unneeded files -->     
78        <echo message="Deleting some unneeded files"/>
79        <delete dir="${installDir}/resources/icons"/>
80        <delete file="${installDir}/resources/*.png"/>
81
82        <echo message="Finished"/>
83
84    </target>
85
86    <!-- Source -->
87    <target name="install-source-code" depends="">
88        <echo message="Installing Source Code"/>
89        <unzip src="${antinstaller.jar}" dest="${installDir}">
90            <patternset>
91                <include name="common-src/**/*"/>
92                <include name="runtime-src/**/*"/>
93                <include name="build-src/**/*"/>
94                <include name="packages/**/*"/>
95            </patternset>
96        </unzip>
97    </target>
98
99    <target name="install-java">
100        <echo message="Installing bundled java"/>
101        <copy todir="${installDir}/packages/jre">
102            <fileset dir="../@java.extracted@"/>
103        </copy>
104        <chmod dir="${installDir}/packages/jre/bin" includes="*" perm="775"/>       
105    </target>
106
107    <target name="cleanuptarget">
108    </target>
109   
110
111</project>
Note: See TracBrowser for help on using the browser.