root/main/trunk/release-kits/kits/rk3/ant-scripts/compile.xml @ 22851

Revision 22851, 6.0 KB (checked in by sjm84, 10 years ago)

Mac no longer deletes setup.bash and the gnome support library is now removed linux-greenstone3 and partially removed for mac-greenstone3

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