root/release-kits/wirk3/ant-scripts/create-installer.xml @ 15356

Revision 15356, 4.7 KB (checked in by oranfry, 12 years ago)

a few fixes to wirk3

Line 
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="wirk3-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: ${project.path}</echo>
23            <mkdir dir="${basedir}/installer"/>
24            <copy todir="${basedir}/installer" file="${wirk3.home}/installer/antinstall-config.xml"/>
25            <copy todir="${basedir}/installer" file="${wirk3.home}/installer/build.xml"/>
26            <copy todir="${basedir}/installer/cp"><fileset dir="${wirk3.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="@version@" replacement="${version}"/>
31                                   
32            <!-- put the concrete values of things in the text -->
33            <!-- default -->
34            <rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@version@" replacement="${version}"/>
35            <rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@java.min.version@" replacement="${java.min.version}"/>
36            <rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@bundled.version.java@" replacement="${bundled.version.java}"/>
37            <rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
38            <rsr file="${basedir}/installer/cp/resources/LanguagePack.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
39           
40            <!-- chinese -->
41            <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@version@" replacement="${version}"/>
42            <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@java.min.version@" replacement="${java.min.version}"/>
43            <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.java@" replacement="${bundled.version.java}"/>
44            <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.tomcat@" replacement="${bundled.version.tomcat}"/>
45            <rsr file="${basedir}/installer/cp/resources/LanguagePack_zh_CN.properties" pattern="@bundled.version.ant@" replacement="${bundled.version.ant}"/>
46           
47           
48        </if>
49    </target>
50
51    <target name="compile-installer">
52        <if><bool><istrue value="${execute}"/></bool>
53
54            <taskdef name="installer" classname="org.tp23.antinstaller.taskdefs.Installer" classpathref="project.classpath"/>
55           
56            <installer file="${basedir}/installer/greenstone-${version}-win32.jar"
57                    compress="true"
58                    extractType="NonExtractor"
59                    installConfig="${basedir}/installer/antinstall-config.xml"
60                    buildFile="${project.installer.path}/build.xml"
61                    antInstallLib="${ant.installer.home}/lib"
62                    antLib="${ant.installer.home}/antlib"
63                    validateConfig="true"
64                    icons="bluecurve">
65
66                <zipfileset dir="${basedir}/installer/cp" includes="resources/*"/>
67                <zipfileset dir="${wirk3.home}/ant-scripts/tasks/orans"><include name="RegexSearchReplace.class"/></zipfileset>
68
69                <zipfileset dir="${project.path}" includes="*"/>
70                <zipfileset dir="${project.path}/bin" prefix="bin"><include name="**/*"/></zipfileset>
71                <zipfileset dir="${project.path}/docs" prefix="docs"><include name="**/*"/></zipfileset>
72                <zipfileset dir="${project.path}/gli" prefix="gli"><include name="**/*"/></zipfileset>
73                <zipfileset dir="${project.path}/gs2build" prefix="gs2build"><include name="**/*"/></zipfileset>
74                <zipfileset dir="${project.path}/lib" prefix="lib"><include name="**/*"/></zipfileset>
75                <zipfileset dir="${project.path}/web" prefix="web"><include name="**/*"/></zipfileset>
76                <zipfileset dir="${project.path}/packages" prefix="packages"><include name="**/*"/></zipfileset>
77                <zipfileset dir="${project.path}/resources" prefix="resources"><include name="**/*"/></zipfileset>
78                <zipfileset dir="${project.path}/winutil" prefix="winutil"><include name="**/*"/></zipfileset>
79                <zipfileset dir="${project.path}/src" prefix="src"><include name="**/*"/></zipfileset>
80
81            </installer>
82
83           
84        </if>
85    </target>
86
87    <target name="clean-up-after-installer-creation">
88        <if><bool><istrue value="${execute}"/></bool>
89            <delete file="${basedir}/installer/antinstall-config.xml"/>
90        </if>
91    </target>
92
93   
94</project>
Note: See TracBrowser for help on using the browser.