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

Last change on this file since 17652 was 17652, checked in by oranfry, 15 years ago

started source releases

File size: 5.2 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"/>
[17611]63 <adduser txt2db="${installDir}/bin/darwin/txt2db"
[17107]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
[17611]70 txt2db="${installDir}/bin/darwin/txt2db"
[17107]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
[17652]89 <!-- sourcecode core system -->
90 <target name="Installing Source Code Core">
91
92 <echo>Installing Source Code Core</echo>
93 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="sourcecode-core.lzma"/></patternset></unzip>
94 <sevenzip task="decode" input="${basedir}/sourcecode-core.lzma" output="${basedir}/sourcecode-core.comp"/>
95 <delete file="sourcecode-core.lzma"/>
96 <unzip src="${basedir}/sourcecode-core.comp" dest="${installDir}"/>
97 <delete file="sourcecode-core.comp"/>
98
99 <echo>Set the installation locale in config files</echo>
100 <rsr file="${installDir}/setup.bash" pattern="^gsdllang=.*" replacement="gsdllang=${language}"/>
101 <rsr file="${installDir}/gli/gli.sh" pattern="^glilang=.*" replacement="glilang=${language}"/>
102 <rsr file="${installDir}/gli/gems.sh" pattern="^glilang=.*" replacement="glilang=${language}"/>
103
104 <rsr
105 file="${installDir}/gli/classes/xml/config.xml"
106 pattern="(&lt;Argument name=&quot;general.locale&quot;&gt;).*(&lt;/Argument&gt;)"
107 replacement="$1${language}$2"/>
108
109 <echo file="${installDir}/etc/main.cfg" append="true"
110 >cgiarg shortname=l argdefault=${language}</echo>
111
112 <rsr file="${installDir}/etc/main.cfg" pattern="^status .*" replacement="status enabled"/>
113
114 <echo>Creating installation properties file</echo>
115 <echo file="${installDir}/etc/installation.properties">#this file is just a placeholder for now</echo>
116
117 </target>
118
119
120
[14982]121 <!-- Source -->
[17576]122 <target name="Installing Source Code" depends="">
[16818]123 <echo message="Installing Source Code"/>
[17608]124 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="sourcecode.lzma"/></patternset></unzip>
125 <sevenzip task="decode" input="${basedir}/sourcecode.lzma" output="${basedir}/sourcecode.comp"/>
126 <delete file="sourcecode.lzma"/>
127 <unzip src="${basedir}/sourcecode.comp" dest="${installDir}"/>
128 <delete file="sourcecode.comp"/>
129
[14982]130 </target>
131
132</project>
Note: See TracBrowser for help on using the repository browser.