From 4a8d5ca10be732d50b4814b9f637d20d2d9eb319 Mon Sep 17 00:00:00 2001
From: Jeff Wallace <jwallace@basistech.com>
Date: Thu, 19 Sep 2013 17:27:33 -0400
Subject: [PATCH] Added dist-debug target to create datamodel jar from debug
 libs.

---
 bindings/java/build-unix.xml    |  2 ++
 bindings/java/build-windows.xml | 18 +++++++++++++-----
 bindings/java/build.xml         |  6 ++++++
 3 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/bindings/java/build-unix.xml b/bindings/java/build-unix.xml
index 7d50e5b58..f1451406e 100644
--- a/bindings/java/build-unix.xml
+++ b/bindings/java/build-unix.xml
@@ -79,6 +79,8 @@
 
 	<target name="copyLibs" depends="copyLinuxLibs,copyMacLibs" />
 	
+	<target name="copyLibsDebug" depends="copyLibs" />
+	
     <target name="copyTSKLibs" depends="copyTskLibs_so,copyTskLibs_dylib">
         <!-- depends targets take care of the actual copying since the file differs on OS X and Linux -->
         <!-- This assumes that TSK, libewf, and zlib have been installed on the system and those libraries will be with normal loading approaches -->
diff --git a/bindings/java/build-windows.xml b/bindings/java/build-windows.xml
index 7a78fd1cd..821ae120f 100644
--- a/bindings/java/build-windows.xml
+++ b/bindings/java/build-windows.xml
@@ -34,17 +34,25 @@
 		</java>
 	</target>
 	
-	<target name="copyLibs" depends="copyWinLibs" description="Copy native libs to the correct folder" />
+	<target name="copyLibs" depends="copyWinLibs" description="Copy native libs to the correct folder">
+		<property name="tsk.config" value="Release"/>
+		<antcall target="copyWinLibs" />
+	</target>
+	
+	<target name="copyLibsDebug" depends="copyWinLibs" description="Copy native libs to the correct folder">
+		<property name="tsk.config" value="Debug"/>
+		<antcall target="copyWinLibs" />
+	</target>
 	
 	<target name="copyWinLibs" depends="copyWinLibs64,copyWinLibs32" description="Copy windows dlls to the correct location." />
 	
 	<target name="checkLibDirs">
-		<available property="win64.exists" type="dir" file="${basedir}/../../win32/x64/Release" />
-		<available property="win32.exists" type="dir" file="${basedir}/../../win32/Release" />
+		<available property="win64.exists" type="dir" file="${basedir}/../../win32/x64/${tsk.config}" />
+		<available property="win32.exists" type="dir" file="${basedir}/../../win32/${tsk.config}" />
 	</target>
 	
 	<target name="copyWinLibs64" depends="checkLibDirs" if="win64.exists">
-		<property name="win64dir" location="${basedir}/../../win32/x64/Release" />
+		<property name="win64dir" location="${basedir}/../../win32/x64/${tsk.config}" />
 		
 		<fileset dir="${win64dir}" id="win64dlls">
 			<include name="*.dll" />
@@ -69,7 +77,7 @@
 	</target>
 	
 	<target name="copyWinLibs32" depends="checkLibDirs" if="win32.exists">
-		<property name="win32dir" location="${basedir}/../../win32/Release" />
+		<property name="win32dir" location="${basedir}/../../win32/${tsk.config}" />
 		<fileset dir="${win32dir}" id="win32dlls">
 			<include name="*.dll" />
 		</fileset>
diff --git a/bindings/java/build.xml b/bindings/java/build.xml
index 7d1271df6..dcd3a31ba 100755
--- a/bindings/java/build.xml
+++ b/bindings/java/build.xml
@@ -121,6 +121,12 @@ pattern="lib/[artifact]-[revision](-[classifier]).[ext]" />
     <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
 		<jar jarfile="${dist}/Tsk_DataModel.jar" basedir="${build}"/>
 	</target>
+	
+	<target name="dist-debug" depends="init-ivy, compile, copyLibsDebug"
+        description="generate the distribution" >
+    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
+		<jar jarfile="${dist}/Tsk_DataModel.jar" basedir="${build}"/>
+	</target>
   
 	
 	
-- 
GitLab