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 | <addressedcall target="clean-up-after-installer-creation"/>
|
---|
17 | </target>
|
---|
18 |
|
---|
19 | <target name="setup-for-installer-creation">
|
---|
20 | <if><bool><istrue value="${execute}"/></bool>
|
---|
21 |
|
---|
22 | <echo>Project Path: ${basedir}/distribution/greenstone3</echo>
|
---|
23 | <mkdir dir="${basedir}/installer"/>
|
---|
24 | <copy todir="${basedir}/installer" file="${lirk3.home}/installer/antinstall-config.xml"/>
|
---|
25 | <copy todir="${basedir}/installer" file="${lirk3.home}/installer/build.xml"/>
|
---|
26 | <copy todir="${basedir}/installer/cp"><fileset dir="${lirk3.home}/installer/cp"/></copy>
|
---|
27 |
|
---|
28 | <!-- put the concrete values of things in the config -->
|
---|
29 | <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@version@" replacement="${version}"/>
|
---|
30 | <rsr file="${basedir}/installer/build.xml" pattern="@java.min.version@" replacement="${java.min.version}"/>
|
---|
31 | <rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${java.extracted}"/>
|
---|
32 |
|
---|
33 |
|
---|
34 | <!-- put the concrete values of things in the text -->
|
---|
35 | <!-- default -->
|
---|
36 | <rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@version@" replacement="${version}"/>
|
---|
37 | <rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@java.min.version@" replacement="${java.min.version}"/>
|
---|
38 | <rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.java}"/>
|
---|
39 | <rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
|
---|
40 | <rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
|
---|
41 |
|
---|
42 | <!-- chinese -->
|
---|
43 | <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@version@" replacement="${version}"/>
|
---|
44 | <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@java.min.version@" replacement="${java.min.version}"/>
|
---|
45 | <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.java}"/>
|
---|
46 | <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
|
---|
47 | <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
|
---|
48 |
|
---|
49 | </if>
|
---|
50 | </target>
|
---|
51 |
|
---|
52 | <target name="compile-installer">
|
---|
53 | <if><bool><istrue value="${execute}"/></bool>
|
---|
54 |
|
---|
55 | <installer file="${basedir}/installer/greenstone3-with-java.jar"
|
---|
56 | compress="true"
|
---|
57 | extractType="NonExtractor"
|
---|
58 | installConfig="${basedir}/installer/antinstall-config.xml"
|
---|
59 | buildFile="${basedir}/installer/build.xml"
|
---|
60 | antInstallLib="${lirk3.home}/bin/ant-installer/lib"
|
---|
61 | antLib="${lirk3.home}/bin/ant-installer/antlib"
|
---|
62 | validateConfig="true"
|
---|
63 | failOnError="false"
|
---|
64 | icons="bluecurve">
|
---|
65 |
|
---|
66 | <!-- copy all the important files into the archive to be extracted for install -->
|
---|
67 | <zipfileset dir="${basedir}/installer/cp" includes="resources/*"/>
|
---|
68 | <zipfileset dir="${lirk3.home}/ant-scripts/tasks/orans"><include name="RegexSearchReplace.class"/></zipfileset>
|
---|
69 |
|
---|
70 |
|
---|
71 | <zipfileset dir="${basedir}/distribution/greenstone3" includes="*"/>
|
---|
72 | <zipfileset dir="${basedir}/distribution/greenstone3/bin" prefix="bin"><include name="**/*"/></zipfileset>
|
---|
73 | <zipfileset dir="${basedir}/distribution/greenstone3/docs" prefix="docs"><include name="**/*"/></zipfileset>
|
---|
74 | <zipfileset dir="${basedir}/distribution/greenstone3/gli" prefix="gli"><include name="**/*"/></zipfileset>
|
---|
75 | <zipfileset dir="${basedir}/distribution/greenstone3/gs2build" prefix="gs2build"><include name="**/*"/></zipfileset>
|
---|
76 | <zipfileset dir="${basedir}/distribution/greenstone3/lib" prefix="lib"><include name="**/*"/></zipfileset>
|
---|
77 | <zipfileset dir="${basedir}/distribution/greenstone3/web" prefix="web"><include name="**/*"/></zipfileset>
|
---|
78 | <zipfileset dir="${basedir}/distribution/greenstone3/packages" prefix="packages"><include name="**/*"/></zipfileset>
|
---|
79 | <zipfileset dir="${basedir}/distribution/greenstone3/resources" prefix="resources"><include name="**/*"/></zipfileset>
|
---|
80 | <zipfileset dir="${basedir}/distribution/greenstone3/src" prefix="src"><include name="**/*"/></zipfileset>
|
---|
81 |
|
---|
82 | </installer>
|
---|
83 |
|
---|
84 | <!-- delete the 'bundled java only' lines from the installer config -->
|
---|
85 | <rsr file="${basedir}/installer/antinstall-config.xml" pattern=".*<!-- bundled java only -->" replacement=""/>
|
---|
86 |
|
---|
87 | <installer file="${basedir}/installer/greenstone3.jar"
|
---|
88 | compress="true"
|
---|
89 | extractType="NonExtractor"
|
---|
90 | installConfig="${basedir}/installer/antinstall-config.xml"
|
---|
91 | buildFile="${basedir}/installer/build.xml"
|
---|
92 | antInstallLib="${lirk3.home}/bin/ant-installer/lib"
|
---|
93 | antLib="${lirk3.home}/bin/ant-installer/antlib"
|
---|
94 | validateConfig="true"
|
---|
95 | icons="bluecurve">
|
---|
96 |
|
---|
97 | <!-- copy all the important files into the archive to be extracted for install -->
|
---|
98 | <zipfileset dir="${basedir}/installer/cp" includes="resources/*"/>
|
---|
99 | <zipfileset dir="${lirk3.home}/ant-scripts/tasks/orans"><include name="RegexSearchReplace.class"/></zipfileset>
|
---|
100 |
|
---|
101 | <zipfileset dir="${basedir}/distribution/greenstone3" includes="*"/>
|
---|
102 | <zipfileset dir="${basedir}/distribution/greenstone3/bin" prefix="bin"><include name="**/*"/></zipfileset>
|
---|
103 | <zipfileset dir="${basedir}/distribution/greenstone3/docs" prefix="docs"><include name="**/*"/></zipfileset>
|
---|
104 | <zipfileset dir="${basedir}/distribution/greenstone3/gli" prefix="gli"><include name="**/*"/></zipfileset>
|
---|
105 | <zipfileset dir="${basedir}/distribution/greenstone3/gs2build" prefix="gs2build"><include name="**/*"/></zipfileset>
|
---|
106 | <zipfileset dir="${basedir}/distribution/greenstone3/lib" prefix="lib"><include name="**/*"/></zipfileset>
|
---|
107 | <zipfileset dir="${basedir}/distribution/greenstone3/web" prefix="web"><include name="**/*"/></zipfileset>
|
---|
108 | <zipfileset dir="${basedir}/distribution/greenstone3/packages" prefix="packages"><include name="**/*"/></zipfileset>
|
---|
109 | <zipfileset dir="${basedir}/distribution/greenstone3/resources" prefix="resources"><include name="**/*"/></zipfileset>
|
---|
110 | <zipfileset dir="${basedir}/distribution/greenstone3/src" prefix="src"><include name="**/*"/></zipfileset>
|
---|
111 | </installer>
|
---|
112 |
|
---|
113 | </if>
|
---|
114 | </target>
|
---|
115 |
|
---|
116 | <target name="clean-up-after-installer-creation">
|
---|
117 | <if><bool><istrue value="${execute}"/></bool>
|
---|
118 | <delete file="${basedir}/installer/antinstall-config.xml"/>
|
---|
119 | <delete file="${basedir}/installer/build.xml"/>
|
---|
120 | </if>
|
---|
121 | </target>
|
---|
122 |
|
---|
123 |
|
---|
124 | </project>
|
---|