forked from ArtOfIllusion/SPManager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SPManager.xml
119 lines (90 loc) · 4.34 KB
/
SPManager.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?xml version="1.0"?>
<project name="SPManager" default="dist" basedir=".">
<!-- set this to point to an appropriate ArtOfIllusion.jar -->
<property name="aoijar" value="ArtOfIllusion.jar" />
<!-- set this to point to an appropriate ArtOfIllusion/lib folder-->
<property name="lib" value="lib" />
<!-- get the current build properties -->
<property file="SPManager/SPManager-build.props" />
<!-- set global properties for this build -->
<property name="package" value="SPManager" />
<property name="src" value="SPManager/src" />
<property name="build" value="SPManager/build" />
<property name="docs" value="SPManager/docs" />
<property name="postsrc" value="PostInstall/src" />
<property name="postbuild" value="PostInstall/build" />
<property name="postdocs" value="PostInstall/docs" />
<property name="dist" value="Plugins" />
<property name="src-package" value="SPManager-src-${curr-version}" />
<filelist id="jarlibs" dir="."
files="${aoijar}, ${lib}/Buoy.jar, ${lib}/Buoyx.jar, ${lib}/beanshell.jar" />
<pathconvert refid="jarlibs" property="classpath" />
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}" />
<!-- Create the docs directory structure used by documentation -->
<mkdir dir="${docs}" />
<!-- Create the dist directory structure used by build -->
<mkdir dir="${dist}" />
<!-- Create the postbuild directory structure used by compile -->
<mkdir dir="${postbuild}" />
<!-- Create the postdocs directory structure used by documentation -->
<mkdir dir="${postdocs}" />
<!-- update the version number -->
<replace file="${src}/extensions.xml" >
<replacefilter token='version="${old-version}">'
value='version="${curr-version}">' />
<!-- **NOTE** token is literal string: {version} -->
<replacefilter token="{version}" value="${curr-version}" />
</replace>
<!-- update the version number -->
<replace file="${src}/artofillusion/spmanager/SPManagerFrame.java"
token='version = "${old-version}"'
value='version = "${curr-version}"' />
</target>
<target name="compile" depends="init">
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}" classpath="${classpath}" debug="on" target="1.5" source="1.5" />
<javac srcdir="${postsrc}" destdir="${postbuild}" classpath="${classpath}" debug="on" target="1.5" source="1.5" />
</target>
<target name="dist" depends="compile">
<jar jarfile="${dist}/SPManager.jar" basedir="${build}" manifest="${src}/MANIFEST.MF">
<!-- Only for update (ie prior to 2.5 final) packages
<fileset dir="${src}" includes="${package}.xml, plugins, *.properties, artofillusion/spmanager/icons/*" />
-->
<fileset dir="${src}" includes="extensions.xml *.properties, artofillusion/spmanager/icons/*" />
</jar>
<!-- Create the PostInstall jar file -->
<jar jarfile="${dist}/PostInstall.jar" basedir="${postbuild}" >
<fileset dir="${postsrc}" includes="extensions.xml, *.properties, plugins" />
<!-- <fileset dir="${src}" includes="*.properties" /> -->
</jar>
</target>
<target name="source">
<!-- create the source archives -->
<zip file="${src-package}.zip" >
<zipfileset prefix="${package}/src" dir="${src}" />
<zipfileset prefix="PostInstall/src" dir="${postsrc}" />
<zipfileset dir="." includes="${package}.xml" />
<zipfileset prefix="${package}" dir="${package}" includes="${package}-build.props" />
</zip>
<tar tarfile="${src-package}.tz" compression="gzip">
<tarfileset prefix="${package}/src" dir="${src}" />
<tarfileset prefix="PostInstall/src" dir="${postsrc}" />
<tarfileset dir="." includes="${package}.xml" />
<tarfileset prefix="${package}" dir="${package}" includes="${package}-build.props" />
</tar>
</target>
<target name="clean">
<!-- Delete the ${build} and ${docs} directory trees -->
<delete dir="${build}" />
<delete dir="${docs}" />
<!-- Delete the ${postbuild} and ${postdocs} directory trees -->
<delete dir="${postbuild}" />
<delete dir="${postdocs}" />
<delete file="${dist}/${package}.jar" />
<delete file="${dist}/PostInstall.jar" />
</target>
</project>