This repository has been archived by the owner on Oct 1, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
194 lines (187 loc) · 8.73 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- WARNING: Eclipse auto-generated file.
Any modifications will be overwritten.
To include a user specific buildfile here, simply create one in the same
directory with the processing instruction <?eclipse.ant.import?>
as the first entry and export the buildfile again. -->
<project basedir="." default="build" name="ENTDownloader">
<property environment="env" />
<property name="debuglevel" value=""/>
<property name="target" value="1.6"/>
<property name="source" value="1.6"/>
<!-- Numéro de version au format libre (affiché dans la boîte de dialogue A propos)-->
<property name="output.freeVersion" value="2.0.0"/>
<!-- Numéro de version au format x.x.x.x (inscrit dans l'executable)-->
<property name="output.version" value="2.0.0.0"/>
<!-- Dossier de destination du déploiement -->
<property name="output.publish.dir" location="${basedir}/../ENTDownloader_Publish"/>
<!-- Emplacement du logiciel Launch4J -->
<property name="launch4j.dir" location="C:\Program Files (x86)\launch4j" />
<!-- Emplacement du manuel -->
<!--<property name="output.manPath" location="${basedir}/../ENTDownloader.pdf" />-->
<!-- Utilisation du compilateur d'Eclipse -->
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
<taskdef name="launch4j"
classname="net.sf.launch4j.ant.Launch4jTask"
classpath="${launch4j.dir}/launch4j.jar
:${launch4j.dir}/lib/xstream.jar" />
<path id="ENTDownloader.classpath">
<pathelement location="bin"/>
<pathelement location="lib/pac"/>
<pathelement location="lib/commons-logging-1.1.1/"/>
<pathelement location="lib/httpclient-4.1.2/"/>
<pathelement location="lib/httpcore-4.1.2/"/>
<pathelement location="lib/httpmime-4.1.2/"/>
</path>
<target name="init">
<mkdir dir="bin"/>
<copy includeemptydirs="false" todir="bin">
<fileset dir="src">
<exclude name="**/*.launch"/>
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="bin"/>
</target>
<target depends="clean" name="cleanall"/>
<target depends="build-subprojects,build-project" name="build"/>
<target name="build-subprojects"/>
<target depends="init" name="build-project">
<echo message="${ant.project.name}: ${ant.file}"/>
<!-- Définition du numéro de version du logiciel-->
<replaceregexp match="(ProductInfo.version)=(.*)" replace="\1=${output.freeVersion}" byline="true" >
<fileset file="${basedir}/src/net/sf/entDownloader/ressources/configuration.properties" />
</replaceregexp>
<!-- Compilation -->
<javac debug="false" destdir="bin" source="${source}" target="${target}" encoding="UTF-8">
<src path="src"/>
<classpath refid="ENTDownloader.classpath"/>
</javac>
</target>
<target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/>
<target description="copy Eclipse compiler jars to ant lib directory" name="init-eclipse-compiler">
<copy todir="${ant.library.dir}">
<fileset dir="${eclipse.home}/plugins" includes="org.eclipse.jdt.core_*.jar"/>
</copy>
<unzip dest="${ant.library.dir}">
<patternset includes="jdtCompilerAdapter.jar"/>
<fileset dir="${eclipse.home}/plugins" includes="org.eclipse.jdt.core_*.jar"/>
</unzip>
</target>
<target description="compile project with Eclipse compiler" name="build-eclipse-compiler">
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
<antcall target="build"/>
</target>
<target name="ENTDownloader - GUI">
<java classname="net.sf.entDownloader.Main" failonerror="true" fork="yes">
<classpath refid="ENTDownloader.classpath"/>
</java>
</target>
<target name="ENTDownloader - Shell">
<java classname="net.sf.entDownloader.Main" failonerror="true" fork="yes">
<arg line="-nogui"/>
<classpath refid="ENTDownloader.classpath"/>
</java>
</target>
<target name="javadoc_for_website">
<property name="targetdir" value="webdoc"/>
<property name="include_path" value="${targetdir}/javadoc.php"/>
<antcall target="javadoc">
<param name="php" value="<?php include '${include_path}' ?>"/>
<param name="dest" value="${targetdir}"/>
</antcall>
<echo message="AddType application/x-httpd-php .html" file="${targetdir}/.htaccess"/>
</target>
<target name="javadoc">
<condition property="php" value="">
<not>
<isset property="php"/>
</not>
</condition>
<condition property="dest" value="doc">
<not>
<isset property="dest"/>
</not>
</condition>
<javadoc
access="public"
windowtitle="${ant.project.name} ${output.freeVersion}"
encoding="ISO-8859-1"
charset="UTF-8${php}"
docencoding="UTF-8"
noqualifier="java.*:javax.*"
header="<h4>${ant.project.name} ${output.freeVersion}</h4>"
author="true"
doctitle="${ant.project.name} ${output.freeVersion}"
destdir="${dest}"
nodeprecated="false"
nodeprecatedlist="false"
noindex="false"
nonavbar="false"
notree="false"
source="1.6"
sourcepath="src"
splitindex="true"
use="true"
version="true">
<packageset dir="src">
<include name="net/sf/entDownloader/**"/>
</packageset>
<classpath>
<fileset dir="${basedir}/lib/pac/"/>
<fileset dir="${basedir}/lib/commons-logging-1.1.1/"/>
<fileset dir="${basedir}/lib/httpclient-4.1.2/"/>
<fileset dir="${basedir}/lib/httpcore-4.1.2/"/>
<fileset dir="${basedir}/lib/httpmime-4.1.2/"/>
</classpath>
</javadoc>
</target>
<target name="deploy" depends="clean,build">
<property name="targetdir" value="${output.freeVersion}"/>
<property name="jarName" value="ENTDownloader.jar"/>
<property name="jarPath" value="${output.publish.dir}/${targetdir}/${jarName}"/>
<mkdir dir="${output.publish.dir}/${targetdir}"/>
<jar basedir="${basedir}/bin" jarfile="${jarPath}">
<manifest>
<attribute name="Manifest-Version" value="1.0" />
<attribute name="Main-Class" value="net.sf.entDownloader.Main"/>
</manifest>
<fileset dir="${basedir}/lib/pac/"/>
<fileset dir="${basedir}/lib/commons-logging-1.1.1/"/>
<fileset dir="${basedir}/lib/httpclient-4.1.2/"/>
<fileset dir="${basedir}/lib/httpcore-4.1.2/"/>
<fileset dir="${basedir}/lib/httpmime-4.1.2/"/>
</jar>
<launch4j configFile=".settings/launch4j_builtin.xml" outfile="${output.publish.dir}/${targetdir}/${ant.project.name}_Win.exe"
fileVersion="${output.version}" txtFileVersion="${output.freeVersion}"
productversion="${output.version}" txtproductversion="${output.freeVersion}"
jar="${jarPath}" />
<launch4j
configFile=".settings/launch4j_launcher.xml" outfile="${output.publish.dir}/${targetdir}/${ant.project.name}.exe"
fileVersion="${output.version}" txtFileVersion="${output.freeVersion}"
productversion="${output.version}" txtproductversion="${output.freeVersion}"
jarPath="${jarName}"
/>
<zip destfile="${output.publish.dir}/${targetdir}/${ant.project.name}_${output.freeVersion}_Win.zip">
<fileset file="${output.publish.dir}/${targetdir}/${ant.project.name}_Win.exe" erroronmissingdir="true"/>
<fileset file="license.txt" erroronmissingdir="true"/>
<fileset file="${output.manPath}" erroronmissingdir="true"/>
</zip>
<zip destfile="${output.publish.dir}/${targetdir}/${ant.project.name}_${output.freeVersion}.zip">
<fileset file="${output.publish.dir}/${targetdir}/${ant.project.name}.exe" erroronmissingdir="true"/>
<fileset file="license.txt" erroronmissingdir="true"/>
<fileset file="ENTDownloader.bin" erroronmissingdir="true"/>
<fileset file="${jarPath}" erroronmissingdir="true"/>
<fileset file="${output.manPath}" erroronmissingdir="true"/>
</zip>
<zip destfile="${output.publish.dir}/${targetdir}/${ant.project.name}_${output.freeVersion}_src.zip">
<fileset dir="${basedir}" excludes="bin/**, changelog.txt, ENTDownloaderDoxyfile, *.jardesc, jarManifest, build.xml, .git/**, .gitignore, doc/**, update_copyright.sh"/>
</zip>
<!--<zip destfile="${output.publish.dir}/${targetdir}/${ant.project.name}_${output.freeVersion}_doc.zip">
<fileset dir="${basedir}/doc"/>
<fileset file="license.txt" erroronmissingdir="true"/>
</zip>-->
</target>
</project>