You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@etch.apache.org by re...@apache.org on 2009/01/12 18:11:30 UTC

svn commit: r733843 - in /incubator/etch/trunk/examples: distmap/build.xml distmap/dist-README.txt distmap/dist-build.xml example/build.xml example/dist-README.txt example/dist-build.xml perf/build.xml perf/dist-README.txt perf/dist-build.xml

Author: rebarraz
Date: Mon Jan 12 09:11:12 2009
New Revision: 733843

URL: http://svn.apache.org/viewvc?rev=733843&view=rev
Log:
fix for ETCH-13: added examples to distribution

Added:
    incubator/etch/trunk/examples/distmap/dist-README.txt   (with props)
    incubator/etch/trunk/examples/distmap/dist-build.xml   (with props)
    incubator/etch/trunk/examples/example/dist-README.txt   (with props)
    incubator/etch/trunk/examples/example/dist-build.xml   (with props)
    incubator/etch/trunk/examples/perf/dist-README.txt   (with props)
    incubator/etch/trunk/examples/perf/dist-build.xml   (with props)
Modified:
    incubator/etch/trunk/examples/distmap/build.xml
    incubator/etch/trunk/examples/example/build.xml
    incubator/etch/trunk/examples/perf/build.xml

Modified: incubator/etch/trunk/examples/distmap/build.xml
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/distmap/build.xml?rev=733843&r1=733842&r2=733843&view=diff
==============================================================================
--- incubator/etch/trunk/examples/distmap/build.xml (original)
+++ incubator/etch/trunk/examples/distmap/build.xml Mon Jan 12 09:11:12 2009
@@ -82,6 +82,7 @@
     <property name="main-src-java"     location="${src}/main/java" />
     <property name="test-src-java"     location="${src}/test/java" />
     <property name="target"            location="${basedir}/target" />
+    <property name="dist-src"          location="${target}/dist-src" />
     <property name="generated-sources" location="${target}/generated-sources" />
     <property name="gen-src-java"      location="${generated-sources}/main/etch/java" />
     <property name="gen-src-csharp"    location="${generated-sources}/main/etch/csharp" />
@@ -90,10 +91,12 @@
     <property name="classes-test"      location="${target}/classes-test" />
     <property name="test-results"      location="${target}/test-results" />
     <property name="nunit-results"     location="${target}/nunit-results" />
+    <property name="dist"              location="${basedir}/../../target/Installers/dist" />
 
     <!-- initialize -->
     <target name="init" >
         <mkdir dir="${target}" />
+        <mkdir dir="${dist-src}" />
         <mkdir dir="${generated-sources}" />
         <mkdir dir="${gen-src-java}" />
         <mkdir dir="${gen-src-csharp}" />
@@ -226,15 +229,20 @@
 
 Build Complete!
 
-To run the distmap example, open two command-windows in this directory.
+To run java distributed map, open a cmd window and run these
+commands:
 
-cmd-window-1:
-  > cd target/bin
-  > java -cp distmap.jar etch.examples.distmap.MainDistributedHashTableListener
-
-cmd-window-2:
-  > cd target/bin
-  > java -cp distmap.jar etch.examples.distmap.MainDistributedHashTableClient
+> cd target\bin
+> start java -cp distmap.jar etch.examples.distmap.MainDistributedHashTableListener
+> start java -cp distmap.jar etch.examples.distmap.MainDistributedHashTableClient
+
+To run csharp distributed map:
+
+> cd target\bin
+> start DistMapListener.exe
+> start DistMapClient.exe
+
+You can mix and match the various clients and listeners.
 
         </echo>
     </target>
@@ -248,8 +256,38 @@
         <property name="build.target" value="Release" />
     </target>
 
