forked from syvaidya/openstego
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
255 lines (230 loc) · 13.8 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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<?xml version="1.0"?>
<!--
| Steganography utility to hide messages into cover files
| Author: Samir Vaidya (mailto:syvaidya@gmail.com)
| Copyright (c) 2007-2017 Samir Vaidya
-->
<project name="OpenStego" default="compile" basedir=".">
<property name="author.name" value="Samir Vaidya"/>
<property name="author.mail" value="syvaidya@gmail.com"/>
<property name="homepage.url" value="http://www.openstego.com"/>
<property name="package.ver" value="0.7.3"/>
<property name="jre.minVer" value="1.7.0"/>
<property name="jdk.docs.href" value="http://docs.oracle.com/javase/7/docs/api/"/>
<property name="jdk.docs.dir" value="E:/jdk-1.7.0/api"/>
<property name="src" value="./src"/>
<property name="build.classpath" value="${src}"/>
<property name="build.classesdir" value="./bin"/>
<property name="package" value="./package"/>
<property name="package.bin" value="openstego-${package.ver}"/>
<property name="package.src" value="openstego-src-${package.ver}"/>
<property name="package.deb" value="openstego-${package.ver}-1"/>
<property name="javadoc" value="./doc/api"/>
<tstamp>
<format property="time.changelog" pattern="EEE, dd MMM yyyy HH:mm:ss Z"/>
</tstamp>
<tstamp>
<format property="time.creation" pattern="yyyy-MM-dd"/>
</tstamp>
<tstamp>
<format property="time.year" pattern="yyyy"/>
</tstamp>
<path id="ant-deb-cp">
<fileset dir="./lib" includes="ant-deb-*.jar"/>
</path>
<taskdef resource="ant_deb_task.properties" classpathref="ant-deb-cp"/>
<path id="nsisant-cp">
<fileset dir="./lib" includes="nsisant-*.jar"/>
</path>
<taskdef name="nsis" classname="com.danielreese.nsisant.Task" classpathref="nsisant-cp"/>
<target name="init">
<mkdir dir="${build.classesdir}"/>
</target>
<target name="compile" depends="init" description="Compiles the source files">
<javac srcdir="${src}" destdir="${build.classesdir}" classpath="${build.classpath}" debug="true"
deprecation="on" debuglevel="lines,vars,source" source="7" target="7" includeantruntime="false">
<exclude name="com/openstego/desktop/plugin/dctlsb/**"/>
<exclude name="com/openstego/desktop/plugin/dwtkim/**"/>
<exclude name="com/openstego/desktop/plugin/dwtxie/**"/>
<exclude name="com/openstego/desktop/plugin/template/dct/**"/>
<exclude name="com/openstego/desktop/util/dct/**"/>
</javac>
<native2ascii encoding="UTF-8" src="${src}" includes="com/openstego/desktop/resource/**/*.*" dest="${build.classesdir}">
<exclude name="com/openstego/desktop/resource/DctLSB*"/>
<exclude name="com/openstego/desktop/resource/DCTPlugin*"/>
<exclude name="com/openstego/desktop/resource/DWTKim*"/>
<exclude name="com/openstego/desktop/resource/DWTXie*"/>
<exclude name="com/openstego/desktop/resource/*_ja.properties"/>
</native2ascii>
<replace dir="${build.classesdir}/com/openstego/desktop/resource">
<include name="**/*.properties"/>
<replacefilter token="@package.ver@" value="${package.ver}"/>
<replacefilter token="@author.name@" value="${author.name}"/>
<replacefilter token="@author.mail@" value="${author.mail}"/>
<replacefilter token="@homepage.url@" value="${homepage.url}"/>
<replacefilter token="@time.year@" value="${time.year}"/>
</replace>
<jar destfile="./lib/openstego.jar" manifest="./src/META-INF/MANIFEST.MF">
<fileset dir="${build.classesdir}"/>
<fileset dir="${src}">
<include name="image/*.png"/>
<include name="OpenStegoPlugins.internal"/>
<include name="**/*.xml"/>
</fileset>
</jar>
</target>
<target name="doc" description="Generates the JavaDoc API documentation">
<javadoc packagenames="com.openstego.desktop.*" sourcepath="${src}" destdir="${javadoc}" additionalparam="-Xdoclint:none"
excludepackagenames="com.openstego.desktop.plugin.*" windowtitle="${ant.project.name} API">
<doctitle><![CDATA[<h1>${ant.project.name} API Specification</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright © 2007-${time.year} ${author.name}. All Rights Reserved.</i>]]></bottom>
<link offline="true" href="${jdk.docs.href}" packagelistLoc="${jdk.docs.dir}"/>
</javadoc>
</target>
<target name="clean" description="Removes the in-process files">
<delete dir="${build.classesdir}"/>
<delete dir="${package}"/>
<delete dir="./doc"/>
<delete file="./lib/openstego.jar"/>
</target>
<target name="package" depends="package-bin,package-src,package-nsi,package-deb"
description="Generates the various binary and source packages for release">
</target>
<target name="package-bin" depends="compile" description="Generates the binary zipped package">
<mkdir dir="${package}/${package.bin}"/>
<copy todir="${package}/${package.bin}">
<fileset dir=".">
<include name="lib/openstego**"/>
<include name="openstego.bat"/>
<include name="openstego.sh"/>
<include name="LICENSE"/>
<include name="README"/>
<exclude name="**/.svn/**"/>
</fileset>
<fileset file="./src/image/openstego.ico"/>
</copy>
<replace file="${package}/${package.bin}/README">
<replacefilter token="@package.ver@" value="${package.ver}"/>
<replacefilter token="@author.name@" value="${author.name}"/>
<replacefilter token="@author.mail@" value="${author.mail}"/>
<replacefilter token="@homepage.url@" value="${homepage.url}"/>
<replacefilter token="@time.year@" value="${time.year}"/>
</replace>
<zip destfile="${package}/${package.bin}.zip">
<zipfileset dir="${package}" includes="${package.bin}/openstego.sh" filemode="755"/>
<zipfileset dir="${package}" includes="${package.bin}/**" excludes="${package.bin}/openstego.sh"/>
</zip>
</target>
<target name="package-src" depends="doc" description="Generates the sources zipped package">
<mkdir dir="${package}/${package.src}"/>
<copy todir="${package}/${package.src}">
<fileset dir=".">
<include name="src/**"/>
<include name="doc/**"/>
<include name="openstego.bat"/>
<include name="openstego.sh"/>
<include name="build.xml"/>
<include name="installer.nsi"/>
<include name="LICENSE"/>
<include name="README"/>
<exclude name="**/.svn/**"/>
<exclude name="src/com/openstego/desktop/plugin/dctlsb/**"/>
<exclude name="src/com/openstego/desktop/plugin/dwtkim/**"/>
<exclude name="src/com/openstego/desktop/plugin/dwtxie/**"/>
<exclude name="src/com/openstego/desktop/plugin/template/dct/**"/>
<exclude name="src/com/openstego/desktop/util/dct/**"/>
<exclude name="src/com/openstego/desktop/resource/DctLSB*"/>
<exclude name="src/com/openstego/desktop/resource/DCTPlugin*"/>
<exclude name="src/com/openstego/desktop/resource/DWTKim*"/>
<exclude name="src/com/openstego/desktop/resource/DWTXie*"/>
<exclude name="src/com/openstego/desktop/resource/*_ja.properties"/>
</fileset>
</copy>
<replace file="${package}/${package.src}/README">
<replacefilter token="@package.ver@" value="${package.ver}"/>
<replacefilter token="@author.name@" value="${author.name}"/>
<replacefilter token="@author.mail@" value="${author.mail}"/>
<replacefilter token="@homepage.url@" value="${homepage.url}"/>
<replacefilter token="@time.year@" value="${time.year}"/>
</replace>
<zip destfile="${package}/${package.src}.zip">
<zipfileset dir="${package}" includes="${package.src}/openstego.sh" filemode="755"/>
<zipfileset dir="${package}" includes="${package.src}/**" excludes="${package.src}/openstego.sh"/>
</zip>
</target>
<target name="package-nsi" depends="compile" description="Generates Windows installer">
<nsis script="installer.nsi" verbosity="2">
<define name="AppName" value="${ant.project.name}"/>
<define name="AppVersion" value="${package.ver}"/>
<define name="AppDir" value="${package}/${package.bin}"/>
<define name="RequiredJREVersion" value="${jre.minVer}"/>
</nsis>
</target>
<target name="package-deb" depends="compile" description="Generates Debian (Ubuntu) installer">
<mkdir dir="${package}/${package.deb}"/>
<copy file="./openstego.sh" tofile="${package}/${package.deb}/openstego"/>
<copy file="./src/image/OpenStegoIcon.png" tofile="${package}/${package.deb}/openstego.png"/>
<desktopentry
toFile="${package}/${package.deb}/openstego.desktop"
name="OpenStego"
comment="Hide secret data into innocuous files like images"
icon="/usr/share/openstego/openstego.png"
exec="/usr/share/openstego/openstego"
categories="Graphics;Java"/>
<echo file="${package}/${package.deb}/changelog.Debian"
append="false">OpenStego (${package.ver}-1) ; urgency=low
* Fixed EOL for shell scripts
* Fixed error where in some cases JPEG writing was failing
-- ${author.name} <${author.mail}> ${time.changelog}
</echo>
<gzip src="${package}/${package.deb}/changelog.Debian"
destfile="${package}/${package.deb}/changelog.Debian.gz"/>
<delete file="${package}/${package.deb}/changelog.Debian"/>
<echo file="${package}/${package.deb}/copyright"
append="false">This package was debianized by ${author.name} <${author.mail}> on
${time.creation}
It was downloaded from <http://www.openstego.com/>.
Upstream Author: ${author.name} <${author.mail}>
License:
Copyright (C) 2007-${time.year} ${author.name}
This file is part of OpenStego as available from
http://www.openstego.com. This file is free software;
you can redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software Foundation,
in version 2 as it comes in the "LICENSE" file of the OpenStego
distribution. OpenStego is distributed in the hope that it will
be useful, but WITHOUT ANY WARRANTY of any kind.
This applies to the complete sourcetree.
</echo>
<deb todir="${package}" package="openstego" section="graphics" architecture="i386"
depends="default-jre" priority="optional">
<version upstream="${package.ver}"/>
<maintainer name="${author.name}" email="${author.mail}"/>
<description synopsis="OpenStego: Modular steganography solution">OpenStego is a tool implemented in Java for generic steganography, with support for password-based encryption of the data. It supports plugins for various steganographic algorithms.
Using OpenStego, you can hide secret data within innocuous looking files like images.</description>
<tarfileset file="${package}/${package.deb}/openstego.desktop" prefix="usr/share/applications"/>
<tarfileset file="${package}/${package.deb}/openstego" prefix="usr/share/openstego" filemode="755"/>
<tarfileset file="${package}/${package.deb}/openstego.png" prefix="usr/share/openstego"/>
<tarfileset file="./lib/openstego.jar" prefix="usr/share/openstego/lib"/>
<tarfileset file="./src/image/openstego.xpm" prefix="usr/share/pixmaps"/>
<tarfileset file="${package}/${package.bin}/README" prefix="usr/share/doc/openstego"/>
<tarfileset file="${package}/${package.deb}/changelog.Debian.gz" prefix="usr/share/doc/openstego"/>
<tarfileset file="${package}/${package.deb}/copyright" prefix="usr/share/doc/openstego"/>
</deb>
<deb todir="${package}" package="openstego" section="graphics" architecture="amd64"
depends="default-jre" priority="optional">
<version upstream="${package.ver}"/>
<maintainer name="${author.name}" email="${author.mail}"/>
<description synopsis="OpenStego: Modular steganography solution">OpenStego is a tool implemented in Java for generic steganography, with support for password-based encryption of the data. It supports plugins for various steganographic algorithms.
Using OpenStego, you can hide secret data within innocuous looking files like images.</description>
<tarfileset file="${package}/${package.deb}/openstego.desktop" prefix="usr/share/applications"/>
<tarfileset file="${package}/${package.deb}/openstego" prefix="usr/share/openstego" filemode="755"/>
<tarfileset file="${package}/${package.deb}/openstego.png" prefix="usr/share/openstego"/>
<tarfileset file="./lib/openstego.jar" prefix="usr/share/openstego/lib"/>
<tarfileset file="./src/image/openstego.xpm" prefix="usr/share/pixmaps"/>
<tarfileset file="${package}/${package.bin}/README" prefix="usr/share/doc/openstego"/>
<tarfileset file="${package}/${package.deb}/changelog.Debian.gz" prefix="usr/share/doc/openstego"/>
<tarfileset file="${package}/${package.deb}/copyright" prefix="usr/share/doc/openstego"/>
</deb>
</target>
</project>