1 | <?xml version="1.0"?>
|
---|
2 | <!--
|
---|
3 |
|
---|
4 | This Ant script is used to package parts of the demo app to create an installer
|
---|
5 |
|
---|
6 | the nonextract target shows an example of creating a self extracting jar for the demo app
|
---|
7 |
|
---|
8 | run with ...
|
---|
9 |
|
---|
10 | ant -buildfile build-demo.xml
|
---|
11 |
|
---|
12 | -->
|
---|
13 | <project name="Create Demo Installer for Release Notes Extension" default="nonextract" basedir=".">
|
---|
14 |
|
---|
15 | <!-- Default location in installed tree -->
|
---|
16 | <property name="installDir" location="../../../.."/>
|
---|
17 |
|
---|
18 | <path id="taskdef.cp">
|
---|
19 | <fileset dir="${installDir}/lib">
|
---|
20 | <include name="ant-installer-ext.jar"/>
|
---|
21 | <include name="ant-installer.jar"/>
|
---|
22 | </fileset>
|
---|
23 | </path>
|
---|
24 |
|
---|
25 | <taskdef
|
---|
26 | name="installer"
|
---|
27 | classname="org.tp23.antinstaller.taskdefs.Installer"
|
---|
28 | classpathref="taskdef.cp"/>
|
---|
29 | <property name="demo.dir" value="${installDir}/demo"/>
|
---|
30 |
|
---|
31 |
|
---|
32 |
|
---|
33 | <target name="nonextract">
|
---|
34 | <mkdir dir="../artifacts/nonextract"/>
|
---|
35 | <!--unjar dest="./nonextract">
|
---|
36 | <fileset dir="installlib">
|
---|
37 | <include name="*.jar">
|
---|
38 | </include>
|
---|
39 | </fileset>
|
---|
40 | </unjar-->
|
---|
41 | <copy todir="../artifacts/nonextract" overwrite="true">
|
---|
42 | <fileset dir="${demo.dir}/installclasspath">
|
---|
43 | <include name="resources/*"/>
|
---|
44 | </fileset>
|
---|
45 | </copy>
|
---|
46 | <copy todir="../artifacts/nonextract" overwrite="true">
|
---|
47 | <fileset dir="../installer/">
|
---|
48 | <include name="build.xml"/>
|
---|
49 | <include name="antinstall-config.xml"/>
|
---|
50 | <include name="release-notes.txt"/>
|
---|
51 | </fileset>
|
---|
52 | <fileset dir="${demo.dir}/artifacts">
|
---|
53 | <include name="installpack.zip"/>
|
---|
54 | </fileset>
|
---|
55 | </copy>
|
---|
56 | <mkdir dir="../artifacts/nonextract/org/tp23/antinstaller/runtime/exe"/>
|
---|
57 | <copy todir="../artifacts/nonextract/org/tp23/antinstaller/runtime/exe" overwrite="true">
|
---|
58 | <fileset dir="../installer/">
|
---|
59 | <include name="nonextractor.fconfig"/>
|
---|
60 | </fileset>
|
---|
61 | </copy>
|
---|
62 |
|
---|
63 |
|
---|
64 | <echo message="Building DEMO NON-EXTRACT"/>
|
---|
65 | <installer file="../artifacts/releasenotes.jar" compress="true"
|
---|
66 | extractType="NonExtractor"
|
---|
67 | installConfig="../installer/antinstall-config.xml"
|
---|
68 | buildFile="../installer/build.xml"
|
---|
69 | antInstallLib="${installDir}/lib"
|
---|
70 | antLib="${installDir}/antlib"
|
---|
71 | validateConfig="true"
|
---|
72 | failOnError="true"
|
---|
73 | icons="bluecurve">
|
---|
74 | <fileset dir="${demo.dir}" includes="installpack.zip"/>
|
---|
75 | <fileset dir="${demo.dir}/installclasspath">
|
---|
76 | <include name="resources/*"/>
|
---|
77 | </fileset>
|
---|
78 | <zipfileset src="${installDir}/lib/ant-installer-ext.jar"/>
|
---|
79 | </installer>
|
---|
80 | <jar file="../artifacts/releasenotes.jar" compress="false" update="true">
|
---|
81 | <fileset dir="../artifacts/nonextract">
|
---|
82 | <include name="**/*"/>
|
---|
83 | </fileset>
|
---|
84 | </jar>
|
---|
85 |
|
---|
86 | <!--jar file="../artifacts/nonextractpack.jar" compress="false">
|
---|
87 | <manifest>
|
---|
88 | <attribute name="Manifest-Version" value="1.0"/>
|
---|
89 | <attribute name="Main-Class" value="org.tp23.antinstaller.selfextract.NonExtractor"/>
|
---|
90 | </manifest>
|
---|
91 | <zipfileset src="${installDir}/lib/ant-installer.jar"/>
|
---|
92 | <zipfileset src="${installDir}/lib/ant-installer-ext.jar"/>
|
---|
93 | <zipfileset src="${installDir}/antlib/ant.jar"/>
|
---|
94 | <zipfileset src="${installDir}/antlib/ant-launcher.jar"/>
|
---|
95 | </jar>
|
---|
96 | <jar file="../artifacts/nonextractpack.jar" compress="false" update="true">
|
---|
97 | <fileset dir="../artifacts/nonextract">
|
---|
98 | <include name="**/*"/>
|
---|
99 | </fileset>
|
---|
100 | </jar-->
|
---|
101 | </target>
|
---|
102 |
|
---|
103 |
|
---|
104 | <!-- N.B.
|
---|
105 | this target does nothing in the deployed version
|
---|
106 | and exists for preparing the files to deploy to sourceforge
|
---|
107 | -->
|
---|
108 | <target name="sfbuild">
|
---|
109 | <zip file="./installpack.zip">
|
---|
110 | <zipfileset dir=".">
|
---|
111 | <include name="bin/**/*"/>
|
---|
112 | <include name="classes/**/*"/>
|
---|
113 | <include name="config/**/*"/>
|
---|
114 | <include name="doc/**/*"/>
|
---|
115 | <include name="src/**/*"/>
|
---|
116 | <include name="README.txt"/>
|
---|
117 | </zipfileset>
|
---|
118 | </zip>
|
---|
119 | </target>
|
---|
120 | </project>
|
---|