-    <target name="debug" depends="init-debug,test" />
-    <target name="release" depends="init-release,test" />
+     <target name="dist-src" >
+        <copy file="dist-build.xml" tofile="${dist-src}/build.xml" overwrite="true" />
+        <copy file="dist-README.txt" tofile="${dist-src}/README.txt" overwrite="true" />
+        
+        <copy todir="${dist-src}/src/main/etch" overwrite="true" >
+            <fileset dir="${src}/main/etch" >
+                <exclude name="**/.svn/**" />
+                <include name="**/*.etch" />
+            </fileset>
+        </copy>
+        
+        <copy todir="${dist-src}/src/main/java" overwrite="true" >
+            <fileset dir="${src}/main/java" >
+                <exclude name="**/.svn/**" />
+                <include name="**/*.java" />
+            </fileset>
+        </copy>
+        
+        <copy todir="${dist-src}/src/main/csharp" overwrite="true" >
+            <fileset dir="${src}/main/csharp" >
+                <exclude name="**/.svn/**" />
+                <include name="**/*.cs" />
+            </fileset>
+        </copy>
+        
+        <copy todir="${dist}/examples/distmap" overwrite="true" >
+            <fileset dir="${dist-src}" />
+        </copy>
+    </target>
+    
+    <target name="debug" depends="dist-src,init-debug,test" />
+    <target name="release" depends="dist-src,init-release,test" />
 
     <!-- clean -->
     <target name="clean" >

Added: incubator/etch/trunk/examples/distmap/dist-README.txt
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/distmap/dist-README.txt?rev=733843&view=auto
==============================================================================
--- incubator/etch/trunk/examples/distmap/dist-README.txt (added)
+++ incubator/etch/trunk/examples/distmap/dist-README.txt Mon Jan 12 09:11:12 2009
@@ -0,0 +1,28 @@
+To get started with the example you will need jdk 1.5.0_x,
+where x is pretty recent (>= 15), or any release of jdk 1.6.
+You will also need ant 1.7.0, with ant .net plugin if you
+want to build csharp. You will also need microsoft .net
+sdk 2.0 for csharp builds.
+
+To build:
+
+> ant
+
+This will run the default target which will build both java
+and csharp programs. You can also use build-java or build-csharp
+targets to build only java or only csharp.
+
+To run java distributed map, open a cmd window and run these
+commands:
+
+> cd target\bin
+> start java -cp distmap.jar etch.examples.distmap.MainDistributedHashTableListener
+> start java -cp distmap.jar etch.examples.distmap.MainDistributedHashTableClient
+
+To run csharp distributed map:
+
+> cd target\bin
+> start DistMapListener.exe
+> start DistMapClient.exe
+
+You can mix and match the various clients and listeners.

