forked from asad/SMSD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-smsd.xml
111 lines (95 loc) · 4.34 KB
/
build-smsd.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
<?xml version="1.0" encoding="UTF-8"?>
<project name="SMSDcmd" default="package-for-store" basedir=".">
<property file="build.properties"/>
<property name="cdk_src_dir" value="${CDK_DIR}/src/main"/>
<property name="cdk_bin_dir" value="${CDK_DIR}/build"/>
<property name="module_list" value="core,standard,annotation,io,data,dict,fingerprint,interfaces,pdb,sdg,isomorphism,valencycheck,smarts,signature,smiles,extra,render,ioformats"/>
<target name="test">
<script language="groovy">
<classpath>
<fileset dir="lib" includes="*.jar"/>
</classpath>
for (m in module_list.split(",")) { println(m) }
</script>
</target>
<target name="cdk-ant" description="build cdk">
<echo>"Building CDK"</echo>
<property name="build" value="${CDK_DIR}/build"/>
<property name="build.src" value="${CDK_DIR}/build/src"/>
<property name="src" value="${CDK_DIR}/src"/>
<ant target="dist-all" dir="${CDK_DIR}">
</ant>
</target>
<target name="compile-smsd" depends="cdk-ant">
<!--
<target name="compile-smsd">
-->
<mkdir dir="build"/>
<!-- Copy the CDK classes -->
<script language="groovy">
<classpath>
<fileset dir="lib" includes="*.jar"/>
</classpath>
dir = project.getProperty("cdk_bin_dir");
for (m in module_list.split(",")) {
copy = SMSDcmd.createTask("copy");
copy.setTodir(new java.io.File("build"));
fs = project.createDataType("fileset");
fs.setDir(new java.io.File(dir, m));
copy.addFileset(fs);
copy.perform();
}
</script>
<copy todir="build/org/openscience/cdk/config/data">
<fileset dir="${cdk_src_dir}/org/openscience/cdk/config/data" includes="**"/>
</copy>
<copy todir="build/org/openscience/cdk/dict/data">
<fileset dir="${cdk_src_dir}/org/openscience/cdk/dict/data" includes="**"/>
</copy>
<copy todir="build/org/openscience/cdk/layout/templates">
<fileset dir="${cdk_src_dir}/org/openscience/cdk/layout/templates" includes="**"/>
</copy>
<copy todir="build/cmd/pdb" file="src/cmd/pdb/bond_dictionary.txt"/>
<!-- Compile the SMSD classes -->
<javac srcdir="src" destdir="build" includeantruntime="false">
<classpath>
<pathelement path="build"/>
<pathelement path="lib/directgraphics.jar"/>
<pathelement path="lib/commons-cli-1.2/commons-cli-1.2.jar"/>
<pathelement path="${CDK_DIR}/jar/signatures-1.1.jar"/>
</classpath>
</javac>
</target>
<target name="package-for-store" depends="compile-smsd">
<property name="store.jar.name" value="SMSD"/>
<property name="store.dir" value="."/>
<tstamp>
<format property="TODAY" pattern="yyyyMMdd" />
</tstamp>
<property name="store.jar" value="${store.jar.name}${TODAY}.jar"/>
<property name="store.jar.path" value="${store.dir}/${store.jar}"/>
<jar destfile="${store.jar.path}" filesetmanifest="skip">
<fileset dir="build" includes="**"/>
<zipgroupfileset dir="lib" includes="*.jar"/>
<zipgroupfileset file="lib/commons-cli-1.2/commons-cli-1.2.jar"/>
<zipgroupfileset file="${CDK_DIR}/jar/signatures-1.*.jar"/>
<zipgroupfileset file="${CDK_DIR}/jar/cmlxom-*.jar"/>
<zipgroupfileset file="${CDK_DIR}/jar/jgrapht-*.jar"/>
<zipgroupfileset file="${CDK_DIR}/jar/vecmath*.jar"/>
<manifest>
<attribute name="Main-Class" value="gui.SMSDFrame"/>
</manifest>
</jar>
<echo file="SMSD">java -Xms500M -Xmx512M -cp ${store.jar} cmd.SMSDcmd $@</echo>
<chmod perm="a+x" file="SMSD"/>
<echo file="SMSD.bat">java -Xms500M -Xmx512M -cp ${store.jar} cmd.SMSDcmd %*</echo>
<chmod perm="a+x" file="SMSD.bat"/>
<zip destfile="${store.jar.name}${TODAY}.zip">
<filelist files="${store.jar.path},SMSD,SMSD.bat"/>
<fileset dir="docs"/>
</zip>
</target>
<target name="clean" description="remove build dir">
<delete dir="build"/>
</target>
</project>