-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.xml
144 lines (123 loc) · 4.85 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<?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 2021 Radiological Society of North America"/>
<path id="classpath">
<pathelement location="${libraries}/libraries/dcm4che.jar"/>
<pathelement location="${libraries}/libraries/log4j.jar"/>
<pathelement location="${libraries}/libraries/CTP.jar"/>
<pathelement location="${libraries}/libraries/util.jar"/>
</path>
<target name="init">
<echo message="=================================================="/>
<echo message="Building ${ant.project.name}"/>
<echo message="=================================================="/>
<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}/libraries">
<fileset dir="${ctp}/libraries">
<include name="CTP.jar"/>
<include name="dcm4che.jar"/>
<include name="log4j.jar"/>
<include name="util.jar"/>
<include name="slf4j-api-1.6.1.jar"/>
<include name="slf4j-log4j12-1.6.1.jar"/>
</fileset>
</copy>
<copy overwrite="true" todir="${libraries}/imageio">
<fileset dir="${ctp}/libraries/imageio">
<include name="**"/>
</fileset>
</copy>
</target>
<target name="getScriptFiles">
<copy overwrite="true" todir="${libraries}">
<fileset dir="${ctp}/source/files/scripts">
<include name="DicomPixelAnonymizer.script"/>
</fileset>
<globmapper from="DicomPixelAnonymizer.script" to="dicom-pixel-anonymizer.script"/>
</copy>
</target>
<target name="dicomanonymizertool" depends="init, getLibraryJars, getScriptFiles">
<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=
"libraries/dcm4che.jar
libraries/log4j.jar
libraries/CTP.jar
libraries/util.jar
libraries/slf4j-api-1.6.1.jar
libraries/slf4j-log4j12-1.6.1.jar
imageio/clibwrapper_jiio-1.2-pre-dr-b04.jar
imageio/dcm4che-imageio-rle-2.0.25.jar
imageio/jai_imageio-1.2-pre-dr-b04.jar
imageio/pixelmed_codec.jar
imageio/pixelmed_imageio.jar
imageio/twelvemonkeys-common-image-3.6-SNAPSHOT.jar
imageio/twelvemonkeys-common-io-3.6-SNAPSHOT.jar
imageio/twelvemonkeys-common-lang-3.6-SNAPSHOT.jar
imageio/twelvemonkeys-imageio-core-3.6-SNAPSHOT.jar
imageio/twelvemonkeys-imageio-jpeg-3.6-SNAPSHOT.jar
imageio/twelvemonkeys-imageio-metadata-3.6-SNAPSHOT.jar
libraries/extensions1.jar
libraries/extensions2.jar
libraries/extensions3.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>