Propchange: incubator/etch/trunk/examples/distmap/dist-README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/etch/trunk/examples/distmap/dist-README.txt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: incubator/etch/trunk/examples/distmap/dist-build.xml
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/distmap/dist-build.xml?rev=733843&view=auto
==============================================================================
--- incubator/etch/trunk/examples/distmap/dist-build.xml (added)
+++ incubator/etch/trunk/examples/distmap/dist-build.xml Mon Jan 12 09:11:12 2009
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project name="etch-distmap-example" basedir="." default="build">
+    <description>Distributed Map Example</description>
+
+    <property name="etch.home" location="${basedir}/../.."/>
+    <property name="etch.version" value="1.0.1"/>
+    <property name="etch-java-runtime-name" value="etch-java-runtime-${etch.version}.jar"/>
+
+    <property name="etch-ant-plugin.jar"   location="${etch.home}/lib/etch-ant-plugin-${etch.version}.jar"/>
+    <property name="etch-java-runtime.jar" location="${etch.home}/lib/${etch-java-runtime-name}"/>
+    <property name="etch.dll"              location="${etch.home}/lib/Etch.dll"/>
+
+    <property name="src"               location="${basedir}/src"/>
+    <property name="src-main-etch"     location="${src}/main/etch"/>
+    <property name="src-main-java"     location="${src}/main/java"/>
+    <property name="src-main-csharp"   location="${src}/main/csharp"/>
+    <property name="target"            location="${basedir}/target"/>
+    <property name="generated-sources" location="${target}/generated-sources"/>
+    <property name="gensrc-main-etch-java" location="${generated-sources}/main/etch/java"/>
+    <property name="gensrc-main-etch-csharp" location="${generated-sources}/main/etch/csharp"/>
+    <property name="classes"           location="${target}/classes"/>
+    <property name="bin"               location="${target}/bin"/>
+    
+    <condition property="BUILD.csharp" >
+        <os family="windows" />
+    </condition>    
+
+    <taskdef
+        resource="etch/tools/ant/etch.xml"
+        classpath="${etch-ant-plugin.jar}"/>
+
+    <target name="build" depends="build-java, build-csharp, done"/>
+
+    <target name="build-java" depends="gensrc-java">
+        <javac destdir="${classes}" source="1.5" debug="true">
+            <classpath>
+                <pathelement location="${etch-java-runtime.jar}"/>
+            </classpath>
+            <src path="${src-main-java}"/>
+            <src path="${gensrc-main-etch-java}"/>
+        </javac>
+
+        <jar jarfile="${bin}/distmap.jar">
+            <manifest>
+                <attribute name="Class-Path" value="${etch-java-runtime-name}"/>
+            </manifest>
+            <fileset dir="${classes}"/>
+        </jar>
+
+        <copy todir="${bin}" file="${etch-java-runtime.jar}"/>
+    </target>
+
+    <target name="done">
+        <echo>
+
+To run java distributed map, open a cmd window and run these
+commands:
+
+> cd target\bin
+> start java -cp distmap.jar etch.examples.distmap.MainDistributedHashTableListener
+> start java -cp distmap.jar etch.examples.distmap.MainDistributedHashTableClient
+
+To run csharp distributed map:
+
+> cd target\bin
+> start DistMapListener.exe
+> start DistMapClient.exe
+
+You can mix and match the various clients and listeners.
+
+        </echo>
+    </target>
+
+    <target name="build-csharp" depends="gensrc-csharp" if="BUILD.csharp" >
+        <csc
+                debug="true"
+                warnLevel="1"
+                unsafe="false"
+                targetType="exe"
+                incremental="false"
+                mainClass = "etch.examples.distmap.MainDistributedHashTableClient"
+                destFile="${bin}/DistMapClient.exe">
+            <src dir="${src-main-csharp}/DistMapClientProj" includes="**/*.cs"/>
+            <src dir="${src-main-csharp}/etch.examples.distmap" includes="**/*.cs"/>
+            <src dir="${gensrc-main-etch-csharp}" includes="**/*.cs"/>
+            <reference file="${etch.dll}"/>
+        </csc>
+
+        <csc
+                debug="true"
+                warnLevel="1"
+                unsafe="false"
+                targetType="exe"
+                incremental="false"
+                mainClass = "etch.examples.distmap.MainDistributedHashTableListener"
+                destFile="${bin}/DistMapListener.exe">
+            <src dir="${src-main-csharp}/DistMapListenerProj" includes="**/*.cs"/>
+            <src dir="${src-main-csharp}/etch.examples.distmap" includes="**/*.cs"/>
+            <src dir="${gensrc-main-etch-csharp}" includes="**/*.cs"/>
+            <reference file="${etch.dll}"/>
+        </csc>
+
+        <copy todir="${bin}" file="${etch.dll}"/>
+    </target>
+
+    <target name="gensrc" depends="gensrc-java, gensrc-csharp"/>
+
+    <target name="gensrc-java" depends="init">
+        <etch
+            home="${etch.home}"
+            binding="java"
+            quiet="true"
+            outputDir="${gensrc-main-etch-java}"
+            file="${src-main-etch}/DistributedHashTable.etch"/>
+    </target>
+
+    <target name="gensrc-csharp" depends="init">
+        <etch
+            home="${etch.home}"
+            binding="csharp"
+            quiet="true"
+            outputDir="${gensrc-main-etch-csharp}"
+            file="${src-main-etch}/DistributedHashTable.etch"/>
+    </target>
+
+    <target name="init">
+        <mkdir dir="${target}"/>
+        <mkdir dir="${generated-sources}"/>
+        <mkdir dir="${gensrc-main-etch-java}"/>
+        <mkdir dir="${gensrc-main-etch-csharp}"/>
+        <mkdir dir="${classes}"/>
+        <mkdir dir="${bin}"/>
+    </target>
+
+    <target name="clean">
+        <delete dir="${target}"/>
+    </target>
+</project>

Propchange: incubator/etch/trunk/examples/distmap/dist-build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/etch/trunk/examples/distmap/dist-build.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: incubator/etch/trunk/examples/example/build.xml
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/example/build.xml?rev=733843&r1=733842&r2=733843&view=diff
==============================================================================
--- incubator/etch/trunk/examples/example/build.xml (original)
+++ incubator/etch/trunk/examples/example/build.xml Mon Jan 12 09:11:12 2009
@@ -82,6 +82,7 @@
     <property name="main-src-java"     location="${src}/main/java" />
     <property name="test-src-java"     location="${src}/test/java" />
     <property name="target"            location="${basedir}/target" />
