source: main/trunk/release-kits/kits/rk3/ant-scripts/compile.xml@ 23843

Last change on this file since 23843 was 23843, checked in by sjm84, 13 years ago

More flax-specific modifications (no ghostscript, no component selection screen in the installer

File size: 6.8 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="rk3-compile">
3
4 <target name="compile">
5
6 <!-- checkout greenstone3 -->
7 <exec executable="svn">
8 <arg value="checkout"/>
9 <arg value="${svn.root}/main/${branch.path}/greenstone3"/>
10 <arg value="compiled"/>
11 <arg value="-r"/><arg value="${branch.revision}"/>
12 </exec>
13
14 <if><bool><equals arg1="${with.jni}" arg2="false"/></bool>
15 <rsr file="${basedir}/compiled/build.properties.in" pattern="with.jni=true" replacement="#with.jni=true"/>
16 </if>
17
18 <if><bool><equals arg1="${with.gli.and.gems}" arg2="false"/></bool>
19 <rsr file="${basedir}/compiled/build.properties.in" pattern="with.gli.and.gems=true" replacement="#with.gli.and.gems=true"/>
20 </if>
21
22 <!-- make sure all c++ compilation is done statically on linux -->
23 <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
24 <property name="forward.compile.static" value="true"/>
25 </if>
26
27 <!-- make sure the c++ compilation can see the support library in the extension folder -->
28 <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
29 <property name="forward.use.support.lib" value="true"/>
30 </if>
31
32 <antcall target="persist-forwarded-properties">
33 <param name="greenstone3basedir" value="compiled"/>
34 </antcall>
35
36 <!-- run greenstone3's ant prepare -->
37 <ant dir="compiled" inheritAll="false">
38 <target name="prepare"/>
39 <propertyset refid="forward.properties"/>
40 <property name="properties.accepted" value="true"/>
41 </ant>
42
43 <!-- set all version numbers -->
44 <antcall target="greenstone3-set-version-numbers"><param name="greenstone3basedir" value="compiled"/></antcall>
45 <antcall target="gli-set-version-numbers"><param name="glibasedir" value="compiled/gli"/></antcall>
46 <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="compiled/gs2build"/></antcall>
47
48 <!-- mac or linux: compile the support library -->
49 <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
50 <!-- checkout the gnome support library extension-->
51 <if><bool><or>
52 <equals arg1="${post.2.83.version}" arg2="true"/>
53 </or></bool>
54 <echo>EXPORTING GNOME LIB EXTENSION</echo>
55 <exec executable="svn">
56 <arg value="export"/>
57 <arg value="${svn.root}/gs2-extensions/gnome-lib/trunk/gnome-lib-minimal-${os.shell}${arch}${extension-x64}.tar.gz"/>
58 <arg value="${basedir}/compiled/ext/gnome-lib-${os.shell}.tar.gz"/>
59 </exec>
60
61 <exec executable="tar" dir="${basedir}/compiled/ext">
62 <arg value="xvzf"/>
63 <arg value="gnome-lib-${os.shell}.tar.gz"/>
64 </exec>
65
66 <exec executable="/bin/bash" dir="${basedir}/compiled/ext/gnome-lib-minimal">
67 <arg value="-c"/>
68 <arg value="source devel.bash"/>
69 </exec>
70 <echo>DONE COMPILING GNOME LIB EXTENSION</echo>
71 </if>
72 </if>
73
74 <!-- run greenstone3's ant install and ant dist-tidy -->
75 <ant dir="compiled" inheritAll="false">
76 <target name="install"/>
77 <target name="dist-tidy"/>
78 <propertyset refid="forward.properties"/>
79 <property name="properties.accepted" value="true"/>
80 </ant>
81
82 <!-- Delete the entire gnome support library on Linux -->
83 <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
84 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal"/>
85 <delete file="${basedir}/compiled/ext/gnome-lib-linux.tar.gz"/>
86 </if>
87
88 <!-- Delete all but the lib folder of the gnome support library on Mac -->
89 <if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
90 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/cascade-make"/>
91 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/packages"/>
92 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/bin"/>
93 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/etc"/>
94 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/include"/>
95 <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/share"/>
96 <delete file="${basedir}/compiled/ext/gnome-lib-minimal/setup.bat"/>
97 <delete file="${basedir}/compiled/ext/gnome-lib-minimal/CASCADE-MAKE.sh"/>
98 <delete file="${basedir}/compiled/ext/gnome-lib-darwin.tar.gz"/>
99 </if>
100
101 <!-- insert an xml parser -->
102 <copy todir="compiled/gs2build/perllib/cpan">
103 <fileset dir="${rk.home}/shared/linux" includes="XML-Parser/**/*"/>
104 </copy>
105
106 <!-- insert ant -->
107 <mkdir dir="compiled/packages"/>
108 <get src="http://www.greenstone.org/gs3files/apache-ant-1.8.0-bin.tar.gz" dest="compiled/packages/apache-ant-1.8.0-bin.tar.gz"/>
109 <untar src="compiled/packages/apache-ant-1.8.0-bin.tar.gz" dest="compiled/packages/" compression="gzip"/>
110 <move file="compiled/packages/apache-ant-1.8.0" tofile="compiled/packages/ant"/>
111 <delete file="compiled/packages/apache-ant-1.8.0-bin.tar.gz"/>
112
113
114 <!-- put the uninstaller in place -->
115 <antcall target="insert-and-compile-uninstaller"/>
116
117 <!-- (windows only) -->
118 <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
119 <!-- insert perl -->
120 <unzip src="${rk.home}/shared/windows/perl.zip" dest="compiled/gs2build/bin/windows"/>
121 </if>
122
123 <!-- minify tomcat -->
124 <delete dir="compiled/packages/tomcat/webapps/docs"/>
125 <delete dir="compiled/packages/tomcat/webapps/examples"/>
126
127 <!-- tidy up gli to make it smaller -->
128 <antcall target="gli-tidy-for-dist"><param name="glibasedir" value="compiled/gli"/></antcall>
129
130 <!-- strip out .svn dirs -->
131 <antcall target="strip-svn-dirs"><param name="dir" value="compiled"/></antcall>
132
133 <!-- (linux only) -->
134 <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
135 <!-- grab imagemagick binaries -->
136 <delete dir="compiled/gs2build/bin/linux/imagemagick"/>
137 <exec executable="svn">
138 <arg value="export"/>
139 <arg value="${svn.root}/main/${branch.path}/binaries/linux/imagemagick"/>
140 <arg value="compiled/gs2build/bin/linux/imagemagick"/>
141 </exec>
142
143 <!-- grab wv binaries -->
144 <delete dir="compiled/gs2build/bin/linux/wv"/>
145 <exec executable="svn">
146 <arg value="export"/>
147 <arg value="${svn.root}/main/${branch.path}/binaries/linux/wv"/>
148 <arg value="compiled/gs2build/bin/linux/wv"/>
149 </exec>
150 <!-- (mac only) -->
151 <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
152 <!-- grab imagemagick binaries -->
153 <delete dir="compiled/gs2build/bin/darwin/imagemagick"/>
154 <exec executable="svn">
155 <arg value="export"/>
156 <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/imagemagick"/>
157 <arg value="compiled/gs2build/bin/darwin/imagemagick"/>
158 </exec>
159
160 <if><bool><not><equals arg1="${forward.install.flax}" arg2="true"/></not></bool>
161 <!-- grab ghostscript binaries -->
162 <delete dir="compiled/gs2build/bin/darwin/ghostscript"/>
163 <exec executable="svn">
164 <arg value="export"/>
165 <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/ghostscript"/>
166 <arg value="compiled/gs2build/bin/darwin/ghostscript"/>
167 </exec>
168 </if>
169 </if></else></if>
170
171 </target>
172
173</project>
Note: See TracBrowser for help on using the repository browser.