/
build.xml
92 lines (77 loc) · 2.76 KB
/
build.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
<project name="GalleryRemote" default="compile" basedir=".">
<description>
A part of the Gallery project
</description>
<!-- set global properties for this build -->
<property name="src" location="."/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init"
description="compile the source" >
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}"
includes="com/**,HTTPClient/**,edu/**" classpath="lib/JSX1.0.7.4.jar"
listfiles="on" debug="on" source="1.3" />
<!-- other files needed -->
<copy file="${src}/rar_about_gr1.png" todir="${build}" />
<copy file="${src}/rar_icon_32.gif" todir="${build}" />
<copy file="${src}/rar_icon_16.gif" todir="${build}" />
<copy file="${src}/com/gallery/GalleryRemote/prefs/panes.properties" todir="${build}/com/gallery/GalleryRemote/prefs" />
</target>
<target name="run" depends="compile"
description="compile then run" >
<java classname="com.gallery.GalleryRemote.GalleryRemote" fork="true">
<classpath>
<pathelement location="lib/JSX1.0.7.4.jar"/>
<pathelement path="${build}"/>
<pathelement path="img"/>
</classpath>
</java>
</target>
<target name="jar" depends="clean,compile"
description="create a jar of the source">
<jar destfile="GalleryRemote.jar" basedir="${build}" />
</target>
<target name="zip" depends="jar"
description="create a zip patch of the Gallery Remote install">
<zip destfile="gallery_remote.zip">
<fileset dir="." includes="defaults.properties" />
<fileset dir="." includes="ChangeLog" />
<fileset dir="." includes="GalleryRemote.jar" />
<fileset dir="." includes="ReadMe.html" />
<zipfileset dir="./lib" includes="JSX1.0.7.4.jar" prefix="lib"/>
<zipfileset dir="./img" includes="*" prefix="img"/>
</zip>
</target>
<target name="testWin">
<condition property="onWin">
<os family="windows" />
</condition>
</target>
<target name="imReg" depends="init,testWin" if="onWin"
description="import registry stuff for ImageMagick">
<pathconvert dirsep="\\" property="impath">
<path>
<pathelement path="imagemagick/win32" />
</path>
</pathconvert>
<filter token="PATH" value="${impath}" />
<copy file="magick.reg" toFile="myMagick.reg" filtering="true" overwrite="true"/>
<exec executable="regedit">
<arg value="/s" />
<arg value="myMagick.reg" />
</exec>
</target>
<target name="clean"
description="clean up" >
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>