+    <property name="dist-src"          location="${target}/dist-src" />
     <property name="generated-sources" location="${target}/generated-sources" />
     <property name="gen-src-java"      location="${generated-sources}/main/etch/java" />
     <property name="gen-src-csharp"    location="${generated-sources}/main/etch/csharp" />
@@ -90,10 +91,12 @@
     <property name="classes-test"      location="${target}/classes-test" />
     <property name="test-results"      location="${target}/test-results" />
     <property name="nunit-results"     location="${target}/nunit-results" />
+    <property name="dist"              location="${basedir}/../../target/Installers/dist" />
 
     <!-- initialize -->
     <target name="init" >
         <mkdir dir="${target}" />
+        <mkdir dir="${dist-src}" />
         <mkdir dir="${generated-sources}" />
         <mkdir dir="${gen-src-java}" />
         <mkdir dir="${gen-src-csharp}" />
@@ -226,18 +229,23 @@
 
 Build Complete!
 
-To run the example example, open two command-windows in this directory.
+To run java example example, open a cmd window and run these
+commands:
 
-cmd-window-1:
-  > cd target/bin
-  > java -cp example.jar etch.examples.example.MainExampleListener
-
-cmd-window-2:
-  > cd target/bin
-  > java -cp example.jar etch.examples.example.MainExampleClient
+> cd target\bin
+> start java -cp example.jar etch.examples.example.MainExmapleListener
+> start java -cp example.jar etch.examples.example.MainExampleClient
+
+To run csharp example:
+
+> cd target\bin
+> start exampleListener.exe
+> start exampleClient.exe
 
 Now modify the example to implement the service however you like.
 
+You can mix and match the various clients and listeners.
+
         </echo>
     </target>
 
@@ -249,9 +257,39 @@
     <target name="init-release" >
         <property name="build.target" value="Release" />
     </target>
+    
+    <target name="dist-src" >
+        <copy file="dist-build.xml" tofile="${dist-src}/build.xml" overwrite="true" />
+        <copy file="dist-README.txt" tofile="${dist-src}/README.txt" overwrite="true" />
+        
+        <copy todir="${dist-src}/src/main/etch" overwrite="true" >
+            <fileset dir="${src}/main/etch" >
+                <exclude name="**/.svn/**" />
+                <include name="**/*.etch" />
+            </fileset>
+        </copy>
+        
+        <copy todir="${dist-src}/src/main/java" overwrite="true" >
+            <fileset dir="${src}/main/java" >
+                <exclude name="**/.svn/**" />
+                <include name="**/*.java" />
+            </fileset>
+        </copy>
+        
+        <copy todir="${dist-src}/src/main/csharp" overwrite="true" >
+            <fileset dir="${src}/main/csharp" >
+                <exclude name="**/.svn/**" />
+                <include name="**/*.cs" />
+            </fileset>
+        </copy>
+        
+        <copy todir="${dist}/examples/example" overwrite="true" >
+            <fileset dir="${dist-src}" />
+        </copy>
+    </target>
 
-    <target name="debug" depends="init-debug,test" />
-    <target name="release" depends="init-release,test" />
+    <target name="debug" depends="dist-src,init-debug,test" />
+    <target name="release" depends="dist-src,init-release,test" />
 
     <!-- clean -->
     <target name="clean" >

Added: incubator/etch/trunk/examples/example/dist-README.txt
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/example/dist-README.txt?rev=733843&view=auto
==============================================================================
--- incubator/etch/trunk/examples/example/dist-README.txt (added)
+++ incubator/etch/trunk/examples/example/dist-README.txt Mon Jan 12 09:11:12 2009
@@ -0,0 +1,30 @@
+To get started with the example you will need jdk 1.5.0_x,
+where x is pretty recent (>= 15), or any release of jdk 1.6.
+You will also need ant 1.7.0, with ant .net plugin if you
+want to build csharp. You will also need microsoft .net
+sdk 2.0 for csharp builds.
+
+To build:
+
+> ant
+
+This will run the default target which will build both java
+and csharp programs. You can also use build-java or build-csharp
+targets to build only java or only csharp.
+
+To run java example example, open a cmd window and run these
+commands:
+
+> cd target\bin
+> start java -cp example.jar etch.examples.example.MainExmapleListener
+> start java -cp example.jar etch.examples.example.MainExampleClient
+
+To run csharp example:
+
+> cd target\bin
+> start exampleListener.exe
+> start exampleClient.exe
+
+Now modify the example to implement the service however you like.
+
+You can mix and match the various clients and listeners.

