[TeamTalk 125]: [662] TeamTalk/Agents/PenDecoder: 1) Removed jiu dependency

tk@edam.speech.cs.cmu.edu tk at edam.speech.cs.cmu.edu
Thu Jul 19 17:33:57 EDT 2007


An HTML attachment was scrubbed...
URL: http://mailman.srv.cs.cmu.edu/pipermail/teamtalk-developers/attachments/20070719/e837efe7/attachment.html
-------------- next part --------------
Deleted: TeamTalk/Agents/PenDecoder/jiu.jar
===================================================================
(Binary files differ)

Modified: TeamTalk/Agents/PenDecoder/nbproject/build-impl.xml
===================================================================
--- TeamTalk/Agents/PenDecoder/nbproject/build-impl.xml	2007-07-18 21:35:40 UTC (rev 661)
+++ TeamTalk/Agents/PenDecoder/nbproject/build-impl.xml	2007-07-19 21:33:55 UTC (rev 662)
@@ -19,7 +19,7 @@
   - cleanup
 
 -->
-<project name="PenDecoder-impl" default="default" basedir=".." xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1">
+<project name="PenDecoder-impl" default="default" basedir=".." xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:jaxws="http://www.netbeans.org/ns/jax-ws/1">
     <target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
     <!-- 
     ======================
@@ -54,9 +54,20 @@
                 </not>
             </and>
         </condition>
+        <condition property="manifest.available+main.class+mkdist.available">
+            <and>
+                <istrue value="${manifest.available+main.class}"/>
+                <isset property="libs.CopyLibs.classpath"/>
+            </and>
+        </condition>
         <condition property="have.tests">
             <or/>
         </condition>
+        <condition property="have.sources">
+            <or>
+                <available file="${src.dir}"/>
+            </or>
+        </condition>
         <condition property="netbeans.home+have.tests">
             <and>
                 <isset property="netbeans.home"/>
@@ -74,6 +85,8 @@
                 <istrue value="${no.dependencies}"/>
             </and>
         </condition>
+        <property name="javac.debug" value="true"/>
+        <property name="javadoc.preview" value="true"/>
     </target>
     <target name="-post-init">
         <!-- Empty placeholder for easier customization. -->
@@ -100,7 +113,7 @@
         </macrodef>
     </target>
     <target name="-init-macrodef-javac">
-        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/2">
+        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
             <attribute name="srcdir" default="${src.dir}"/>
             <attribute name="destdir" default="${build.classes.dir}"/>
             <attribute name="classpath" default="${javac.classpath}"/>
@@ -118,7 +131,7 @@
         </macrodef>
     </target>
     <target name="-init-macrodef-junit">
-        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/2">
+        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
             <attribute name="includes" default="**/*Test.java"/>
             <sequential>
                 <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
@@ -131,6 +144,8 @@
                         <mapper type="glob" from="test-sys-prop.*" to="*"/>
                     </syspropertyset>
                     <formatter type="brief" usefile="false"/>
+                    <formatter type="xml"/>
+                    <jvmarg line="${run.jvmargs}"/>
                 </junit>
             </sequential>
         </macrodef>
@@ -158,7 +173,7 @@
         </macrodef>
     </target>
     <target name="-init-macrodef-debug">
-        <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/2">
+        <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
             <attribute name="classname" default="${main.class}"/>
             <attribute name="classpath" default="${debug.classpath}"/>
             <element name="customize" optional="true"/>
@@ -221,8 +236,8 @@
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
     </target>
-    <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile">
-        <j2seproject2:javac/>
+    <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
+        <j2seproject3:javac/>
         <copy todir="${build.classes.dir}">
             <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
         </copy>
@@ -238,11 +253,11 @@
     </target>
     <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
-        <j2seproject2:javac>
+        <j2seproject3:javac>
             <customize>
                 <patternset includes="${javac.includes}"/>
             </customize>
-        </j2seproject2:javac>
+        </j2seproject3:javac>
     </target>
     <target name="-post-compile-single">
         <!-- Empty placeholder for easier customization. -->
@@ -268,18 +283,51 @@
     <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
         <j2seproject1:jar manifest="${manifest.file}"/>
     </target>
-    <target name="-do-jar-with-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class">
+    <target name="-do-jar-with-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" unless="manifest.available+main.class+mkdist.available">
         <j2seproject1:jar manifest="${manifest.file}">
             <j2seproject1:manifest>
                 <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
             </j2seproject1:manifest>
         </j2seproject1:jar>
+        <echo>To run this application from the command line without Ant, try:</echo>
+        <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
+        <property name="dist.jar.resolved" location="${dist.jar}"/>
+        <pathconvert property="run.classpath.with.dist.jar">
+            <path path="${run.classpath}"/>
+            <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
+        </pathconvert>
+        <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
     </target>
