1 | <project name="rke-init">
|
---|
2 | <!-- CHECK PRE-CONDITIONS -->
|
---|
3 | <target name="init">
|
---|
4 |
|
---|
5 | <!-- CLASSPATH -->
|
---|
6 | <path id="project.classpath">
|
---|
7 |
|
---|
8 | <!-- our classes -->
|
---|
9 | <fileset dir="${rk.home}/shared/core">
|
---|
10 | <include name="ant-tasks/antelope/AntelopeTasks_3.4.2.jar"/>
|
---|
11 | <include name="ant-tasks/orangevolt/roxes-win32forjava-1.1.1.jar"/>
|
---|
12 | <include name="ant-tasks/orangevolt/orangevolt-ant-tasks-1.3.8.jar"/>
|
---|
13 | <include name="ant-tasks/greenstone/anttasks.jar"/>
|
---|
14 | <include name="ant-tasks/7z-ant/7z.jar"/>
|
---|
15 | <include name="lib/crypt.jar"/>
|
---|
16 | <include name="lib/serializer.jar"/>
|
---|
17 | <include name="lib/xalan.jar"/>
|
---|
18 | <include name="lib/xercesImpl.jar"/>
|
---|
19 | <include name="lib/xml-apis.jar"/>
|
---|
20 | <include name="ant-installer/lib/ant-installer-ext.jar"/>
|
---|
21 | <include name="ant-installer/lib/ant-installer.jar"/>
|
---|
22 | </fileset>
|
---|
23 |
|
---|
24 | </path>
|
---|
25 |
|
---|
26 | <!-- SELF DEFINED TASKS AND TYPES -->
|
---|
27 | <taskdef name="if" classname="ise.antelope.tasks.IfTask" classpathref="project.classpath"/>
|
---|
28 | <taskdef name="try" classname="ise.antelope.tasks.TryTask" classpathref="project.classpath"/>
|
---|
29 | <taskdef name="math" classname="ise.antelope.tasks.MathTask" classpathref="project.classpath"/>
|
---|
30 | <taskdef name="sevenzip" classname="org.apache.tools.ant.SevenZip" classpathref="project.classpath"/>
|
---|
31 | <taskdef name="installer" classname="org.tp23.antinstaller.taskdefs.Installer" classpathref="project.classpath"/>
|
---|
32 | <typedef name="iuv" classname="org.greenstone.anttasks.InsertUniqueValue" classpathref="project.classpath"/>
|
---|
33 | <typedef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/>
|
---|
34 | <typedef name="dcff" classname="org.greenstone.anttasks.DeleteChunkFromFile" classpathref="project.classpath"/>
|
---|
35 | <typedef name="pstf" classname="org.greenstone.anttasks.PatternSetToFile" classpathref="project.classpath"/>
|
---|
36 | <typedef name="rsplit" classname="org.greenstone.anttasks.SplitResource" classpathref="project.classpath"/>
|
---|
37 | <typedef name="get-property-value" classname="org.greenstone.anttasks.GetPropertyValue" classpathref="project.classpath"/>
|
---|
38 |
|
---|
39 | <!-- CONSTANTS (overridable in build.properties) -->
|
---|
40 |
|
---|
41 | <!-- svn root -->
|
---|
42 | <property name="svn.root" value="https://svn.cms.waikato.ac.nz/svn/expeditee/trunk" />
|
---|
43 |
|
---|
44 | <!-- the minimum version of java which the installer should be run with (this gets used in search4j) -->
|
---|
45 | <property name="java.min.version" value="1.6.0_00"/>
|
---|
46 |
|
---|
47 | <!-- create a localised basedir property -->
|
---|
48 | <path id="basedir.path"><pathelement location="${basedir}"/></path>
|
---|
49 | <property name="basedir.local" refid="basedir.path"/>
|
---|
50 |
|
---|
51 | <!-- size of resource chunks (windows wrapper) -->
|
---|
52 | <property name="resources.chunksize" value="8388608"/>
|
---|
53 |
|
---|
54 | <!-- the extra space for the dmg image in KB (mac wrapper) -->
|
---|
55 | <property name="dmg.overhead" value="4096"/>
|
---|
56 |
|
---|
57 | <!-- current date and time -->
|
---|
58 | <tstamp>
|
---|
59 | <format property="current.month" pattern="MMM"/>
|
---|
60 | <format property="current.year" pattern="yyyy"/>
|
---|
61 | <format property="date" pattern="yyyy.MM.dd"/>
|
---|
62 | </tstamp>
|
---|
63 |
|
---|
64 | <if>
|
---|
65 | <bool><equals arg1="${x64}" arg2="true"/></bool>
|
---|
66 | <property name="extension-x64" value="-x64" />
|
---|
67 | <property name="extension_x64" value="_x64" />
|
---|
68 | <else>
|
---|
69 | <property name="extension-x64" value="" />
|
---|
70 | <property name="extension_x64" value="" />
|
---|
71 | </else>
|
---|
72 | </if>
|
---|
73 |
|
---|
74 | <!-- default revision and branch path -->
|
---|
75 | <property name="branch.revision" value="HEAD" />
|
---|
76 | <property name="branch.path" value="trunk" />
|
---|
77 |
|
---|
78 |
|
---|
79 |
|
---|
80 | <!-- version number -->
|
---|
81 | <if><bool><not><isset property="version"/></not></bool>
|
---|
82 | <fail>Version number not set. Check that the file '${rk.name}-build.properties' exists and defines property 'version'.</fail>
|
---|
83 | </if>
|
---|
84 | <property name="app.version" value="${version}"/>
|
---|
85 |
|
---|
86 | <!-- work out rk.os -->
|
---|
87 | <if>
|
---|
88 | <bool>
|
---|
89 | <or>
|
---|
90 | <equals arg1="${rk.os}" arg2="linux"/>
|
---|
91 | <equals arg1="${rk.os}" arg2="mac"/>
|
---|
92 | <equals arg1="${rk.os}" arg2="windows"/>
|
---|
93 | </or>
|
---|
94 | </bool>
|
---|
95 | <echo>Using user-specified value for rk.os: '${rk.os}'</echo>
|
---|
96 |
|
---|
97 | <else><if>
|
---|
98 | <bool><equals arg1="${os.name}" arg2="Linux"/></bool>
|
---|
99 | <property name="rk.os" value="linux"/>
|
---|
100 |
|
---|
101 | <else><if>
|
---|
102 | <bool><equals arg1="${os.name}" arg2="Mac OS X"/></bool>
|
---|
103 | <property name="rk.os" value="mac"/>
|
---|
104 |
|
---|
105 | <else>
|
---|
106 | <if>
|
---|
107 | <bool><os family="windows"/></bool>
|
---|
108 | <property name="rk.os" value="windows"/>
|
---|
109 | <else>
|
---|
110 | <fail>Can't work out what to set rk.os to. Please report this to [email protected] . In the mean time, manually set rk.os to 'windows', 'mac', or 'linux' by reinvoking the release kit with, for example, '-Drk.os=windows'</fail>
|
---|
111 |
|
---|
112 | </else></if></else></if></else></if></else></if>
|
---|
113 |
|
---|
114 | <!-- set os.suffix and os.shell -->
|
---|
115 | <if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
|
---|
116 | <exec executable="uname" outputproperty="mac.arch">
|
---|
117 | <arg line="-p"/>
|
---|
118 | </exec>
|
---|
119 |
|
---|
120 | <if><bool><equals arg1="${mac.arch}" arg2="powerpc"/></bool>
|
---|
121 | <property name="os.suffix" value="MacOS-ppc"/>
|
---|
122 | <property name="arch" value="-ppc"/>
|
---|
123 | <else>
|
---|
124 | <property name="os.suffix" value="MacOS-intel"/>
|
---|
125 | <property name="arch" value="-intel"/>
|
---|
126 | </else>
|
---|
127 | </if>
|
---|
128 |
|
---|
129 | <property name="os.shell" value="darwin"/>
|
---|
130 | </if>
|
---|
131 | <property name="arch" value=""/>
|
---|
132 |
|
---|
133 | <property name="os.suffix" value="${rk.os}"/>
|
---|
134 | <property name="os.shell" value="${rk.os}"/>
|
---|
135 |
|
---|
136 | <!-- set os.script.format -->
|
---|
137 | <if><bool><or><equals arg1="${rk.os}" arg2="linux"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
|
---|
138 | <property name="os.script.format" value="sh"/>
|
---|
139 | <else><if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
|
---|
140 | <property name="os.script.format" value="bat"/>
|
---|
141 | </if></else></if>
|
---|
142 |
|
---|
143 |
|
---|
144 | <!-- BUNDLED JAVA INFO -->
|
---|
145 | <!-- the bundled javas are kept in shared/linux/wrapper and shared/windows/wrapper in the repository -->
|
---|
146 | <!-- change this info when the bundled version changes -->
|
---|
147 | <property name="java.extracted" value="jre"/> <!-- set this to the name of the top level directory in the above archive -->
|
---|
148 |
|
---|
149 | <property name="bundled.version.java" value="1.8.0"/> <!-- set this to the version number of java in the above archive -->
|
---|
150 | <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
|
---|
151 | <property name="java.installer" value="jre_bin${extension_x64}"/>
|
---|
152 | <if>
|
---|
153 | <bool><equals arg1="${x64}" arg2="true"/></bool>
|
---|
154 | <property name="component.bytesize.java" value="158123846"/> <!-- set this to the size of the x64 extracted archive -->
|
---|
155 | <else>
|
---|
156 | <property name="component.bytesize.java" value="161601299"/> <!-- set this to the size of the x32 extracted archive -->
|
---|
157 | </else>
|
---|
158 | </if>
|
---|
159 | </if>
|
---|
160 | <if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
|
---|
161 | <property name="java.installer" value="jre_bin_x64"/>
|
---|
162 | <property name="component.bytesize.java" value="158123846"/> <!-- set this to the size of the extracted archive -->
|
---|
163 | </if>
|
---|
164 | <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
|
---|
165 | <property name="java.installer" value="jre.exe"/>
|
---|
166 | <property name="component.bytesize.java" value="75000000"/> <!-- set this to the size of the extracted archive -->
|
---|
167 | </if>
|
---|
168 |
|
---|
169 | <!-- show important properties -->
|
---|
170 | <echo level="info">Projectname: ${projectname}</echo>
|
---|
171 | <echo level="info">Version (version): ${version}${version-extra}</echo>
|
---|
172 | <echo level="info">Major Version (version.major): ${version.major}</echo>
|
---|
173 | <echo level="info">Branch Path (branch.path): ${branch.path}</echo>
|
---|
174 | <echo level="info">Date (date): ${date}</echo>
|
---|
175 | <echo level="info">Current Month (current.month): ${current.month}</echo>
|
---|
176 | <echo level="info">Current Year (current.year): ${current.year}</echo>
|
---|
177 | <echo level="info">Operating System (rk.os): ${rk.os}</echo>
|
---|
178 | <echo level="info">Operating System Suffix (os.suffix): ${os.suffix}</echo>
|
---|
179 | <echo level="info">Operating System Script format (os.script.format): ${os.script.format}</echo>
|
---|
180 | <echo level="info">Operating System Shell (os.shell): ${os.shell}</echo>
|
---|
181 |
|
---|
182 |
|
---|
183 | </target>
|
---|
184 | </project>
|
---|