source: release-kits/lirk3/ant-scripts/create-installer.xml@ 16189

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

changes after renaming resources->classes

File size: 7.5 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="lirk3-create-installer" default="create-installer">
3
4 <target name="create-installer">
5 <addressedcall target="setup-for-installer-creation"/>
6 <addressedcall target="compile-installer"/>
7 </target>
8
9 <target name="setup-for-installer-creation">
10 <if><bool><istrue value="${execute}"/></bool>
11
12 <!-- get the size of packages -->
13 <exec executable="du" dir="${basedir}/distribution/greenstone3/packages" outputproperty="du.tomcat"><arg line="-hs tomcat"/></exec>
14 <exec executable="sed" inputstring="${du.tomcat}" outputproperty="component.size.tomcat"><arg line="-e 's/^\(.*\)\s.*$/\1b/g'"/></exec>
15
16 <exec executable="du" dir="${basedir}/distribution/greenstone3/packages" outputproperty="du.ant"><arg line="-hs ant"/></exec>
17 <exec executable="sed" inputstring="${du.ant}" outputproperty="component.size.ant"><arg line="-e 's/^\(.*\)\s.*$/\1b/g'"/></exec>
18
19 <echo>Project Path: ${basedir}/distribution/greenstone3</echo>
20
21 <echo>Getting things ready to compile the installer</echo>
22 <mkdir dir="${basedir}/installer/resources"/>
23 <copy todir="${basedir}/installer" file="${lirk3.home}/installer/antinstall-config.xml" overwrite="true" />
24 <copy todir="${basedir}/installer" file="${lirk3.home}/installer/build.xml" overwrite="true" />
25 <copy todir="${basedir}/installer/classes" overwrite="true">
26 <fileset dir="${lirk3.home}/greenstone3/installer-classes"/>
27 </copy>
28
29 <!-- put the concrete values of things in the config -->
30 <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@version@" replacement="${version}"/>
31 <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.linux-java@" replacement="${component.size.linux-java}"/>
32 <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.tomcat@" replacement="${component.size.tomcat}"/>
33 <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.ant@" replacement="${component.size.ant}"/>
34
35 <rsr file="${basedir}/installer/build.xml" pattern="@java.min.version@" replacement="${java.min.version}"/>
36 <rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${linux-java.extracted}"/>
37
38
39 <!-- put the concrete values of things in the text -->
40
41 <!-- default -->
42 <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@version@" replacement="${version}"/>
43 <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@java.min.version@" replacement="${java.min.version}"/>
44 <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/>
45 <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
46 <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
47
48 <!-- chinese -->
49 <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@version@" replacement="${version}"/>
50 <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@java.min.version@" replacement="${java.min.version}"/>
51 <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/>
52 <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
53 <rsr file="${basedir}/installer/classes/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
54
55 </if>
56 </target>
57
58 <target name="compile-installer">
59 <if><bool><istrue value="${execute}"/></bool>
60
61 <installer file="${basedir}/installer/greenstone3-with-java.jar"
62 compress="true"
63 extractType="NonExtractor"
64 installConfig="${basedir}/installer/antinstall-config.xml"
65 buildFile="${basedir}/installer/build.xml"
66 antInstallLib="${lirk3.home}/packages/ant-installer/lib"
67 antLib="${lirk3.home}/packages/ant/lib"
68 validateConfig="true"
69 failOnError="false"
70 icons="bluecurve">
71
72 <!-- copy all the important files into the archive to be extracted for install -->
73 <zipfileset dir="${basedir}/installer" includes="classes/*"/>
74 <zipfileset dir="${lirk3.home}/ant-scripts/tasks/orans"><include name="RegexSearchReplace.class"/></zipfileset>
75
76
77 <zipfileset dir="${basedir}/distribution/greenstone3" includes="*"/>
78 <zipfileset dir="${basedir}/distribution/greenstone3/bin" prefix="bin"><include name="**/*"/></zipfileset>
79 <zipfileset dir="${basedir}/distribution/greenstone3/docs" prefix="docs"><include name="**/*"/></zipfileset>
80 <zipfileset dir="${basedir}/distribution/greenstone3/gli" prefix="gli"><include name="**/*"/></zipfileset>
81 <zipfileset dir="${basedir}/distribution/greenstone3/gs2build" prefix="gs2build"><include name="**/*"/></zipfileset>
82 <zipfileset dir="${basedir}/distribution/greenstone3/lib" prefix="lib"><include name="**/*"/></zipfileset>
83 <zipfileset dir="${basedir}/distribution/greenstone3/web" prefix="web"><include name="**/*"/></zipfileset>
84 <zipfileset dir="${basedir}/distribution/greenstone3/packages" prefix="packages"><include name="**/*"/></zipfileset>
85 <zipfileset dir="${basedir}/distribution/greenstone3/resources" prefix="resources"><include name="**/*"/></zipfileset>
86 <zipfileset dir="${basedir}/distribution/greenstone3/src" prefix="src"><include name="**/*"/></zipfileset>
87
88 </installer>
89
90 <!-- delete the 'bundled java only' lines from the installer config -->
91 <rsr file="${basedir}/installer/antinstall-config.xml" pattern=".*&lt;!-- bundled java only --&gt;" replacement=""/>
92
93 <installer file="${basedir}/installer/greenstone3.jar"
94 compress="true"
95 extractType="NonExtractor"
96 installConfig="${basedir}/installer/antinstall-config.xml"
97 buildFile="${basedir}/installer/build.xml"
98 antInstallLib="${lirk3.home}/packages/ant-installer/lib"
99 antLib="${lirk3.home}/packages/ant/lib"
100 validateConfig="true"
101 icons="bluecurve">
102
103 <zipfileset dir="${basedir}/installer" includes="resources/*"/>
104 <zipfileset dir="${lirk3.home}/ant-scripts/tasks/orans"><include name="RegexSearchReplace.class"/></zipfileset>
105
106 <zipfileset dir="${basedir}/distribution/greenstone3" includes="*"/>
107 <zipfileset dir="${basedir}/distribution/greenstone3/bin" prefix="bin"><include name="**/*"/></zipfileset>
108 <zipfileset dir="${basedir}/distribution/greenstone3/docs" prefix="docs"><include name="**/*"/></zipfileset>
109 <zipfileset dir="${basedir}/distribution/greenstone3/gli" prefix="gli"><include name="**/*"/></zipfileset>
110 <zipfileset dir="${basedir}/distribution/greenstone3/gs2build" prefix="gs2build"><include name="**/*"/></zipfileset>
111 <zipfileset dir="${basedir}/distribution/greenstone3/lib" prefix="lib"><include name="**/*"/></zipfileset>
112 <zipfileset dir="${basedir}/distribution/greenstone3/web" prefix="web"><include name="**/*"/></zipfileset>
113 <zipfileset dir="${basedir}/distribution/greenstone3/packages" prefix="packages"><include name="**/*"/></zipfileset>
114 <zipfileset dir="${basedir}/distribution/greenstone3/resources" prefix="resources"><include name="**/*"/></zipfileset>
115 <zipfileset dir="${basedir}/distribution/greenstone3/src" prefix="src"><include name="**/*"/></zipfileset>
116 </installer>
117 </if>
118 </target>
119
120</project>
Note: See TracBrowser for help on using the repository browser.