source: release-kits/wirk3/ant-scripts/wrap.xml@ 15024

Last change on this file since 15024 was 15023, checked in by oranfry, 16 years ago

did the bulk of the work on wirk3

File size: 2.9 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2
3<!--
4 ..........................................................
5 September 2007
6 Greenstone3 'release maker' script
7 Oran Fry
8 ..........................................................
9-->
10
11<project name="wirk3-wrap" default="wrap">
12 <property name="java.installer" value="jre-6u3-windows-i586-p-s.exe"/>
13
14
15 <target name="wrap">
16 <addressedcall target="setup-for-wrapping"/>
17 <addressedcall target="compile-wrapper"/>
18 <addressedcall target="clean-up-after-wrapping"/>
19 </target>
20
21
22 <target name="setup-for-wrapping">
23 <if><bool><istrue value="${execute}"/></bool>
24
25 <mkdir dir="${basedir}/wrapped-installer/build"/>
26 <copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/wrapper/wrapper.cpp"/>
27 <copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/wrapper/wrapper.rc"/>
28 <copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/wrapper/wrapper-with-jre.rc"/>
29
30 <!-- resources to bundle -->
31 <copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/icon/gs3.ico"/>
32 <copy todir="${basedir}/wrapped-installer/build" file="${wirk3.home}/wrapper/${java.installer}"/>
33 <copy tofile="${basedir}/wrapped-installer/build/greenstone3.jar" file="${basedir}/installer/greenstone-${version}-win32.jar"/>
34 <copy todir="${basedir}/wrapped-installer/build" file="${basedir}/launcher/launch-installer.exe"/>
35
36 <!-- substitute in the real java installer filename -->
37 <rsr file="${basedir}/wrapped-installer/build/wrapper.rc" pattern="@java.installer@" replacement="${java.installer}"/>
38 <rsr file="${basedir}/wrapped-installer/build/wrapper-with-jre.rc" pattern="@java.installer@" replacement="${java.installer}"/>
39 <rsr file="${basedir}/wrapped-installer/build/wrapper.cpp" pattern="@java.installer@" replacement="${java.installer}"/>
40
41
42 </if>
43 </target>
44
45 <target name="compile-wrapper">
46 <if><bool><istrue value="${execute}"/></bool>
47
48 <echo>Compiling the resources</echo>
49 <exec executable="rc" dir="${basedir}/wrapped-installer/build">
50 <arg line="wrapper.rc"/>
51 </exec>
52 <exec executable="rc" dir="${basedir}/wrapped-installer/build">
53 <arg line="wrapper-with-jre.rc"/>
54 </exec>
55
56
57 <echo>Compiling the wrapper</echo>
58 <exec executable="cl" dir="${basedir}/wrapped-installer/build">
59 <arg line="/c -GX wrapper.cpp /out:wrapper.obj"/>
60 </exec>
61
62 <echo>Linking</echo>
63 <exec executable="link" dir="${basedir}/wrapped-installer/build">
64 <arg line="/OUT:..\greenstone-${version}-win32.exe wrapper.obj wrapper.res"/>
65 </exec>
66 <exec executable="link" dir="${basedir}/wrapped-installer/build">
67 <arg line="/OUT:..\greenstone-${version}-win32-with-jre.exe wrapper.obj wrapper-with-jre.res"/>
68 </exec>
69 </if>
70 </target>
71
72 <target name="clean-up-after-wrapping">
73 <if><bool><istrue value="${execute}"/></bool>
74 <delete dir="${basedir}/wrapped-installer/build"/>
75 </if>
76 </target>
77
78
79
80</project>
Note: See TracBrowser for help on using the repository browser.