+    <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
+        <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
+        <pathconvert property="run.classpath.without.build.classes.dir">
+            <path path="${run.classpath}"/>
+            <map from="${build.classes.dir.resolved}" to=""/>
+        </pathconvert>
+        <pathconvert property="jar.classpath" pathsep=" ">
+            <path path="${run.classpath.without.build.classes.dir}"/>
+            <chainedmapper>
+                <flattenmapper/>
+                <globmapper from="*" to="lib/*"/>
+            </chainedmapper>
+        </pathconvert>
+        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
+        <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
+            <fileset dir="${build.classes.dir}"/>
+            <manifest>
+                <attribute name="Main-Class" value="${main.class}"/>
+                <attribute name="Class-Path" value="${jar.classpath}"/>
+            </manifest>
+        </copylibs>
+        <echo>To run this application from the command line without Ant, try:</echo>
+        <property name="dist.jar.resolved" location="${dist.jar}"/>
+        <echo>java -jar "${dist.jar.resolved}"</echo>
+    </target>
     <target name="-post-jar">
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
     </target>
-    <target name="jar" depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-post-jar" description="Build JAR."/>
+    <target name="jar" depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/>
     <!--
     =================
     EXECUTION SECTION
@@ -305,11 +353,11 @@
         <j2seproject1:nbjpdastart name="${debug.class}"/>
     </target>
     <target name="-debug-start-debuggee" depends="init,compile">
-        <j2seproject2:debug>
+        <j2seproject3:debug>
             <customize>
                 <arg line="${application.args}"/>
             </customize>
-        </j2seproject2:debug>
+        </j2seproject3:debug>
     </target>
     <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
     <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
@@ -318,7 +366,7 @@
     <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
     <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
-        <j2seproject2:debug classname="${debug.class}"/>
+        <j2seproject3:debug classname="${debug.class}"/>
     </target>
     <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
     <target name="-pre-debug-fix" depends="init">
@@ -336,14 +384,15 @@
     -->
     <target name="-javadoc-build" depends="init">
         <mkdir dir="${dist.javadoc.dir}"/>
-        <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true">
+        <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true">
             <classpath>
                 <path path="${javac.classpath}"/>
             </classpath>
             <sourcepath>
                 <pathelement location="${src.dir}"/>
             </sourcepath>
-            <fileset dir="${src.dir}"/>
+            <packageset dir="${src.dir}" includes="*/**"/>
+            <fileset dir="${src.dir}" includes="*.java"/>
         </javadoc>
     </target>
     <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
@@ -363,7 +412,7 @@
         <!-- You can override this target in the ../build.xml file. -->
     </target>
     <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
-        <j2seproject2:javac srcdir="" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
+        <j2seproject3:javac srcdir="" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
         <copy todir="${build.test.classes.dir}"/>
     </target>
     <target name="-post-compile-test">
@@ -377,11 +426,12 @@
     </target>
     <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
-        <j2seproject2:javac srcdir="" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
+        <j2seproject3:javac srcdir="" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
             <customize>
                 <patternset includes="${javac.includes}"/>
             </customize>
-        </j2seproject2:javac>
+        </j2seproject3:javac>
+        <copy todir="${build.test.classes.dir}"/>
     </target>
     <target name="-post-compile-test-single">
         <!-- Empty placeholder for easier customization. -->
@@ -397,7 +447,7 @@
         <mkdir dir="${build.test.results.dir}"/>
     </target>
     <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
-        <j2seproject2:junit/>
+        <j2seproject3:junit/>
     </target>
     <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
         <fail if="tests.failed">Some tests failed; see details above.</fail>
@@ -410,7 +460,7 @@
     </target>
     <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
         <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
-        <j2seproject2:junit includes="${test.includes}"/>
+        <j2seproject3:junit includes="${test.includes}"/>
     </target>
     <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
         <fail if="tests.failed">Some tests failed; see details above.</fail>
@@ -423,11 +473,11 @@
     -->
     <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
         <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
-        <j2seproject2:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
+        <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
             <customize>
                 <arg line="${test.class}"/>
             </customize>
-        </j2seproject2:debug>
+        </j2seproject3:debug>
     </target>
     <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
         <j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
@@ -457,11 +507,11 @@
     -->
     <target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single">
         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
-        <j2seproject2:debug classname="sun.applet.AppletViewer">
+        <j2seproject3:debug classname="sun.applet.AppletViewer">
             <customize>
                 <arg value="${applet.url}"/>
             </customize>
-        </j2seproject2:debug>
+        </j2seproject3:debug>
     </target>
     <target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/>
     <!--

Modified: TeamTalk/Agents/PenDecoder/nbproject/genfiles.properties
===================================================================
--- TeamTalk/Agents/PenDecoder/nbproject/genfiles.properties	2007-07-18 21:35:40 UTC (rev 661)
+++ TeamTalk/Agents/PenDecoder/nbproject/genfiles.properties	2007-07-19 21:33:55 UTC (rev 662)
@@ -1,8 +1,8 @@
-build.xml.data.CRC32=0c620af0
+build.xml.data.CRC32=6ba8dec9
 build.xml.script.CRC32=1cfc144e