Propchange: incubator/etch/trunk/examples/example/dist-README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/etch/trunk/examples/example/dist-README.txt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: incubator/etch/trunk/examples/example/dist-build.xml
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/example/dist-build.xml?rev=733843&view=auto
==============================================================================
--- incubator/etch/trunk/examples/example/dist-build.xml (added)
+++ incubator/etch/trunk/examples/example/dist-build.xml Mon Jan 12 09:11:12 2009
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project name="etch-example-example" basedir="." default="build">
+    <description>Example Example</description>
+
+    <property name="etch.home" location="${basedir}/../.."/>
+    <property name="etch.version" value="1.0.1"/>
+    <property name="etch-java-runtime-name" value="etch-java-runtime-${etch.version}.jar"/>
+
+    <property name="etch-ant-plugin.jar"   location="${etch.home}/lib/etch-ant-plugin-${etch.version}.jar"/>
+    <property name="etch-java-runtime.jar" location="${etch.home}/lib/${etch-java-runtime-name}"/>
+    <property name="etch.dll"              location="${etch.home}/lib/Etch.dll"/>
+
+    <property name="src"               location="${basedir}/src"/>
+    <property name="src-main-etch"     location="${src}/main/etch"/>
+    <property name="src-main-java"     location="${src}/main/java"/>
+    <property name="src-main-csharp"   location="${src}/main/csharp"/>
+    <property name="target"            location="${basedir}/target"/>
+    <property name="generated-sources" location="${target}/generated-sources"/>
+    <property name="gensrc-main-etch-java" location="${generated-sources}/main/etch/java"/>
+    <property name="gensrc-main-etch-csharp" location="${generated-sources}/main/etch/csharp"/>
+    <property name="classes"           location="${target}/classes"/>
+    <property name="bin"               location="${target}/bin"/>
+    
+    <condition property="BUILD.csharp" >
+        <os family="windows" />
+    </condition>    
+
+    <taskdef
+        resource="etch/tools/ant/etch.xml"
+        classpath="${etch-ant-plugin.jar}"/>
+
+    <target name="build" depends="build-java, build-csharp, done"/>
+
+    <target name="build-java" depends="gensrc-java">
+        <javac destdir="${classes}" source="1.5" debug="true">
+            <classpath>
+                <pathelement location="${etch-java-runtime.jar}"/>
+            </classpath>
+            <src path="${src-main-java}"/>
+            <src path="${gensrc-main-etch-java}"/>
+        </javac>
+
+        <jar jarfile="${bin}/example.jar">
+            <manifest>
+                <attribute name="Class-Path" value="${etch-java-runtime-name}"/>
+            </manifest>
+            <fileset dir="${classes}"/>
+        </jar>
+
+        <copy todir="${bin}" file="${etch-java-runtime.jar}"/>
+    </target>
+
+    <target name="done">
+        <echo>
+
+To run java example example, open a cmd window and run these
+commands:
+
+> cd target\bin
+> start java -cp example.jar etch.examples.example.MainExmapleListener
+> start java -cp example.jar etch.examples.example.MainExampleClient
+
+To run csharp example:
+
+> cd target\bin
+> start exampleListener.exe
+> start exampleClient.exe
+
+Now modify the example to implement the service however you like.
+
+You can mix and match the various clients and listeners.
+
+        </echo>
+    </target>
+
+    <target name="build-csharp" depends="gensrc-csharp" if="BUILD.csharp" >
+        <csc
+                debug="true"
+                warnLevel="1"
+                unsafe="false"
+                targetType="exe"
+                incremental="false"
+                mainClass = "etch.examples.example.MainExampleClient"
+                destFile="${bin}/exampleClient.exe">
+            <src dir="${src-main-csharp}/exampleClientProj" includes="**/*.cs"/>
+            <src dir="${src-main-csharp}/etch.examples.example" includes="**/*.cs"/>
+            <src dir="${gensrc-main-etch-csharp}" includes="**/*.cs"/>
+            <reference file="${etch.dll}"/>
+        </csc>
+
+        <csc
+                debug="true"
+                warnLevel="1"
+                unsafe="false"
+                targetType="exe"
+                incremental="false"
+                mainClass = "etch.examples.example.MainExampleListener"
+                destFile="${bin}/exampleListener.exe">
+            <src dir="${src-main-csharp}/exampleListenerProj" includes="**/*.cs"/>
+            <src dir="${src-main-csharp}/etch.examples.example" includes="**/*.cs"/>
+            <src dir="${gensrc-main-etch-csharp}" includes="**/*.cs"/>
+            <reference file="${etch.dll}"/>
+        </csc>
+
+        <copy todir="${bin}" file="${etch.dll}"/>
+    </target>
+
+    <target name="gensrc" depends="gensrc-java, gensrc-csharp"/>
+
+    <target name="gensrc-java" depends="init">
+        <etch
+            home="${etch.home}"
+            binding="java"
+            quiet="true"
+            outputDir="${gensrc-main-etch-java}"
+            file="${src-main-etch}/Example.etch"/>
+    </target>
+
+    <target name="gensrc-csharp" depends="init">
+        <etch
+            home="${etch.home}"
+            binding="csharp"
+            quiet="true"
+            outputDir="${gensrc-main-etch-csharp}"
+            file="${src-main-etch}/Example.etch"/>
+    </target>
+
+    <target name="init">
+        <mkdir dir="${target}"/>
+        <mkdir dir="${generated-sources}"/>
+        <mkdir dir="${gensrc-main-etch-java}"/>
+        <mkdir dir="${gensrc-main-etch-csharp}"/>
+        <mkdir dir="${classes}"/>
+        <mkdir dir="${bin}"/>
+    </target>
+
+    <target name="clean">
+        <delete dir="${target}"/>
+    </target>
+</project>

