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