forked from johnperry/DicomAnonymizerTool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
106 lines (86 loc) · 3.55 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?xml version="1.0"?>
<project name="DicomAnonymizerTool" basedir="." default="all">
<property name="build" value="${basedir}/build"/>
<property name="products" value="${basedir}/products"/>
<property name="libraries" value="${basedir}/libraries"/>
<property name="documentation" value="${basedir}/documentation"/>
<property name="source" value="${basedir}/source"/>
<property name="java" value="${source}/java"/>
<property name="files" value="${source}/files"/>
<property name="installer" value="org/rsna/installer"/>
<property name="dicomanonymizertool" value="org/rsna/dicomanonymizertool"/>
<property name="ctp" value="/Development/CTP"/>
<property name="title" value="DicomAnonymizerTool"/>
<property name="copyright" value="Copyright 2017 Radiological Society of North America"/>
<path id="classpath">
<pathelement location="${libraries}/dcm4che.jar"/>
<pathelement location="${libraries}/log4j.jar"/>
<pathelement location="${libraries}/CTP.jar"/>
<pathelement location="${libraries}/util.jar"/>
</path>
<target name="init">
<tstamp>
<format property="today" pattern="yyyy.MM.dd"/>
<format property="now" pattern="HH:mm:ss z"/>
</tstamp>
<echo message="Time now ${now}"/>
<echo message="ant.java.version = ${ant.java.version}" />
<mkdir dir="${build}"/>
<mkdir dir="${products}"/>
</target>
<target name="clean">
<delete dir="${build}" failonerror="false"/>
<delete dir="${documentation}" failonerror="false"/>
</target>
<target name="getLibraryJars">
<copy overwrite="true" todir="${libraries}">
<fileset dir="${ctp}/libraries">
<include name="CTP.jar"/>
<include name="dcm4che.jar"/>
<include name="log4j.jar"/>
<include name="util.jar"/>
<include name="pixelmed_codec.jar"/>
<include name="dcm4che-imageio-rle-2.0.25.jar"/>
</fileset>
</copy>
</target>
<target name="dicomanonymizertool" depends="init, getLibraryJars">
<javac srcdir="${java}" destdir="${build}" optimize="on"
classpathref="classpath"
includeantruntime="false"
debug="true" debuglevel="lines,vars,source"/>
<jar destfile="${products}/DAT.jar">
<manifest>
<attribute name="Main-Class" value="org.rsna.dicomanonymizertool.DicomAnonymizerTool"/>
<attribute name="Class-Path" value="dcm4che.jar log4j.jar CTP.jar util.jar pixelmed_codec.jar dcm4che-imageio-rle-2.0.25.jar"/>
</manifest>
<fileset dir="${build}"
excludes="${dicomanonymizertool}/Installer**"/>
</jar>
<mkdir dir="${build}/DicomAnonymizerTool"/>
<copy overwrite="true" todir="${build}/DicomAnonymizerTool">
<fileset dir="${products}" includes="DAT.jar"/>
<fileset dir="${libraries}" includes="*.*"/>
<fileset dir="${files}" includes="*.*"/>
</copy>
<jar destfile="${products}/DicomAnonymizerTool-installer.jar">
<manifest>
<attribute name="Main-Class" value="org.rsna.dicomanonymizertool.Installer"/>
<attribute name="Implementation-Version" value="${today} @ ${now}"/>
<attribute name="Date" value="${today} at ${now}"/>
<attribute name="Description" value="Command line DICOM anonymizer"/>
</manifest>
<fileset dir="${build}"
includes="${dicomanonymizertool}/Installer** ${installer}/** DicomAnonymizerTool/**"/>
</jar>
<delete file="${products}/DAT.jar"/>
</target>
<target name="javadocs">
<mkdir dir="${documentation}"/>
<javadoc destdir="${documentation}" sourcepath="${java}" classpathref="classpath"
doctitle="${title}" windowtitle="${title}" bottom="${copyright}">
<package name="*"/>
</javadoc>
</target>
<target name="all" depends="clean, dicomanonymizertool, javadocs"/>
</project>