-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.xml
61 lines (50 loc) · 2.5 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
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="Fiji_Plugins" default="main-fiji" basedir=".">
<description>
Ant-Builder for Fiji_Plugins, using Fiji build system
</description>
<property name="builder.name" value="the Fiji team" />
<property name="ijDir" location="${basedir}/../.." />
<property name="pluginsDirName" value="plugins" />
<property name="pluginsDir" location="${ijDir}/${pluginsDirName}" />
<property name="srcPluginsDir" location="${ijDir}/src-plugins" />
<property name="stagedPluginsDir" location="${ijDir}/staged-plugins" />
<property name="fijiConfigFile" value="${ant.project.name}.config" />
<property name="pluginConfigFile" value="plugins.config" />
<property name="jarName" value="${ant.project.name}.jar" />
<property name="jarFile" location="${pluginsDir}/${jarName}" />
<property name="src" location="src" />
<property name="build" location="bin" />
<property name="dist" location="dist" />
<property name="ls" value="${line.separator}" />
<property name="configFileContent" value='# ${ant.project.name}, builder ${builder.name} ${ls}${menuLocation}, "${menuName}", ${ant.project.name}${ls}# Automatically generated by ${ant.version}, with build file: ${ant.file} ${ls}' />
<target name="main-fiji" depends="make-plugins.config" description="Main target, use Fiji build system.">
<echo message="Generating jar file with Fiji build system" />
<apply executable="${ijDir}/ImageJ" dir="${ijDir}" relative="true" >
<arg value="--build" />
<string value="${pluginsDirName}/${jarName}" />
</apply>
</target>
<target name="make-plugins.config">
<copy file="${basedir}/${fijiConfigFile}" toDir="${stagedPluginsDir}"/>
</target>
<target name="clean-fiji" description="Delete jar files and config files from Fiji tree.">
<delete file="${jarFile}" />
<delete file="${stagedPluginsDir}/${fijiConfigFile}" />
</target>
<target name="dist" description="Generate the jar of this plugin, for use out of Fiji.">
<echo message="Building the .jar file." />
<jar jarfile="${ant.project.name}.jar">
<fileset dir="." includes="${pluginConfigFile}" />
<fileset dir="${build}" includes="**/*.*" />
<manifest>
<attribute name="Built-By" value="${builder.name}"/>
</manifest>
</jar>
</target>
<target name="install" depends="dist" description="Build the ImageJ jar and put it in the plugin dir." >
<copy toDir="${pluginsDir}" >
<filelist dir="${basedir}" files="${ant.project.name}.jar" />
</copy>
</target>
</project>