-build.xml.stylesheet.CRC32=e2435cb5
+build.xml.stylesheet.CRC32=240b97a2
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=0c620af0
-nbproject/build-impl.xml.script.CRC32=8b28b4cd
-nbproject/build-impl.xml.stylesheet.CRC32=3b89b5a6
+nbproject/build-impl.xml.data.CRC32=6ba8dec9
+nbproject/build-impl.xml.script.CRC32=714dbfa4
+nbproject/build-impl.xml.stylesheet.CRC32=65d7ca21

Modified: TeamTalk/Agents/PenDecoder/nbproject/project.properties
===================================================================
--- TeamTalk/Agents/PenDecoder/nbproject/project.properties	2007-07-18 21:35:40 UTC (rev 661)
+++ TeamTalk/Agents/PenDecoder/nbproject/project.properties	2007-07-19 21:33:55 UTC (rev 662)
@@ -3,6 +3,7 @@
 build.classes.excludes=**/*.java,**/*.form
 # This directory is removed when the project is cleaned:
 build.dir=build
+build.generated.dir=${build.dir}/generated
 # Only compile against the classpath explicitly listed here:
 build.sysclasspath=ignore
 build.test.classes.dir=${build.dir}/test/classes
@@ -22,7 +23,6 @@
 file.reference.PenDecoder-src=src
 jar.compress=false
 javac.classpath=\
-    ${file.reference.jiu.jar}:\
     ${file.reference.galaxy.jar}:\
     ${file.reference.bsh-util-2.0b4.jar}:\
     ${file.reference.bsh-core-2.0b4.jar}
@@ -48,6 +48,7 @@
 javadoc.windowtitle=
 main.class=edu.cmu.ravenclaw.pendecoder.PenDecoderServer
 manifest.file=manifest.mf
+meta.inf.dir=${src.dir}/META-INF
 platform.active=default_platform
 run.classpath=\
     ${javac.classpath}:\

Modified: TeamTalk/Agents/PenDecoder/nbproject/project.xml
===================================================================
--- TeamTalk/Agents/PenDecoder/nbproject/project.xml	2007-07-18 21:35:40 UTC (rev 661)
+++ TeamTalk/Agents/PenDecoder/nbproject/project.xml	2007-07-19 21:33:55 UTC (rev 662)
@@ -2,9 +2,9 @@
 <project xmlns="http://www.netbeans.org/ns/project/1">
     <type>org.netbeans.modules.java.j2seproject</type>
     <configuration>
-        <data xmlns="http://www.netbeans.org/ns/j2se-project/2">
+        <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
             <name>PenDecoder</name>
-            <minimum-ant-version>1.6</minimum-ant-version>
+            <minimum-ant-version>1.6.5</minimum-ant-version>
             <source-roots>
                 <root id="src.dir"/>
             </source-roots>

Modified: TeamTalk/Agents/PenDecoder/src/edu/cmu/ravenclaw/pendecoder/DrawingCanvas.java
===================================================================
--- TeamTalk/Agents/PenDecoder/src/edu/cmu/ravenclaw/pendecoder/DrawingCanvas.java	2007-07-18 21:35:40 UTC (rev 661)
+++ TeamTalk/Agents/PenDecoder/src/edu/cmu/ravenclaw/pendecoder/DrawingCanvas.java	2007-07-19 21:33:55 UTC (rev 662)
@@ -18,10 +18,7 @@
 import java.awt.geom.NoninvertibleTransformException;
 import java.util.EventListener;
 import javax.swing.*;
-import net.sourceforge.jiu.codecs.CodecMode;
-import net.sourceforge.jiu.codecs.PNGCodec;
-import net.sourceforge.jiu.data.PixelImage;
-import net.sourceforge.jiu.gui.awt.ImageCreator;
+import javax.imageio.ImageIO;
 
 public class DrawingCanvas extends JComponent implements Scrollable {
   
@@ -72,11 +69,7 @@
       System.exit(1);
     }
     try {
-      PNGCodec codec = new PNGCodec();
-      codec.setFile(mapfile, CodecMode.LOAD);
-      codec.process();
-      PixelImage pixelimage = codec.getImage();
-      backImage = new MapBufferedImage(ImageCreator.convertToAwtImage(pixelimage, ImageCreator.DEFAULT_ALPHA));
+      backImage = new MapBufferedImage(ImageIO.read(new File(mapfile)));
       image_width_in_pixels = backImage.getWidth(this);
       image_height_in_pixels = backImage.getHeight(this);
       setPreferredSize(new Dimension((int)image_width_in_pixels, 


More information about the TeamTalk-developers mailing list