-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathbuild.xml
161 lines (146 loc) · 8.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project name="DCP Setup Maker - build" default="compile" basedir=".">
<!-- ANT 1.7 is required -->
<description>
DevComPack Setup Maker Ant build file.
Continous Integration online at https://travis-ci.org/DevComPack/setupmaker
</description>
<!-- global properties for build -->
<property name="res" value="${basedir}/src/resources" />
<loadproperties srcfile="${res}/app.properties" />
<property name="src" value="${basedir}/src/main/java"/>
<property name="build" value="${basedir}/bin"/>
<property name="lib" location="${basedir}/lib"/>
<property name="target" location="${basedir}/target"/>
<property name="java.source" value="${jdk.version}"/>
<property name="java.target" value="${jdk.version}"/>
<property name="exe_name" value="dcpsetupmaker.exe"/>
<property name="jar_name" value="DCP-SNAPSHOT.jar"/>
<property name="jar_name.out" value="dcpsetupmaker.jar"/>
<property name="jar_file" value="${basedir}/${jar_name}"/>
<!-- classpath elements -->
<path id="master.classpath">
<pathelement location="${build}"/>
<pathelement location="${res}"/>
<pathelement location="${lib}/truezip-samples-${truezip.version}-jar-with-dependencies.jar"/>
<pathelement location="${lib}/ant/ant.jar"/>
<pathelement location="${lib}/ant/ant-launcher.jar"/>
<pathelement location="${lib}/ant/ant-contrib.jar"/>
<pathelement location="${lib}/ant/bcel-5.2.jar"/>
<pathelement location="${lib}/stax2-api-3.1.1.jar"/>
<pathelement location="${lib}/staxmate-2.2.0.jar"/>
<pathelement location="${lib}/woodstox-core-asl-4.1.5.jar"/>
<pathelement location="${lib}/izpack/standalone-compiler.jar"/>
<pathelement location="${lib}/json/json-simple-1.1.1.jar"/>
<pathelement location="${lib}/web/jsch-0.1.50.jar"/>
<pathelement location="${lib}/pivot/${pivot.version}/pivot-charts.jar"/>
<pathelement location="${lib}/pivot/${pivot.version}/pivot-core.jar"/>
<pathelement location="${lib}/pivot/${pivot.version}/pivot-wtk.jar"/>
<pathelement location="${lib}/pivot/${pivot.version}/pivot-wtk-terra.jar"/>
<pathelement location="${lib}/commons-io-2.4.jar"/>
</path>
<classfileset id="reqdClasses" dir="${build}">
<root classname="com.dcp.sm.App"/>
</classfileset>
<!-- build targets -->
<target name="clean" description="clean environment for build">
<echo message="Clean start"/>
<delete dir="${build}"/>
<delete dir="${basedir}/res/ant"/>
<delete dir="${basedir}/res/bat"/>
<delete dir="${target}/lib"/>
<delete file="${basedir}/${jar_name}"/>
<delete file="${basedir}/install.xml"/>
<delete file="${basedir}/res/default-dir.txt"/>
<delete file="${target}/${jar_name}"/>
<delete file="${target}/${exe_name}"/>
<delete>
<fileset dir="${basedir}/res/xml" includes="*" excludes="RegistrySpec.xml" />
<fileset dir="${basedir}" includes="*.dcp"/>
</delete>
<echo message="Clean success"/>
</target>
<target name="init">
<mkdir dir="${build}"/>
<copy includeemptydirs="false" todir="${build}">
<fileset dir="${src}">
<exclude name="**/*.launch"/>
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="compile" depends="clean,init" description="compile source code to class files">
<echo message="Compile start"/>
<javac source="${java.source}" srcdir="${src}" target="${java.target}" destdir="${build}"
includeantruntime="false" debug="true" verbose="no" >
<classpath refid="master.classpath"/>
<compilerarg line="-encoding utf-8"/>
</javac>
<echo message="Compile success"/>
</target>
<target name="dist" depends="compile" description="create runnable jar file with bundled libs">
<echo message="Release build start"/>
<jar destfile="${jar_file}">
<manifest>
<attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
<attribute name="Rsrc-Main-Class" value="com.dcp.sm.App"/>
<attribute name="Class-Path" value="."/>
<attribute name="Rsrc-Class-Path" value="./ truezip-samples-${truezip.version}-jar-with-dependencies.jar ant.jar staxmate-2.2.0.jar stax2-api-3.1.1.jar woodstox-core-asl-4.1.5.jar compiler.jar installer.jar jakarta-regexp-1.3.jar ant-launcher.jar ant-apache-log4j.jar ant-apache-regexp.jar ant-contrib.jar izevent.jar standalone-compiler.jar uninstaller-ext.jar uninstaller.jar bsf.jar kunststoff.jar liquidlnf.jar looks.jar metouia.jar nimbus.jar substance.jar json-simple-1.1.1.jar jsch-0.1.50.jar pivot-charts.jar pivot-core.jar pivot-wtk.jar pivot-wtk-terra.jar commons-io-2.4.jar bcel-5.2.jar"/>
</manifest>
<zipfileset src="${lib}/jar-in-jar-loader.zip"/>
<zipfileset dir="${build}"/>
<zipfileset dir="${res}"/>
<zipfileset dir="${lib}" includes="truezip-samples-${truezip.version}-jar-with-dependencies.jar"/>
<zipfileset dir="${lib}/ant" includes="ant.jar"/>
<zipfileset dir="${lib}/ant" includes="ant-launcher.jar"/>
<zipfileset dir="${lib}/ant" includes="ant-contrib.jar"/>
<zipfileset dir="${lib}/ant" includes="bcel-5.2.jar"/>
<zipfileset dir="${lib}" includes="stax2-api-3.1.1.jar"/>
<zipfileset dir="${lib}" includes="staxmate-2.2.0.jar"/>
<zipfileset dir="${lib}" includes="woodstox-core-asl-4.1.5.jar"/>
<zipfileset dir="${lib}" includes="commons-io-2.4.jar"/>
<zipfileset dir="${lib}/izpack" includes="standalone-compiler.jar"/>
<zipfileset dir="${lib}/json" includes="json-simple-1.1.1.jar"/>
<zipfileset dir="${lib}/web" includes="jsch-0.1.50.jar"/>
<zipfileset dir="${lib}/pivot/${pivot.version}" includes="pivot-charts.jar"/>
<zipfileset dir="${lib}/pivot/${pivot.version}" includes="pivot-core.jar"/>
<zipfileset dir="${lib}/pivot/${pivot.version}" includes="pivot-wtk.jar"/>
<zipfileset dir="${lib}/pivot/${pivot.version}" includes="pivot-wtk-terra.jar"/>
<zipfileset dir="${lib}" includes="commons-io-2.4.jar"/>
</jar>
<echo message="${jar_file} file created."/>
</target>
<target name="dist.win" depends="compile" description="create runnable jar file for windows">
<jar destfile="${jar_file}">
<manifest>
<attribute name="Main-Class" value="com.dcp.sm.App"/>
<attribute name="Class-Path" value=". lib/truezip-samples-${truezip.version}-jar-with-dependencies.jar lib/ant.jar lib/staxmate-2.2.0.jar lib/stax2-api-3.1.1.jar lib/woodstox-core-asl-4.1.5.jar lib/compiler.jar lib/installer.jar lib/jakarta-regexp-1.3.jar lib/ant-launcher.jar lib/ant-apache-log4j.jar lib/ant-apache-regexp.jar lib/ant-contrib.jar lib/izevent.jar lib/standalone-compiler.jar lib/uninstaller-ext.jar lib/uninstaller.jar lib/bsf.jar lib/kunststoff.jar lib/liquidlnf.jar lib/looks.jar lib/metouia.jar lib/nimbus.jar lib/substance.jar lib/json-simple-1.1.1.jar lib/jsch-0.1.50.jar lib/pivot-charts.jar lib/pivot-core.jar lib/pivot-wtk.jar lib/pivot-wtk-terra.jar lib/commons-io-2.4.jar lib/bcel-5.2.jar"/>
</manifest>
<fileset refid="reqdClasses"/>
<zipfileset dir="${build}"/>
<zipfileset dir="${res}"/>
</jar>
<mkdir dir="${target}/lib"/>
<copy file="${lib}/truezip-samples-${truezip.version}-jar-with-dependencies.jar" todir="${target}/lib"/>
<copy file="${lib}/ant/ant.jar" todir="${target}/lib"/>
<copy file="${lib}/ant/ant-launcher.jar" todir="${target}/lib"/>
<copy file="${lib}/ant/ant-contrib.jar" todir="${target}/lib"/>
<copy file="${lib}/ant/bcel-5.2.jar" todir="${target}/lib"/>
<copy file="${lib}/stax2-api-3.1.1.jar" todir="${target}/lib"/>
<copy file="${lib}/staxmate-2.2.0.jar" todir="${target}/lib"/>
<copy file="${lib}/woodstox-core-asl-4.1.5.jar" todir="${target}/lib"/>
<copy file="${lib}/izpack/standalone-compiler.jar" todir="${target}/lib"/>
<copy file="${lib}/json/json-simple-1.1.1.jar" todir="${target}/lib"/>
<copy file="${lib}/web/jsch-0.1.50.jar" todir="${target}/lib"/>
<copy file="${lib}/pivot/${pivot.version}/pivot-charts.jar" todir="${target}/lib"/>
<copy file="${lib}/pivot/${pivot.version}/pivot-core.jar" todir="${target}/lib"/>
<copy file="${lib}/pivot/${pivot.version}/pivot-wtk.jar" todir="${target}/lib"/>
<copy file="${lib}/pivot/${pivot.version}/pivot-wtk-terra.jar" todir="${target}/lib"/>
<copy file="${lib}/commons-io-2.4.jar" todir="${target}/lib"/>
<mkdir dir="${target}/lib/dcp"/>
<copy file="${lib}/dcp/dcp-resources.jar" todir="${target}/lib/dcp"/>
</target>
<target name="test" depends="clean" description="Test" >
<echo message="NOT IMPLEMENTED"/>
</target>
</project>