forked from kwhat/jnativehook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
629 lines (500 loc) · 22.7 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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
<?xml version="1.0" encoding="UTF-8"?>
<!--
JNativeHook: Global keyboard and mouse hooking for Java.
Copyright (C) 2006-2017 Alexander Barker. All Rights Received.
http://code.google.com/p/jnativehook/
JNativeHook is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
JNativeHook is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<project name="jnativehook" default="all" basedir=".">
<!-- Project Settings -->
<property file="build.num" />
<tstamp>
<format property="ant.build.revision" pattern="yyyyMMdd" />
</tstamp>
<property name="ant.project.vendor" value="Alexander Barker (alex@1stleg.com)" />
<property name="ant.project.version" value="${ant.build.major}.${ant.build.minor}.${ant.build.revision}" />
<property environment="env" />
<!-- Path Settings -->
<property name="dir.src" value="${basedir}/src" />
<property name="dir.doc" value="${basedir}/doc" />
<property name="dir.dist" value="${basedir}/dist" />
<property name="dir.lib" value="${basedir}/lib" />
<property name="dir.jar" value="${basedir}/jar" />
<property name="dir.bin" value="${basedir}/bin" />
<!-- Class Path Settings -->
<!-- NOTE Gentoo requires `CLASSPATH="$(java-config -p hamcrest-core-1.3,ant-junit,junit-4)" ant test` -->
<path id="ant.project.class.path">
<pathelement location="${dir.bin}/class/java" />
<pathelement location="${dir.bin}/class/test" />
<fileset dir="${basedir}">
<include name="*.jar" />
</fileset>
<pathelement location="${dir.lib}" />
<pathelement path="${java.class.path}" />
</path>
<target name="clean" description="Removes generated bytecode and object files.">
<echo>Cleaning build structure...</echo>
<delete includeEmptyDirs="true" verbose="true" failonerror="false">
<fileset dir="${dir.bin}" includes="**/*" />
</delete>
</target>
<target name="mostlyclean" depends="clean" description="Removes all items except previously built libs.">
<echo>Cleaning all build related items...</echo>
<delete includeEmptyDirs="true" verbose="true" failonerror="false">
<fileset file="${basedir}/build.properties" />
<fileset dir="${dir.dist}" />
<fileset dir="${dir.doc}" />
<fileset dir="${dir.jar}" />
<fileset dir="${dir.src}/libuiohook" casesensitive="yes">
<include name="autom4te.cache" />
<include name="config" />
<include name="include/*" />
<exclude name="include/uiohook.h"/>
<include name="m4/*" />
<exclude name="m4/ax_pthread.m4"/>
<include name="pc/*" />
<exclude name="pc/uiohook.pc.in" />
<include name="Makefile" />
<include name="Makefile.in" />
<include name="aclocal.m4" />
<include name="config.log" />
<include name="config.status" />
<include name="configure" />
</fileset>
<fileset file="${dir.src}/jni/include/org_jnativehook_GlobalScreen.h" />
<fileset file="${dir.src}/jni/include/org_jnativehook_GlobalScreen_EventDispatchTask.h" />
<fileset file="${dir.src}/jni/include/org_jnativehook_GlobalScreen_NativeHookThread.h" />
</delete>
</target>
<target name="distclean" depends="mostlyclean" description="Removes all items generated by the build system.">
<echo>Cleaning all build related items...</echo>
<delete includeEmptyDirs="true" verbose="true" failonerror="false">
<fileset dir="${dir.lib}" />
</delete>
</target>
<target name="init" description="Initialize local build environment.">
<echo>Initializing local build environment...</echo>
<mkdir dir="${dir.bin}" />
<fail message="Could not determine ${ant.project.name} version. Please check the build.num file.">
<condition>
<not>
<and>
<isset property="ant.build.major" />
<isset property="ant.build.minor" />
<isset property="ant.build.revision" />
</and>
</not>
</condition>
</fail>
<property file="build.properties" />
<!-- Try to locate the include folder for java headers -->
<condition property="ant.build.javac.include" value="${env.JDK_HOME}/include">
<available file="${env.JDK_HOME}/include" type="dir" />
</condition>
<condition property="ant.build.javac.include" value="${env.JAVA_HOME}/include">
<available file="${env.JAVA_HOME}/include" type="dir" />
</condition>
<condition property="ant.build.javac.include" value="${java.home}/include">
<available file="${java.home}/include" type="dir" />
</condition>
<condition property="ant.build.javac.include" value="${java.home}/../include">
<available file="${java.home}/../include" type="dir" />
</condition>
<condition property="ant.build.javac.include" value="${java.home}/../Headers">
<available file="${java.home}/../Headers" type="dir" />
</condition>
<condition property="ant.build.javac.include" value="/System/Library/Frameworks/JavaVM.framework/Headers">
<available file="/System/Library/Frameworks/JavaVM.framework/Headers" type="dir" />
</condition>
<condition property="ant.build.javac.include" value="${java.home}/Headers">
<available file="${java.home}${file.separator}Headers" type="dir" />
</condition>
<fail message="Could not determine ant.build.javac.include. Please set your JDK_HOME / JAVA_HOME environment variable or manually set the ant.build.javac.include property to the location of your java header files.">
<condition>
<not>
<or>
<isset property="ant.build.javac.include" />
<available file="${ant.build.javac.include}" type="dir" />
</or>
</not>
</condition>
</fail>
<!-- Define the JNI Tasks provided by classpathref. -->
<typedef resource="org/jnitasks/antlib.xml" classpathref="ant.project.class.path" onerror="failall" />
<!-- Preform target checks. -->
<fileset dir="${dir.src}/libuiohook" id="src-libuiohook" />
<pathconvert refid="src-libuiohook" property="project.check.libuiohook.download" setonempty="false" />
<available file="${dir.src}/libuiohook/configure" property="project.check.libuiohook.bootstrap" />
<available file="${dir.bin}/libuiohook/Makefile" property="project.check.libuiohook.configure" />
<available file="${dir.doc}/" property="project.check.javadoc" />
<!-- Set the operating system name used for organizing native libraries -->
<condition property="ant.build.native.os" value="freebsd">
<os family="unix" name="FreeBSD" />
</condition>
<condition property="ant.build.native.os" value="openbsd">
<os family="unix" name="OpenBSD" />
</condition>
<condition property="ant.build.native.os" value="darwin">
<and>
<os family="mac" />
<os family="unix" />
</and>
</condition>
<condition property="ant.build.native.os" value="solaris">
<or>
<os family="unix" name="Solaris" />
<os family="unix" name="SunOS" />
</or>
</condition>
<condition property="ant.build.native.os" value="linux">
<os family="unix" name="Linux" />
</condition>
<condition property="ant.build.native.os" value="windows">
<os family="winnt" />
</condition>
<!-- Set the system arch name used for organizing native libraries -->
<condition property="ant.build.native.arch" value="arm">
<os arch="arm" />
</condition>
<condition property="ant.build.native.arch" value="ppc">
<or>
<os arch="ppc" />
<os arch="PowerPC" />
</or>
</condition>
<condition property="ant.build.native.arch" value="ppc64">
<or>
<os arch="ppc64" />
<os arch="PowerPC64" />
</or>
</condition>
<!-- TODO Testing Needed
<condition property="native.arch" value="sparc">
<os arch="sparc" />
</condition>
-->
<condition property="ant.build.native.arch" value="x86">
<or>
<os arch="x86" />
<os arch="i386" />
<os arch="i486" />
<os arch="i586" />
<os arch="i686" />
</or>
</condition>
<condition property="ant.build.native.arch" value="x86_64">
<or>
<os arch="x86-64" />
<os arch="x86_64" />
<os arch="amd64" />
<os arch="k8" />
</or>
</condition>
<property name="ant.build.native.arch" value="${os.arch}" />
<!-- Figure out the platform we are building for. -->
<condition property="native.os.isDarwin" value="true">
<equals arg1="${ant.build.native.os}" arg2="darwin" />
</condition>
<condition property="native.os.isX11" value="true">
<or>
<equals arg1="${ant.build.native.os}" arg2="freebsd" />
<equals arg1="${ant.build.native.os}" arg2="openbsd" />
<equals arg1="${ant.build.native.os}" arg2="solaris" />
<equals arg1="${ant.build.native.os}" arg2="linux" />
</or>
</condition>
<condition property="native.os.isWindows" value="true">
<equals arg1="${ant.build.native.os}" arg2="windows" />
</condition>
<!-- Set system specific toolchain. -->
<condition property="ant.build.native.toolchain" value="clang">
<isset property="native.os.isDarwin" />
</condition>
<property name="ant.build.native.toolchain" value="gcc" />
<!-- Set parallel jobs. -->
<property name="ant.build.native.jobs" value="auto" />
<!-- Set default compiler and linker flags. -->
<condition property="ant.build.native.cflags" value="-O1 -g -pipe" else="-O2 -pipe">
<istrue value="${ant.build.debug}" />
</condition>
<property name="ant.build.native.ldflags" value="" />
<!-- Set default javac options. -->
<property name="ant.build.debug" value="false" />
<property name="ant.build.javac.compiler" value="modern" />
<property name="ant.build.javac.source" value="${ant.java.version}" />
<property name="ant.build.javac.target" value="${ant.java.version}" />
<property name="ant.build.javac.args" value="" />
<!-- Set system specific library name. -->
<condition property="ant.build.native.executable" value="libJNativeHook.dylib">
<isset property="native.os.isDarwin" />
</condition>
<condition property="ant.build.native.executable" value="JNativeHook.dll">
<isset property="native.os.isWindows" />
</condition>
<property name="ant.build.native.executable" value="libJNativeHook.so" />
<!-- Print the relevant Ant properties for logging. -->
<echo level="info">Project: ${ant.project.name} ${ant.project.version}</echo>
<echo level="info">Debug: ${ant.build.debug}</echo>
<echo level="info">Java Compiler: ${ant.build.javac.compiler}</echo>
<echo level="info">Java Source: ${ant.build.javac.source}</echo>
<echo level="info">Java Target: ${ant.build.javac.target}</echo>
<echo level="info">Java Include: ${ant.build.javac.include}</echo>
<echo level="info">Java Args: ${ant.build.javac.args}</echo>
<echo level="info">Native Lib: ${ant.build.native.executable}</echo>
<echo level="info">Native OS: ${ant.build.native.os}</echo>
<echo level="info">Native Arch: ${ant.build.native.arch}</echo>
<echo level="info">Native Toolchain: ${ant.build.native.toolchain}</echo>
<echo level="info">Native CFLAGS: ${ant.build.native.cflags}</echo>
<echo level="info">Native LDFLAGS: ${ant.build.native.ldflags}</echo>
<!-- Create property file for the descovered values -->
<propertyfile file="build.properties" comment="auto-generated by ant configure">
<entry key="ant.build.debug" value="${ant.build.debug}" />
<entry key="ant.build.javac.compiler" value="${ant.build.javac.compiler}" />
<entry key="ant.build.javac.source" value="${ant.build.javac.source}" />
<entry key="ant.build.javac.target" value="${ant.build.javac.target}" />
<entry key="ant.build.javac.include" value="${ant.build.javac.include}" />
<entry key="ant.build.javac.args" value="${ant.build.javac.args}" />
<entry key="ant.build.native.toolchain" value="${ant.build.native.toolchain}" />
<entry key="ant.build.native.jobs" value="${ant.build.native.jobs}" />
<entry key="ant.build.native.cflags" value="${ant.build.native.cflags}" />
<entry key="ant.build.native.ldflags" value="${ant.build.native.ldflags}" />
</propertyfile>
</target>
<target name="download-libuiohook" depends="init" unless="project.check.libuiohook.download" description="Download the native library source code.">
<echo>Downloading libUIOHook source...</echo>
<mkdir dir="${dir.src}/libuiohook" />
<get src="https://github.com/kwhat/libuiohook/archive/1.1.zip" dest="${dir.bin}/libuiohook-1.1.zip" verbose="true" />
<unzip src="${dir.bin}/libuiohook-1.1.zip" dest="${dir.src}/libuiohook">
<mapper type="glob" from="libuiohook-1.1/*" to="*" />
</unzip>
</target>
<target name="bootstrap-libuiohook" depends="download-libuiohook" unless="project.check.libuiohook.bootstrap" description="Initialize the native library build system.">
<echo>Bootstrapping libUIOHook...</echo>
<autoreconf dir="${dir.src}/libuiohook" force="true" install="true">
<include path="/opt/local/share/aclocal" if="native.os.isDarwin" />
</autoreconf>
</target>
<target name="configure-libuiohook" depends="bootstrap-libuiohook" unless="project.check.libuiohook.configure" description="Configure platform dependent features for native library.">
<echo>Configuring libUIOHook source...</echo>
<mkdir dir="${dir.bin}/libuiohook" />
<configure toolchain="${ant.build.native.toolchain}" dir="${dir.bin}/libuiohook" script="${dir.src}/libuiohook/configure" prefix="${dir.bin}" lib="${dir.bin}/lib">
<env key="CFLAGS" value="${ant.build.native.cflags}" />
<env key="LDFLAGS" value="${ant.build.native.ldflags}" />
<enable if="ant.build.debug">debug</enable>
<enable>quiet</enable>
<enable>static</enable>
<disable>shared</disable>
<with>pic</with>
</configure>
</target>
<target name="compile-libuiohook" depends="configure-libuiohook" description="Compile the native library.">
<echo>Compiling libUIOHook source...</echo>
<make dir="${dir.bin}/libuiohook" jobs="${ant.build.native.jobs}" target="install" />
</target>
<target name="compile-java" depends="init" description="Compiles Java source files.">
<echo>Compiling Java source...</echo>
<mkdir dir="${dir.bin}/class/java" />
<javac
destdir="${dir.bin}/class/java"
debug="${ant.build.debug}"
debuglevel="lines,vars,source"
optimize="true"
deprecation="false"
includeantruntime="false"
listfiles="true"
verbose="false"
>
<compilerarg line="${ant.build.javac.args}"/>
<src path="${dir.src}/java" />
<classpath refid="ant.project.class.path" />
</javac>
</target>
<target name="compile-jni" depends="compile-libuiohook,compile-java" description="Compiles JNI source files.">
<echo>Creating JNI Headers...</echo>
<javah destdir="${dir.src}/jni/include" verbose="true">
<class name="org.jnativehook.GlobalScreen" />
<classpath refid="ant.project.class.path" />
</javah>
<!-- Call pkg-config to determine what libraries to link against. -->
<pkgconfig libs="true" libraries="uiohook" outputproperty="ant.build.native.ld.libs">
<dirset dir="${dir.bin}">
<include name="lib/pkgconfig"/>
<include name="bin/pkgconfig"/>
</dirset>
</pkgconfig>
<echo>Compiling C source...</echo>
<!-- Create required directories for compiling. -->
<mkdir dir="${dir.bin}/obj/jni" />
<!-- Execute the native compiler on the source files. -->
<cc toolchain="${ant.build.native.toolchain}" jobs="${ant.build.native.jobs}" objdir="${dir.bin}/obj/jni">
<arg value="-Wall -Wextra -Wno-unused-parameter" />
<arg value="-std=c99" />
<arg value="-fPIC" unless="native.os.isWindows" />
<arg value="${ant.build.native.cflags}" />
<define name="USE_DEBUG" if="ant.build.debug"/>
<include path="${dir.bin}/include" />
<include path="${dir.src}/jni/include" />
<include path="${ant.build.javac.include}" />
<include path="${ant.build.javac.include}/win32" if="native.os.isWindows" />
<include path="${ant.build.javac.include}/${ant.build.native.os}" unless="native.os.isWindows" />
<fileset dir="${dir.src}/jni">
<include name="**/*.c" />
</fileset>
</cc>
<echo>Linking C objects...</echo>
<!-- Create required directory for linking. -->
<mkdir dir="${dir.lib}/${ant.build.native.os}/${ant.build.native.arch}" />
<!-- Execute the native linker on the object files. -->
<ld toolchain="${ant.build.native.toolchain}" outfile="${dir.lib}/${ant.build.native.os}/${ant.build.native.arch}/${ant.build.native.executable}">
<!-- weak linker options for darwin: -Wl,-flat_namespace,-undefined,dynamic_lookup -->
<arg value="-dynamiclib" if="native.os.isDarwin" />
<arg value="-shared" unless="native.os.isDarwin" />
<arg value="-static-libgcc" if="native.os.isWindows" />
<arg value="${ant.build.native.ldflags}" />
<fileset dir="${dir.bin}">
<include name="obj/jni/**/*.o" />
</fileset>
<!-- Linking order matters and libraries should come after obj files. -->
<arg value="${ant.build.native.ld.libs}" />
</ld>
</target>
<target name="compile" depends="compile-java,compile-jni" description="Compiles both Java and C source files.">
</target>
<target name="test" depends="compile" description="Compile and perform JUnit tests.">
<echo>Compiling JUnit source...</echo>
<mkdir dir="${dir.bin}/class/test" />
<javac
destdir="${dir.bin}/class/test"
debug="${ant.build.debug}"
debuglevel="lines,vars,source"
optimize="true"
deprecation="false"
includeantruntime="false"
listfiles="true"
verbose="false"
>
<compilerarg line="${ant.build.javac.args}"/>
<compilerarg value="-Xlint:unchecked" />
<src path="${dir.src}/test" />
<classpath refid="ant.project.class.path" />
</javac>
<echo>Performing JUnit tests...</echo>
<junit fork="true" printsummary="true" haltonerror="true">
<jvmarg value="-Djava.library.path=${dir.lib}/${ant.build.native.os}/${ant.build.native.arch}" />
<classpath refid="ant.project.class.path" />
<formatter type="brief" usefile="false" />
<!-- test name="org.jnativehook.GlobalScreenTest" /-->
<!-- todir="${reports.tests}" -->
<batchtest>
<fileset dir="${dir.src}/test">
<include name="**/*Test.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="jar" depends="javadoc" description="Creates the jar library.">
<echo>Copying libs...</echo>
<mkdir dir="${dir.bin}/class/java/org/jnativehook/lib" />
<copy overwrite="true" todir="${dir.bin}/class/java/org/jnativehook/lib">
<fileset dir="${dir.lib}" includes="**/*" />
</copy>
<echo>Creating jar files...</echo>
<mkdir dir="${dir.jar}" />
<jar jarfile="${dir.jar}/${ant.project.name}-${ant.project.version}.jar" basedir="${dir.bin}/class/java" update="true" compress="true" level="9">
<include name="org/jnativehook/**" />
<manifest>
<attribute name="Main-Class" value="org.jnativehook.example.NativeHookDemo" />
<section name="org/jnativehook">
<attribute name="Specification-Title" value="${ant.project.name} Library" />
<attribute name="Specification-Version" value="${ant.build.major}.${ant.build.minor}" />
<attribute name="Specification-Vendor" value="${ant.project.vendor}" />
<attribute name="Implementation-Title" value="org.jnativehook" />
<attribute name="Implementation-Version" value="${ant.build.revision}" />
<attribute name="Implementation-Vendor" value="${ant.project.vendor}" />
</section>
</manifest>
</jar>
</target>
<target name="run" depends="compile" description="Execute the bundled example.">
<java classname="org.jnativehook.example.NativeHookDemo" fork="true" failonerror="true">
<jvmarg value="-Djava.library.path=${dir.lib}/${ant.build.native.os}/${ant.build.native.arch}" />
<classpath>
<pathelement location="${dir.jar}/${ant.project.name}-${ant.project.version}.jar" />
<pathelement path="${dir.bin}/class/java" />
<pathelement path="${java.class.path}" />
</classpath>
</java>
</target>
<target name="javadoc" unless="project.check.javadoc" description="Generates javadoc api documentation.">
<echo level="info">Generating API Documentation...</echo>
<mkdir dir="${dir.doc}" />
<javadoc destdir="${dir.doc}" windowtitle="${ant.project.name}" author="true" version="true" use="true">
<packageset dir="${dir.src}/java" defaultexcludes="yes">
<include name="org/jnativehook/**" />
<exclude name="org/jnativehook/example/**" />
</packageset>
<doctitle><![CDATA[<h1>JNativeHook-${ant.build.major}.${ant.build.minor} API Documentation</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright © 2006-2017 ${project.vendor}. All Rights Received.</i>]]></bottom>
<link href="http://docs.oracle.com/javase/7/docs/api/" />
</javadoc>
</target>
<target name="package" depends="jar" description="Creates zip files for distribution.">
<!-- Copy Files To Dist Locations -->
<echo>Creating Distribution Archive...</echo>
<mkdir dir="${dir.dist}" />
<zip destfile="${dir.dist}/${ant.project.name}-${ant.project.version}.zip" level="9">
<zipfileset dir="targets" prefix="${ant.project.name}/targets">
<include name="**/*.properties" />
</zipfileset>
<zipfileset dir="${dir.doc}" prefix="${ant.project.name}/doc">
<include name="**/*" />
</zipfileset>
<zipfileset dir="${basedir}/wiki" prefix="${ant.project.name}/wiki">
<include name="**/*" />
</zipfileset>
<zipfileset dir="${dir.jar}" prefix="${ant.project.name}/jar">
<include name="${ant.project.name}-${ant.project.version}.jar" />
</zipfileset>
<zipfileset dir="${dir.src}" prefix="${ant.project.name}/src">
<include name="java/**/*" />
<include name="jni/**/*" />
<include name="test/**/*" />
<exclude name="jni/include/org_jnativehook_GlobalScreen.h" />
<exclude name="jni/include/org_jnativehook_GlobalScreen_EventDispatchTask.h" />
<exclude name="jni/include/org_jnativehook_GlobalScreen_NativeHookThread.h" />
</zipfileset>
<zipfileset dir="${dir.src}/libuiohook" prefix="${ant.project.name}/src/libuiohook">
<include name="include/uiohook.h" />
<include name="m4/ax_*.m4" />
<include name="man/*" />
<include name="pc/uiohook.pc.in" />
<include name="src/**/*" />
<include name="test/**/*" />
<include name="AUTHORS" />
<include name="bootstrap.sh" />
<include name="*.am" />
<include name="*.md" />
<include name="*.ac" />
</zipfileset>
<zipfileset dir="${basedir}" prefix="${ant.project.name}">
<include name="build.num" />
<include name="build.xml" />
<include name="cross.build.xml" />
<include name="AUTHORS" />
<include name="*.md" />
<exclude name="build.properties" />
</zipfileset>
</zip>
</target>
<target name="all" depends="compile,jar" description="Compile all source files and create the jar library.">
</target>
</project>