1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
2 | <project name="wirk3-compile" default="compile">
|
---|
3 |
|
---|
4 | <target name="compile">
|
---|
5 | <addressedcall target="checkout-greenstone3" />
|
---|
6 | <addressedcall target="set-version-number-property" />
|
---|
7 | <addressedcall target="dist-prepare-windows" />
|
---|
8 | <addressedcall target="dist-build-windows" />
|
---|
9 | <addressedcall target="prepare-documentation" />
|
---|
10 | </target>
|
---|
11 |
|
---|
12 | <target name="checkout-greenstone3">
|
---|
13 | <if><bool><istrue value="${execute}"/></bool>
|
---|
14 | <svn>
|
---|
15 | <checkout url="${svn.root}/greenstone3/${branch.path}" destPath="greenstone3" revision="${branch.revision}"/>
|
---|
16 | </svn>
|
---|
17 | </if>
|
---|
18 | </target>
|
---|
19 |
|
---|
20 | <target name="set-version-number-property">
|
---|
21 | <if><bool><istrue value="${execute}"/></bool>
|
---|
22 | <rsr file="greenstone3/resources/java/global.properties.in" pattern="(.*)@gsdl3version@(.*)" replacement="$1${version}$2" />
|
---|
23 | </if>
|
---|
24 | </target>
|
---|
25 |
|
---|
26 | <target name="dist-prepare-windows">
|
---|
27 | <if><bool><istrue value="${execute}"/></bool>
|
---|
28 | <ant dir="greenstone3" antfile="${wirk3.home}/ant-scripts/operations-on-gs3home.xml" target="prepare-windows" inheritAll="false">
|
---|
29 | <property name="app.version" value="${version}"/>
|
---|
30 | <property name="branch.path" value="${branch.path}"/>
|
---|
31 | <property name="branch.revision" value="${branch.revision}"/>
|
---|
32 | </ant>
|
---|
33 |
|
---|
34 | </if>
|
---|
35 | </target>
|
---|
36 | <target name="tweak-configure-scripts">
|
---|
37 | <addressedcall target="mgpp-add-static" />
|
---|
38 | <addressedcall target="mg-add-static" />
|
---|
39 | <addressedcall target="gs2buildextra-add-static" />
|
---|
40 | </target>
|
---|
41 |
|
---|
42 | <target name="dist-build-windows">
|
---|
43 | <if><bool><istrue value="${execute}"/></bool>
|
---|
44 | <ant dir="greenstone3" antfile="${wirk3.home}/ant-scripts/operations-on-gs3home.xml" target="build-windows" inheritAll="false">
|
---|
45 | <property name="app.version" value="${version}"/>
|
---|
46 | <property name="branch.path" value="${branch.path}"/>
|
---|
47 | <property name="branch.revision" value="${branch.revision}"/>
|
---|
48 | </ant>
|
---|
49 | </if>
|
---|
50 | </target>
|
---|
51 |
|
---|
52 | <target name="prepare-documentation">
|
---|
53 | <if><bool><istrue value="${execute}"/></bool>
|
---|
54 |
|
---|
55 | <mkdir dir="greenstone3/gsdl-manuals"/>
|
---|
56 | <svn>
|
---|
57 | <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="greenstone3/gsdl-manuals/manuals" revision="${branch.revision}"/>
|
---|
58 | <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="greenstone3/gsdl-manuals/shared" revision="${branch.revision}"/>
|
---|
59 | </svn>
|
---|
60 | <javac srcdir="greenstone3/gsdl-manuals/shared" destdir="greenstone3/gsdl-manuals/shared" debug="on"><include name="*.java"/></javac>
|
---|
61 | <unzip src="greenstone3/gsdl-manuals/shared/fop.zip" dest="greenstone3/gsdl-manuals/shared"/>
|
---|
62 |
|
---|
63 | <echo>Define Classpath</echo>
|
---|
64 | <path id="documentation.compile.classpath">
|
---|
65 | <fileset dir="greenstone3/gsdl-manuals">
|
---|
66 | <include name="**/*.jar"/>
|
---|
67 | </fileset>
|
---|
68 | <pathelement path="greenstone3/gsdl-manuals/shared"/>
|
---|
69 | <pathelement path="greenstone3/gsdl-manuals/manuals"/>
|
---|
70 | <pathelement path="greenstone3/gli/classes"/>
|
---|
71 | </path>
|
---|
72 |
|
---|
73 | <echo>Apply XSLT</echo>
|
---|
74 | <java classname="org.apache.xalan.xslt.Process" classpathref="documentation.compile.classpath" fork="true">
|
---|
75 | <jvmarg value="-DGSDLHOME=${basedir}/greenstone" />
|
---|
76 | <arg value="-IN"/><arg file="greenstone3/gli/help/en/help.xml" />
|
---|
77 | <arg value="-XSL"/><arg file="greenstone3/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" />
|
---|
78 | <arg value="-OUT"/><arg file="greenstone3/gsdl-manuals/manuals/xml-source/en/help-en.xml" />
|
---|
79 |
|
---|
80 | </java>
|
---|
81 |
|
---|
82 | <echo>Run generate-pdf.bat</echo>
|
---|
83 | <exec dir="${basedir}\greenstone3/gsdl-manuals/manuals" executable="cmd">
|
---|
84 | <arg value="/C" />
|
---|
85 | <arg file="${basedir}/greenstone3/gsdl-manuals/manuals/generate-pdf.bat" />
|
---|
86 | <arg value="u" />
|
---|
87 | <arg value="en" />
|
---|
88 | </exec>
|
---|
89 |
|
---|
90 | </if>
|
---|
91 | </target>
|
---|
92 |
|
---|
93 |
|
---|
94 |
|
---|
95 | </project> |
---|