Propchange: incubator/etch/trunk/examples/example/dist-build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/etch/trunk/examples/example/dist-build.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: incubator/etch/trunk/examples/perf/build.xml
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/perf/build.xml?rev=733843&r1=733842&r2=733843&view=diff
==============================================================================
--- incubator/etch/trunk/examples/perf/build.xml (original)
+++ incubator/etch/trunk/examples/perf/build.xml Mon Jan 12 09:11:12 2009
@@ -82,6 +82,7 @@
     <property name="main-src-java"     location="${src}/main/java" />
     <property name="test-src-java"     location="${src}/test/java" />
     <property name="target"            location="${basedir}/target" />
+    <property name="dist-src"          location="${target}/dist-src" />
     <property name="generated-sources" location="${target}/generated-sources" />
     <property name="gen-src-java"      location="${generated-sources}/main/etch/java" />
     <property name="gen-src-csharp"    location="${generated-sources}/main/etch/csharp" />
@@ -90,10 +91,12 @@
     <property name="classes-test"      location="${target}/classes-test" />
     <property name="test-results"      location="${target}/test-results" />
     <property name="nunit-results"     location="${target}/nunit-results" />
+    <property name="dist"              location="${basedir}/../../target/Installers/dist" />
 
     <!-- initialize -->
     <target name="init" >
         <mkdir dir="${target}" />
+        <mkdir dir="${dist-src}" />
         <mkdir dir="${generated-sources}" />
         <mkdir dir="${gen-src-java}" />
         <mkdir dir="${gen-src-csharp}" />
@@ -226,15 +229,20 @@
 
 Build Complete!
 
-To run the perf example, open two command-windows in this directory.
+To run java performance example, open a cmd window and run these
+commands:
 
-cmd-window-1:
-  > cd target/bin
-  > java -cp perf.jar etch.examples.perf.MainPerfListener
-
-cmd-window-2:
-  > cd target/bin
-  > java -cp perf.jar etch.examples.perf.MainPerfClient
+> cd target\bin
+> start java -cp perf.jar etch.examples.perf.MainPerfListener
+> start java -cp perf.jar etch.examples.perf.MainPerfClient
+
+To run csharp example:
+
+> cd target\bin
+> start perfListener.exe
+> start perfClient.exe
+
+You can mix and match the various clients and listeners.
 
         </echo>
     </target>
@@ -248,8 +256,38 @@
         <property name="build.target" value="Release" />
     </target>
 
