-
Notifications
You must be signed in to change notification settings - Fork 15
/
build.xml
203 lines (187 loc) · 7.6 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<?xml version="1.0" encoding="utf-8"?>
<!--
/* Copyright (C) 2003-2023 Patrick G. Durand
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<!-- ============================================================= -->
<project name="jGAF" default="makedistrib" basedir=".">
<property environment="env" />
<property name="compile.optimize" value="on" />
<property name="compile.debug" value="off" />
<property name="compile.deprecation" value="false" />
<property file="version.properties" />
<property name="src" value="${basedir}/src" />
<property name="jar" value="${basedir}/jar" />
<property name="conf" value="${basedir}/conf" />
<property name="lib" value="${basedir}/lib" />
<property name="doc" value="${basedir}/doc" />
<property name="distrib" value="${basedir}/distrib" />
<property name="Dsrc" value="${distrib}/src" />
<property name="Dbin" value="${distrib}/bin" />
<property name="Dconf" value="${distrib}/conf" />
<property name="Dlib" value="${distrib}/lib" />
<property name="Ddoc" value="${distrib}/doc" />
<property name="Dex" value="${distrib}/examples/src" />
<property name="doc.api" value="${Ddoc}/api" />
<property name="appname" value="${lib.name}-${lib.version}" />
<property name="appjar" value="${appname}.jar" />
<property name="appzip" value="${appname}.zip" />
<property name="obfappjar" value="${appname}_obf.jar" />
<property name="obfuscationlog" value="${distrib}/obflog.xml"/>
<property name="rootpkg" value="com.plealog"/>
<property name="main.class" value="com.plealog.genericapp.ui.starter.EZMain"/>
<path id="class.path">
<pathelement path="${classpath}" />
<pathelement location="${lib}" />
</path>
<path id="distribClass.path">
<pathelement location="${distrib}/lib" />
</path>
<!--
<property name="yguard.jar" value="${basedir}/../yguard-2.5.2/lib/yguard.jar"/>
<taskdef name="obfuscate"
classname="com.yworks.yguard.YGuardTask"
classpath="${yguard.jar}"/>
-->
<!-- ============================================================= -->
<target name="help">
<echo>This is the Ant's project file to manage genapp.</echo>
<echo />
<echo>Available targets are:</echo>
<echo> makedistrib: compile and make release JAR of the DocViewer system.</echo>
<echo />
</target>
<!-- use this Target to prepare the public distrib zipball -->
<target name="makedistrib">
<!-- Prepare the distrib directory tree -->
<delete dir="${distrib}" />
<delete file="${appzip}"/>
<mkdir dir="${Dsrc}" />
<mkdir dir="${Dconf}" />
<mkdir dir="${Dlib}" />
<mkdir dir="${Dex}" />
<mkdir dir="${Ddoc}/api" />
<!-- Copy Java source code files that make the Full Edition (Full) -->
<copy todir="${Dsrc}">
<fileset dir="${src}">
<exclude name="com/plealog/genericapp/protection/local/**" />
<exclude name="**/*Test*" />
<exclude name="**/*test*" />
<exclude name="cvs/**" />
</fileset>
</copy>
<copy todir="${Dsrc}">
<fileset dir="${src}">
<include name="com/plealog/genericapp/protection/distrib/HStringUtils.java" />
</fileset>
</copy>
<!-- Compile source code ready for distribution-->
<javac srcdir="${Dsrc}" destdir="${Dlib}" classpathref="distribClass.path" debug="${compile.debug}"
optimize="${compile.optimize}" deprecation="${compile.deprecation}">
</javac>
<!-- Copy resources for the Full Edition (Full) -->
<copy todir="${Dlib}">
<fileset dir="${src}">
<include name="**/*.png" />
<include name="**/*.gif" />
<include name="**/*.dsc" />
<include name="**/*.config" />
<include name="**/*.properties" />
</fileset>
</copy>
<copy file="${basedir}/license.txt" todir="${Dlib}"/>
<!-- Make the Jar for the full application -->
<jar destfile="${Dbin}/${appjar}">
<fileset dir="${Dlib}" />
<manifest>
<attribute name="Implementation-Vendor" value="Plealog"/>
<attribute name="Implementation-Title" value="Generic Application"/>
<attribute name="Implementation-Version" value="${lib.version}"/>
<attribute name="Main-Class" value="${main.class}"/>
</manifest>
</jar>
<!-- antcall target="mask" />
<delete file="${Dbin}/${appjar}"/>
<move file="${Dbin}/${obfappjar}" tofile="${Dbin}/${appjar}"/ -->
</target>
<target name="prepareTuto" depends="makedistrib">
<delete dir="${Dsrc}" />
<delete dir="${Dlib}" />
<copy todir="${Dex}">
<fileset dir="${basedir}/../GAF - Tutorial/src"/>
</copy>
<copy todir="${Dconf}">
<fileset dir="${basedir}/../GAF - Tutorial/conf"/>
</copy>
<copy file="${basedir}/license.txt" todir="${distrib}"/>
<copy file="${basedir}/README.md" todir="${distrib}"/>
<zip destfile="${appzip}" basedir="${distrib}"/>
</target>
<!-- =================================================================== -->
<!-- target to create JavaDoc -->
<!-- =================================================================== -->
<target name="jdoc">
<delete dir="${doc.api}" />
<mkdir dir="${doc.api}" />
<javadoc
packagenames="com.plealog.genericapp.api,com.plealog.genericapp.api.configuration,com.plealog.genericapp.api.file,com.plealog.genericapp.api.log,com.plealog.genericapp.api.protection,com.plealog.genericapp.ui.menu,com.plealog.prefs4j.api,com.plealog.prefs4j.ui,com.plealog.wizard.model,com.plealog.wizard.ui"
excludepackagenames="com.plealog.genericapp.api.test"
Overview="${src}/overview.html"
Private="false"
Splitindex="true"
Windowtitle="Java Generic Application API - ${lib.version}"
author="true"
classpathref="class.path"
destdir="${doc.api}"
maxmemory="256M"
sourcepath="${src}"
version="true">
<bottom>
<![CDATA[<a href="http://www.plealog.com">Plealog Software</a> - 2003-2017]]>
</bottom>
<header>
<![CDATA[Java Generic Application API - ${lib.version}]]></header>
<link href="https://docs.oracle.com/javase/7/docs/api/"/>
</javadoc>
</target>
<!-- This is used to illustrate the use of YGuard: obfuscate the whole bytecode but the public API -->
<!--
<target name="mask" depends="" >
<obfuscate>
<inoutpair in="${Dbin}/${appjar}" out="${Dbin}/${obfappjar}"/>
<rename mainclass="${main.class}"
logfile="${obfuscationlog}"
conservemanifest="true"
replaceClassNameStrings="false">
<keep>
<class classes="protected" methods="protected" fields="protected">
<patternset>
<include name="com.plealog.genericapp.api.*"/>
<include name="com.plealog.genericapp.api.protection.*"/>
<include name="com.plealog.genericapp.api.configuration.*"/>
<include name="com.plealog.genericapp.api.file.*"/>
<include name="com.plealog.genericapp.api.log.*"/>
<include name="com.plealog.genericapp.ui.apple.EZApple*"/>
<include name="com.plealog.genericapp.ui.menu.*"/>
<include name="com.plealog.prefs4j.api.*"/>
<include name="com.plealog.prefs4j.ui.*"/>
</patternset>
</class>
</keep>
</rename>
</obfuscate>
</target>
-->
</project>