Skip to content

Commit 489f461

Browse files
committed
Updated the package target.
1 parent ac3af97 commit 489f461

File tree

1 file changed

+20
-28
lines changed

1 file changed

+20
-28
lines changed

build.xml

+20-28
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@
220220
<available file="${dir.src}/libuiohook" property="project.check.libuiohook.download" />
221221
<available file="${dir.src}/libuiohook/configure" property="project.check.libuiohook.bootstrap" />
222222
<available file="${dir.bin}/libuiohook/Makefile" property="project.check.libuiohook.configure" />
223-
223+
<available file="${dir.jar}/${ant.project.name}.jar" property="project.check.jar" />
224+
<available file="${dir.doc}/" property="project.check.javadoc" />
224225

225226
<!-- Set the operating system name used for organizing native libraries -->
226227
<condition property="ant.build.native.os" value="freebsd">
@@ -314,11 +315,11 @@
314315
<property name="ant.build.native.executable" value="lib${ant.project.name}.so" />
315316

316317

317-
<!-- Create property file for the descovered values -->
318+
<!-- Create property file for the descovered values
318319
<propertyfile file="ant.build.properties" comment="auto-generated by ant configure">
319320
<entry key="ant.build.debug" value="${ant.build.debug}" />
320321
<entry key="ant.build.javac.args" value="${ant.build.javac.args}" />
321-
</propertyfile>
322+
</propertyfile -->
322323
</target>
323324

324325

@@ -530,7 +531,7 @@
530531
</target>
531532

532533

533-
<target name="jar" description="Creates the jar library.">
534+
<target name="jar" unless="project.check.jar" description="Creates the jar library.">
534535
<echo>Copying libs...</echo>
535536
<mkdir dir="${dir.bin}/class/java/org/jnativehook/lib" />
536537
<copy overwrite="true" todir="${dir.bin}/class/java/org/jnativehook/lib">
@@ -566,7 +567,7 @@
566567
</target>
567568

568569

569-
<target name="javadoc" description="Generates javadoc api documentation.">
570+
<target name="javadoc" unless="project.check.javadoc" description="Generates javadoc api documentation.">
570571
<echo level="info">Generating API Documenation...</echo>
571572
<mkdir dir="${dir.doc}" />
572573

@@ -589,41 +590,32 @@
589590
</target>
590591

591592

592-
<target name="package" depends="jar,javadoc" description="Creates zip files for distribution.">
593+
<target name="package" depends="init,jar,javadoc" description="Creates zip files for distribution.">
593594
<!-- Copy Files To Dist Locations -->
594595
<echo>Creating Distribution Archive...</echo>
595596
<mkdir dir="${dir.dist}" />
596597

597-
<zip destfile="${dir.dist}/${ant.project.name}-${ant.project.version}.zip" duplicate="add" level="9">
598-
<zipfileset dir="${dir.jar}" prefix="${ant.project.name}/jar">
599-
<include name="*.jar" />
598+
599+
<zip destfile="${dir.dist}/${ant.project.name}-${ant.project.version}.zip" level="9">
600+
<zipfileset dir="${dir.doc}" prefix="${ant.project.name}/doc">
601+
<include name="**/*" />
600602
</zipfileset>
601603

602-
<zipfileset dir="${basedir}" prefix="${ant.project.name}">
603-
<include name="license*.txt" />
604-
<include name="readme.txt" />
604+
<zipfileset dir="${dir.jar}" prefix="${ant.project.name}/jar">
605+
<include name="*.jar" />
605606
</zipfileset>
606-
</zip>
607607

608-
<zip destfile="${dir.dist}/${ant.project.name}-doc-${ant.project.version}.zip" duplicate="add" level="9">
609-
<zipfileset dir="${dir.doc}" prefix="${ant.project.name}/doc">
610-
<exclude name="**/.*" />
608+
<zipfileset dir="${dir.src}" prefix="${ant.project.name}/src">
609+
<include name="**/*" />
610+
<exclude name="JNativeHook.iml" />
611+
<exclude name="jni/include/org_jnativehook_GlobalScreen.h" />
612+
<exclude name="jnitasks/" />
613+
<exclude name="libuiohook/" />
611614
</zipfileset>
612-
</zip>
613615

614-
<zip destfile="${dir.dist}/${ant.project.name}-src-${ant.project.version}.zip" duplicate="add" level="9">
615616
<zipfileset dir="${basedir}" prefix="${ant.project.name}">
616-
<exclude name="**/.*" />
617-
618-
<include name="*.txt" />
619617
<include name="build.*" />
620-
<exclude name="build.properties*" />
621-
</zipfileset>
622-
623-
<zipfileset dir="${dir.src}" prefix="${ant.project.name}/src">
624-
<exclude name="**/.*" />
625-
626-
<exclude name="native/jni/org_jnativehook_GlobalScreen.h" />
618+
<include name="*.md" />
627619
</zipfileset>
628620
</zip>
629621

0 commit comments

Comments
 (0)