-    <target name="debug" depends="init-debug,test" />
-    <target name="release" depends="init-release,test" />
+   <target name="dist-src" >
+        <copy file="dist-build.xml" tofile="${dist-src}/build.xml" overwrite="true" />
+        <copy file="dist-README.txt" tofile="${dist-src}/README.txt" overwrite="true" />
+        
+        <copy todir="${dist-src}/src/main/etch" overwrite="true" >
+            <fileset dir="${src}/main/etch" >
+                <exclude name="**/.svn/**" />
+                <include name="**/*.etch" />
+            </fileset>
+        </copy>
+        
+        <copy todir="${dist-src}/src/main/java" overwrite="true" >
+            <fileset dir="${src}/main/java" >
+                <exclude name="**/.svn/**" />
+                <include name="**/*.java" />
+            </fileset>
+        </copy>
+        
+        <copy todir="${dist-src}/src/main/csharp" overwrite="true" >
+            <fileset dir="${src}/main/csharp" >
+                <exclude name="**/.svn/**" />
+                <include name="**/*.cs" />
+            </fileset>
+        </copy>
+        
+        <copy todir="${dist}/examples/perf" overwrite="true" >
+            <fileset dir="${dist-src}" />
+        </copy>
+    </target>
+
+    <target name="debug" depends="dist-src,init-debug,test" />
+    <target name="release" depends="dist-src,init-release,test" />
 
     <!-- clean -->
     <target name="clean" >

Added: incubator/etch/trunk/examples/perf/dist-README.txt
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/perf/dist-README.txt?rev=733843&view=auto
==============================================================================
--- incubator/etch/trunk/examples/perf/dist-README.txt (added)
+++ incubator/etch/trunk/examples/perf/dist-README.txt Mon Jan 12 09:11:12 2009
@@ -0,0 +1,28 @@
+To get started with the example you will need jdk 1.5.0_x,
+where x is pretty recent (>= 15), or any release of jdk 1.6.
+You will also need ant 1.7.0, with ant .net plugin if you
+want to build csharp. You will also need microsoft .net
+sdk 2.0 for csharp builds.
+
+To build:
+
+> ant
+
+This will run the default target which will build both java
+and csharp programs. You can also use build-java or build-csharp
+targets to build only java or only csharp.
+
+To run java performance example, open a cmd window and run these
+commands:
+
+> cd target\bin
+> start java -cp perf.jar etch.examples.perf.MainPerfListener
+> start java -cp perf.jar etch.examples.perf.MainPerfClient
+
+To run csharp example:
+
+> cd target\bin
+> start perfListener.exe
+> start perfClient.exe
+
+You can mix and match the various clients and listeners.

