1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
2 | <project name="rk-init">
|
---|
3 |
|
---|
4 | <!-- load in static properties from build.properties -->
|
---|
5 | <property file="build.properties" />
|
---|
6 |
|
---|
7 | <!-- CONSTANTS (overridable in build.properties) -->
|
---|
8 |
|
---|
9 | <!-- svn root -->
|
---|
10 | <property name="svn.root" value="http://svn.greenstone.org" />
|
---|
11 |
|
---|
12 | <!-- default revision and branch path -->
|
---|
13 | <property name="branch.path" value="trunk" />
|
---|
14 | <property name="branch.revision" value="HEAD" />
|
---|
15 |
|
---|
16 | <!-- the minimum version of java which the installer should be run with (this gets used in search4j) -->
|
---|
17 | <property name="java.min.version" value="1.4.0_00"/>
|
---|
18 |
|
---|
19 | <!-- create a localised basedir property -->
|
---|
20 | <path id="basedir.path"><pathelement location="${basedir}"/></path>
|
---|
21 | <property name="basedir.local" refid="basedir.path"/>
|
---|
22 |
|
---|
23 | <!-- current date and time -->
|
---|
24 | <tstamp>
|
---|
25 | <format property="current.month" pattern="MMM"/>
|
---|
26 | <format property="current.year" pattern="yyyy"/>
|
---|
27 | </tstamp>
|
---|
28 |
|
---|
29 | <!-- BUNDLED JAVA INFO -->
|
---|
30 | <!-- the bundled javas are kept in shared/linux/wrapper and shared/windows/wrapper in the repository -->
|
---|
31 | <!-- change this info when the bundled version changes -->
|
---|
32 | <!-- linux -->
|
---|
33 | <property name="linux-java.installer" value="jre_bin"/>
|
---|
34 | <property name="bundled.version.linux-java" value="1.6.0_05"/> <!-- set this to the version number of java in the above archive -->
|
---|
35 | <property name="linux-java.extracted" value="jre"/> <!-- set this to the name of the top level directory in the above archive -->
|
---|
36 | <property name="component.bytesize.linux-java" value="101245987"/> <!-- set this to the size of the extract archive -->
|
---|
37 |
|
---|
38 | <!-- windows -->
|
---|
39 | <property name="windows-java.installer" value="jre.exe"/>
|
---|
40 | <property name="bundled.version.windows-java" value="1.6.0_07"/> <!-- set this to the version number of java in the above archive -->
|
---|
41 | <property name="windows-java.extracted" value="jre"/> <!-- set this to the name of the top level directory in the above archive -->
|
---|
42 | <property name="component.bytesize.windows-java" value="75000000"/> <!-- set this to the size of the extract archive -->
|
---|
43 |
|
---|
44 | <!-- version numbers of other bundled things -->
|
---|
45 | <property name="bundled.version.imagemagick" value="6.4.3"/>
|
---|
46 | <property name="bundled.version.ghostscript" value="8.63"/>
|
---|
47 | <property name="bundled.version.tomcat" value="5.5.25"/>
|
---|
48 | <property name="bundled.version.ant" value="1.6.5"/>
|
---|
49 |
|
---|
50 | <!-- CLASSPATH -->
|
---|
51 | <path id="project.classpath">
|
---|
52 |
|
---|
53 | <!-- our classes -->
|
---|
54 | <fileset dir="${rk.home}/ant-scripts/tasks">
|
---|
55 | <include name="**/*.jar"/>
|
---|
56 | </fileset>
|
---|
57 |
|
---|
58 | <!-- jars in lib directory -->
|
---|
59 | <fileset dir="${rk.home}/lib">
|
---|
60 | <include name="*.jar"/>
|
---|
61 | </fileset>
|
---|
62 |
|
---|
63 | <!-- a few ant-installer jars -->
|
---|
64 | <fileset dir="${rk.home}/packages/ant-installer/lib">
|
---|
65 | <include name="ant-installer-ext.jar"/>
|
---|
66 | <include name="ant-installer.jar"/>
|
---|
67 | </fileset>
|
---|
68 |
|
---|
69 | </path>
|
---|
70 |
|
---|
71 | <!-- SELF DEFINED TASKS AND TYPES -->
|
---|
72 | <taskdef name="if" classname="ise.antelope.tasks.IfTask" classpathref="project.classpath"/>
|
---|
73 | <taskdef name="try" classname="ise.antelope.tasks.TryTask" classpathref="project.classpath"/>
|
---|
74 | <taskdef name="math" classname="ise.antelope.tasks.MathTask" classpathref="project.classpath"/>
|
---|
75 | <taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" classpathref="project.classpath"/>
|
---|
76 | <taskdef name="sevenzip" classname="org.apache.tools.ant.SevenZip" classpathref="project.classpath"/>
|
---|
77 | <taskdef name="installer" classname="org.tp23.antinstaller.taskdefs.Installer" classpathref="project.classpath"/>
|
---|
78 | <typedef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/>
|
---|
79 | <typedef name="dcff" classname="org.greenstone.anttasks.DeleteChunkFromFile" classpathref="project.classpath"/>
|
---|
80 | <typedef name="rsplit" classname="org.greenstone.anttasks.SplitResource" classpathref="project.classpath"/>
|
---|
81 | <typedef name="get-property-value" classname="org.greenstone.anttasks.GetPropertyValue" classpathref="project.classpath"/>
|
---|
82 |
|
---|
83 | <!-- DATES IN DIFFERENT LANGUAGES -->
|
---|
84 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="ar.Dates.${current.month}" outputProperty="month.ar"/>
|
---|
85 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="ca.Dates.${current.month}" outputProperty="month.ca"/>
|
---|
86 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="el.Dates.${current.month}" outputProperty="month.el"/>
|
---|
87 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="es.Dates.${current.month}" outputProperty="month.es"/>
|
---|
88 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="fr.Dates.${current.month}" outputProperty="month.fr"/>
|
---|
89 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="lv.Dates.${current.month}" outputProperty="month.lv"/>
|
---|
90 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="mr.Dates.${current.month}" outputProperty="month.mr"/>
|
---|
91 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="ro.Dates.${current.month}" outputProperty="month.ro"/>
|
---|
92 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="ru.Dates.${current.month}" outputProperty="month.ru"/>
|
---|
93 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="vi.Dates.${current.month}" outputProperty="month.vi"/>
|
---|
94 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="zh.Dates.${current.month}" outputProperty="month.zh"/>
|
---|
95 | <get-property-value propertiesFile="${rk.home}/lib/dates.properties" propertyName="default.Dates.${current.month}" outputProperty="month.default"/>
|
---|
96 | <!--
|
---|
97 | <echo level="info">Current Date</echo>
|
---|
98 | <echo level="info">ar: ${month.ar} ${current.year}</echo>
|
---|
99 | <echo level="info">ca: ${month.el} ${current.year}</echo>
|
---|
100 | <echo level="info">el: ${month.el} ${current.year}</echo>
|
---|
101 | <echo level="info">es: ${month.es} ${current.year}</echo>
|
---|
102 | <echo level="info">fr: ${month.fr} ${current.year}</echo>
|
---|
103 | <echo level="info">lv: ${month.lv} ${current.year}</echo>
|
---|
104 | <echo level="info">mr: ${month.mr} ${current.year}</echo>
|
---|
105 | <echo level="info">ro: ${month.ro} ${current.year}</echo>
|
---|
106 | <echo level="info">ru: ${month.ru} ${current.year}</echo>
|
---|
107 | <echo level="info">vi: ${month.vi} ${current.year}</echo>
|
---|
108 | <echo level="info">zh: ${month.zh} ${current.year}</echo>
|
---|
109 | <echo level="info">default: (${month.default} ${current.year})</echo>
|
---|
110 | -->
|
---|
111 |
|
---|
112 | <!-- CHECKS PRE-CONDITIONS -->
|
---|
113 | <target name="init">
|
---|
114 |
|
---|
115 | <!-- version number -->
|
---|
116 | <if>
|
---|
117 | <bool>
|
---|
118 | <not><isset property="version"/></not>
|
---|
119 | </bool>
|
---|
120 | <fail>Version number not set</fail>
|
---|
121 | </if>
|
---|
122 | <property name="app.version" value="${version}"/>
|
---|
123 |
|
---|
124 | <!-- execute target code or just show the tree -->
|
---|
125 | <if>
|
---|
126 | <bool>
|
---|
127 | <not><isset property="execute"/></not>
|
---|
128 | </bool>
|
---|
129 | <property name="execute" value="true"/>
|
---|
130 | <else>
|
---|
131 | <if>
|
---|
132 | <bool>
|
---|
133 | <and>
|
---|
134 | <not><equals arg1="${execute}" arg2="true"/></not>
|
---|
135 | <not><equals arg1="${execute}" arg2="false"/></not>
|
---|
136 | </and>
|
---|
137 | </bool>
|
---|
138 | <echo level="error">You have not specified a valid value for execute.</echo>
|
---|
139 | <echo level="error">Valid values are 'true' and 'false'.</echo>
|
---|
140 | <fail>You have not specified a valid value for execute.</fail>
|
---|
141 | </if>
|
---|
142 | </else>
|
---|
143 | </if>
|
---|
144 |
|
---|
145 | <!-- show important properties -->
|
---|
146 | <echo level="info">Version (version): ${version}</echo>
|
---|
147 | <echo level="info">Branch Path (branch.path): ${branch.path}</echo>
|
---|
148 | <echo level="info">Current Month (current.month): ${current.month}</echo>
|
---|
149 | <echo level="info">Current Year (current.year): ${current.year}</echo>
|
---|
150 |
|
---|
151 | </target>
|
---|
152 |
|
---|
153 | <target name="strip-svn-dirs">
|
---|
154 | <delete includeemptydirs="true">
|
---|
155 | <fileset dir="${dir}" defaultexcludes="false">
|
---|
156 | <include name="**/.svn/**" />
|
---|
157 | <include name="**/.svn/" />
|
---|
158 | <include name=".svn/**" />
|
---|
159 | <include name=".svn/" />
|
---|
160 | </fileset>
|
---|
161 | </delete>
|
---|
162 | </target>
|
---|
163 |
|
---|
164 | <target name="compile-binary-installer">
|
---|
165 |
|
---|
166 | <copy file="${basedir}/installer/antinstall-config.xml" tofile="${basedir}/installer/antinstall-config-binary.xml"/>
|
---|
167 | <dcff file="${basedir}/installer/antinstall-config-binary.xml" startTag=".*<!-- start sourcecode -->.*" endTag=".*<!-- end sourcecode -->.*" />
|
---|
168 | <installer file="${basedir}/installer/Greenstone-${version}-${os.suffix}.jar"
|
---|
169 | compress="true"
|
---|
170 | extractType="NonExtractor"
|
---|
171 | installConfig="${basedir}/installer/antinstall-config-binary.xml"
|
---|
172 | buildFile="${basedir}/installer/build.xml"
|
---|
173 | antInstallLib="${rk.home}/packages/ant-installer/lib"
|
---|
174 | antLib="${rk.home}/packages/ant/lib"
|
---|
175 | validateConfig="true"
|
---|
176 | icons="bluecurve">
|
---|
177 |
|
---|
178 | <zipfileset dir="${basedir}/installer/classes" includes="**/*" />
|
---|
179 | <zipfileset dir="${basedir}/components" includes="*.lzma" excludes="sourcecode.lzma,sourcecode-core.lzma" />
|
---|
180 |
|
---|
181 | </installer>
|
---|
182 |
|
---|
183 | </target>
|
---|
184 |
|
---|
185 | <target name="compile-minimal-installer">
|
---|
186 |
|
---|
187 | <copy file="${basedir}/installer/antinstall-config.xml" tofile="${basedir}/installer/antinstall-config-minimal.xml"/>
|
---|
188 | <dcff file="${basedir}/installer/antinstall-config-minimal.xml" startTag=".*<!-- start bundled components -->.*" endTag=".*<!-- end bundled components -->.*" />
|
---|
189 | <dcff file="${basedir}/installer/antinstall-config-minimal.xml" startTag=".*<!-- start sourcecode -->.*" endTag=".*<!-- end sourcecode -->.*" />
|
---|
190 | <installer file="${basedir}/installer/Greenstone-${version}-${os.suffix}-minimal.jar"
|
---|
191 | compress="true"
|
---|
192 | extractType="NonExtractor"
|
---|
193 | installConfig="${basedir}/installer/antinstall-config-minimal.xml"
|
---|
194 | buildFile="${basedir}/installer/build.xml"
|
---|
195 | antInstallLib="${rk.home}/packages/ant-installer/lib"
|
---|
196 | antLib="${rk.home}/packages/ant/lib"
|
---|
197 | validateConfig="true"
|
---|
198 | icons="bluecurve">
|
---|
199 |
|
---|
200 | <zipfileset dir="${basedir}/installer/classes" includes="**/*" />
|
---|
201 | <zipfileset dir="${basedir}/components" includes="core.lzma" />
|
---|
202 | </installer>
|
---|
203 |
|
---|
204 | </target>
|
---|
205 |
|
---|
206 | <target name="compile-source-installer">
|
---|
207 | </target>
|
---|
208 |
|
---|
209 |
|
---|
210 | </project>
|
---|