Skip to content

Commit

Permalink
Updated the package target.
Browse files Browse the repository at this point in the history
  • Loading branch information
kwhat committed Jan 22, 2014
1 parent ac3af97 commit 489f461
Showing 1 changed file with 20 additions and 28 deletions.
48 changes: 20 additions & 28 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@
<available file="${dir.src}/libuiohook" property="project.check.libuiohook.download" />
<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.jar}/${ant.project.name}.jar" property="project.check.jar" />
<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">
Expand Down Expand Up @@ -314,11 +315,11 @@
<property name="ant.build.native.executable" value="lib${ant.project.name}.so" />


<!-- Create property file for the descovered values -->
<!-- Create property file for the descovered values
<propertyfile file="ant.build.properties" comment="auto-generated by ant configure">
<entry key="ant.build.debug" value="${ant.build.debug}" />
<entry key="ant.build.javac.args" value="${ant.build.javac.args}" />
</propertyfile>
</propertyfile -->
</target>


Expand Down Expand Up @@ -530,7 +531,7 @@
</target>


<target name="jar" description="Creates the jar library.">
<target name="jar" unless="project.check.jar" 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">
Expand Down Expand Up @@ -566,7 +567,7 @@
</target>


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

Expand All @@ -589,41 +590,32 @@
</target>


<target name="package" depends="jar,javadoc" description="Creates zip files for distribution.">
<target name="package" depends="init,jar,javadoc" 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" duplicate="add" level="9">
<zipfileset dir="${dir.jar}" prefix="${ant.project.name}/jar">
<include name="*.jar" />

<zip destfile="${dir.dist}/${ant.project.name}-${ant.project.version}.zip" level="9">
<zipfileset dir="${dir.doc}" prefix="${ant.project.name}/doc">
<include name="**/*" />
</zipfileset>

<zipfileset dir="${basedir}" prefix="${ant.project.name}">
<include name="license*.txt" />
<include name="readme.txt" />
<zipfileset dir="${dir.jar}" prefix="${ant.project.name}/jar">
<include name="*.jar" />
</zipfileset>
</zip>

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

<zip destfile="${dir.dist}/${ant.project.name}-src-${ant.project.version}.zip" duplicate="add" level="9">
<zipfileset dir="${basedir}" prefix="${ant.project.name}">
<exclude name="**/.*" />

<include name="*.txt" />
<include name="build.*" />
<exclude name="build.properties*" />
</zipfileset>

<zipfileset dir="${dir.src}" prefix="${ant.project.name}/src">
<exclude name="**/.*" />

<exclude name="native/jni/org_jnativehook_GlobalScreen.h" />
<include name="*.md" />
</zipfileset>
</zip>

Expand Down

0 comments on commit 489f461

Please sign in to comment.