Propchange: incubator/etch/trunk/examples/perf/dist-README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/etch/trunk/examples/perf/dist-README.txt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: incubator/etch/trunk/examples/perf/dist-build.xml
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/perf/dist-build.xml?rev=733843&view=auto
==============================================================================
--- incubator/etch/trunk/examples/perf/dist-build.xml (added)
+++ incubator/etch/trunk/examples/perf/dist-build.xml Mon Jan 12 09:11:12 2009
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project name="etch-perf-perf" basedir="." default="build">
+    <description>Perf Perf</description>
+
+    <property name="etch.home" location="${basedir}/../.."/>
+    <property name="etch.version" value="1.0.1"/>
+    <property name="etch-java-runtime-name" value="etch-java-runtime-${etch.version}.jar"/>
+
+    <property name="etch-ant-plugin.jar"   location="${etch.home}/lib/etch-ant-plugin-${etch.version}.jar"/>
+    <property name="etch-java-runtime.jar" location="${etch.home}/lib/${etch-java-runtime-name}"/>
+    <property name="etch.dll"              location="${etch.home}/lib/Etch.dll"/>
+
+    <property name="src"               location="${basedir}/src"/>
+    <property name="src-main-etch"     location="${src}/main/etch"/>
+    <property name="src-main-java"     location="${src}/main/java"/>
+    <property name="src-main-csharp"   location="${src}/main/csharp"/>
+    <property name="target"            location="${basedir}/target"/>
+    <property name="generated-sources" location="${target}/generated-sources"/>
+    <property name="gensrc-main-etch-java" location="${generated-sources}/main/etch/java"/>
+    <property name="gensrc-main-etch-csharp" location="${generated-sources}/main/etch/csharp"/>
+    <property name="classes"           location="${target}/classes"/>
+    <property name="bin"               location="${target}/bin"/>
+    
+    <condition property="BUILD.csharp" >
+        <os family="windows" />
+    </condition>    
+
+    <taskdef
+        resource="etch/tools/ant/etch.xml"
+        classpath="${etch-ant-plugin.jar}"/>
+
+    <target name="build" depends="build-java, build-csharp, done"/>
+
+    <target name="build-java" depends="gensrc-java">
+        <javac destdir="${classes}" source="1.5" debug="true">
+            <classpath>
+                <pathelement location="${etch-java-runtime.jar}"/>
+            </classpath>
+            <src path="${src-main-java}"/>
+            <src path="${gensrc-main-etch-java}"/>
+        </javac>
+
+        <jar jarfile="${bin}/perf.jar">
+            <manifest>
+                <attribute name="Class-Path" value="${etch-java-runtime-name}"/>
+            </manifest>
+            <fileset dir="${classes}"/>
+        </jar>
+
+        <copy todir="${bin}" file="${etch-java-runtime.jar}"/>
+    </target>
+
+    <target name="done">
+        <echo>
+
+To run java performance example, open a cmd window and run these
+commands:
+
+> cd target\bin
+> start java -cp perf.jar etch.examples.perf.MainPerfListener
+> start java -cp perf.jar etch.examples.perf.MainPerfClient
+
+To run csharp example:
+
+> cd target\bin
+> start perfListener.exe
+> start perfClient.exe
+
+You can mix and match the various clients and listeners.
+
+        </echo>
+    </target>
+
+    <target name="build-csharp" depends="gensrc-csharp" if="BUILD.csharp" >
+        <csc
+                debug="true"
+                warnLevel="1"
+                unsafe="false"
+                targetType="exe"
+                incremental="false"
+                mainClass = "etch.examples.perf.MainPerfClient"
+                destFile="${bin}/perfClient.exe">
+            <src dir="${src-main-csharp}/perfClientProj" includes="**/*.cs"/>
+            <src dir="${src-main-csharp}/etch.examples.perf" includes="**/*.cs"/>
+            <src dir="${gensrc-main-etch-csharp}" includes="**/*.cs"/>
+            <reference file="${etch.dll}"/>
+        </csc>
+
+        <csc
+                debug="true"
+                warnLevel="1"
+                unsafe="false"
+                targetType="exe"
+                incremental="false"
+                mainClass = "etch.examples.perf.MainPerfListener"
+                destFile="${bin}/perfListener.exe">
+            <src dir="${src-main-csharp}/perfListenerProj" includes="**/*.cs"/>
+            <src dir="${src-main-csharp}/etch.examples.perf" includes="**/*.cs"/>
+            <src dir="${gensrc-main-etch-csharp}" includes="**/*.cs"/>
+            <reference file="${etch.dll}"/>
+        </csc>
+
+        <copy todir="${bin}" file="${etch.dll}"/>
+    </target>
+
+    <target name="gensrc" depends="gensrc-java, gensrc-csharp"/>
+
+    <target name="gensrc-java" depends="init">
+        <etch
+            home="${etch.home}"
+            binding="java"
+            quiet="true"
+            outputDir="${gensrc-main-etch-java}"
+            file="${src-main-etch}/Perf.etch"/>
+    </target>
+
+    <target name="gensrc-csharp" depends="init">
+        <etch
+            home="${etch.home}"
+            binding="csharp"
+            quiet="true"
+            outputDir="${gensrc-main-etch-csharp}"
+            file="${src-main-etch}/Perf.etch"/>
+    </target>
+
+    <target name="init">
+        <mkdir dir="${target}"/>
+        <mkdir dir="${generated-sources}"/>
+        <mkdir dir="${gensrc-main-etch-java}"/>
+        <mkdir dir="${gensrc-main-etch-csharp}"/>
+        <mkdir dir="${classes}"/>
+        <mkdir dir="${bin}"/>
+    </target>
+
+    <target name="clean">
+        <delete dir="${target}"/>
+    </target>
+</project>

Propchange: incubator/etch/trunk/examples/perf/dist-build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/etch/trunk/examples/perf/dist-build.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"