root/release-kits/mark2/ant-scripts/create-installer.xml @ 16453

Revision 16453, 3.5 KB (checked in by oranfry, 12 years ago)

the bulk of the work on the compile logic for mark2

Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="mark2-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            <echo>Getting things ready to compile the installer</echo>
13            <mkdir dir="${basedir}/installer/classes"/>
14            <copy todir="${basedir}/installer" file="${mark2.home}/installer/antinstall-config.xml" overwrite="true"/>
15            <copy todir="${basedir}/installer" file="${mark2.home}/installer/build.xml" overwrite="true"/>
16            <copy todir="${basedir}/installer/classes" overwrite="true">
17                <fileset dir="${mark2.home}/greenstone2/installer-classes"/>
18                <fileset dir="${mark2.home}/ant-scripts/tasks/orans" includes="RegexSearchReplace.class" />
19            </copy>
20
21            <!-- put the concrete values of things in the config -->
22            <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@version@" replacement="${version}"/>
23            <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@component.size.java@" replacement="${component.size.linux-java}"/>
24            <rsr file="${basedir}/installer/build.xml" pattern="@java.min.version@" replacement="${java.min.version}"/>
25            <rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${linux-java.extracted}"/>
26
27            <!-- put the concrete values of things in the text -->
28            <!-- default -->
29            <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@version@" replacement="${version}"/>
30            <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@java.min.version@" replacement="${java.min.version}"/>
31            <rsr file="${basedir}/installer/classes/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.linux-java}"/>
32
33        </if>
34    </target>
35
36    <target name="compile-installer">
37        <if><bool><istrue value="${execute}"/></bool>
38
39            <!-- create the installer with java -->
40            <installer file="${basedir}/installer/Greenstone-${version}-MacOS-x86-with-java.jar"
41                    compress="true"
42                    extractType="NonExtractor"
43                    installConfig="${basedir}/installer/antinstall-config.xml"
44                    buildFile="${basedir}/installer/build.xml"
45                    antInstallLib="${mark2.home}/packages/ant-installer/lib"
46                    antLib="${mark2.home}/packages/ant/lib"
47                    validateConfig="true"
48                    failOnError="false"
49                    icons="bluecurve">
50
51                <zipfileset dir="${basedir}/installer/classes" includes="**/*" />
52                <zipfileset dir="${basedir}/distributions/web" includes="**/*"/>
53
54            </installer>
55
56            <!-- delete the 'bundled java only' lines from the installer config -->
57            <rsr file="${basedir}/installer/antinstall-config.xml" pattern=".*&lt;!-- bundled java only --&gt;" replacement=""/>
58
59            <!-- create the installer without java -->
60            <installer file="${basedir}/installer/Greenstone-${version}-MacOS-x86.jar"
61                    compress="true"
62                    extractType="NonExtractor"
63                    installConfig="${basedir}/installer/antinstall-config.xml"
64                    buildFile="${basedir}/installer/build.xml"
65                    antInstallLib="${mark2.home}/packages/ant-installer/lib"
66                    antLib="${mark2.home}/packages/ant/lib"
67                    validateConfig="true"
68                    failOnError="false"
69                    icons="bluecurve">
70
71                <zipfileset dir="${basedir}/installer/classes" includes="**/*" />
72                <zipfileset dir="${basedir}/distributions/web" includes="**/*"/>
73
74            </installer>
75
76        </if>
77    </target>
78
79</project>
Note: See TracBrowser for help on using the browser.