[14982] | 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">
|
---|
[15142] | 14 | <addressedcall target="setup-for-installer-creation"/>
|
---|
| 15 | <addressedcall target="compile-installer"/>
|
---|
| 16 | </target>
|
---|
| 17 |
|
---|
| 18 | <target name="setup-for-installer-creation">
|
---|
[14982] | 19 | <if><bool><istrue value="${execute}"/></bool>
|
---|
| 20 |
|
---|
[15967] | 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 |
|
---|
[15142] | 28 | <echo>Project Path: ${basedir}/distribution/greenstone3</echo>
|
---|
[16003] | 29 |
|
---|
| 30 | <echo>Getting things ready to compile the installer</echo>
|
---|
| 31 | <mkdir dir="${basedir}/installer/resources"/>
|
---|
[15995] | 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" />
|
---|
[16003] | 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>
|
---|
[15205] | 40 |
|
---|
| 41 | <!-- put the concrete values of things in the config -->
|
---|
[15142] | 42 | <rsr file="${basedir}/installer/antinstall-config.xml" pattern="@version@" replacement="${version}"/>
|
---|
[15967] | 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 |
|
---|
[15205] | 47 | <rsr file="${basedir}/installer/build.xml" pattern="@java.min.version@" replacement="${java.min.version}"/>
|
---|
[15142] | 48 | <rsr file="${basedir}/installer/build.xml" pattern="@java.extracted@" replacement="${java.extracted}"/>
|
---|
[15205] | 49 |
|
---|
| 50 |
|
---|
| 51 | <!-- put the concrete values of things in the text -->
|
---|
[15967] | 52 |
|
---|
[15205] | 53 | <!-- default -->
|
---|
[16003] | 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}"/>
|
---|
[15205] | 59 |
|
---|
| 60 | <!-- chinese -->
|
---|
[16003] | 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}"/>
|
---|
[15205] | 66 |
|
---|
[15142] | 67 | </if>
|
---|
| 68 | </target>
|
---|
| 69 |
|
---|
| 70 | <target name="compile-installer">
|
---|
| 71 | <if><bool><istrue value="${execute}"/></bool>
|
---|
| 72 |
|
---|
[15205] | 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"
|
---|
[15995] | 79 | antLib="${lirk3.home}/bin/apache-ant-1.6.5/lib"
|
---|
[15205] | 80 | validateConfig="true"
|
---|
[15304] | 81 | failOnError="false"
|
---|
[15205] | 82 | icons="bluecurve">
|
---|
| 83 |
|
---|
| 84 | <!-- copy all the important files into the archive to be extracted for install -->
|
---|
[16003] | 85 | <zipfileset dir="${basedir}/installer" includes="resources/*"/>
|
---|
[15205] | 86 | <zipfileset dir="${lirk3.home}/ant-scripts/tasks/orans"><include name="RegexSearchReplace.class"/></zipfileset>
|
---|
| 87 |
|
---|
[15304] | 88 |
|
---|
[15205] | 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 |
|
---|
[14982] | 105 | <installer file="${basedir}/installer/greenstone3.jar"
|
---|
| 106 | compress="true"
|
---|
| 107 | extractType="NonExtractor"
|
---|
[15142] | 108 | installConfig="${basedir}/installer/antinstall-config.xml"
|
---|
| 109 | buildFile="${basedir}/installer/build.xml"
|
---|
| 110 | antInstallLib="${lirk3.home}/bin/ant-installer/lib"
|
---|
[15995] | 111 | antLib="${lirk3.home}/bin/apache-ant-1.6.5/lib"
|
---|
[14982] | 112 | validateConfig="true"
|
---|
| 113 | icons="bluecurve">
|
---|
| 114 |
|
---|
[16003] | 115 | <zipfileset dir="${basedir}/installer" includes="resources/*"/>
|
---|
[14982] | 116 | <zipfileset dir="${lirk3.home}/ant-scripts/tasks/orans"><include name="RegexSearchReplace.class"/></zipfileset>
|
---|
| 117 |
|
---|
[15142] | 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>
|
---|
[14982] | 128 | </installer>
|
---|
| 129 | </if>
|
---|
| 130 | </target>
|
---|
| 131 |
|
---|
| 132 | </project>
|
---|