Skip to content

Commit

Permalink
Initial import.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Feinberg committed Jan 12, 2009
1 parent aeef36e commit f93b14f
Show file tree
Hide file tree
Showing 16 changed files with 1,859 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .classpath
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JDK 5"/>
<classpathentry combineaccessrules="false" kind="src" path="/processing-head"/>
<classpathentry kind="output" path="bin"/>
</classpath>
17 changes: 17 additions & 0 deletions .project
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Patchy</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
12 changes: 12 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
#Mon Jan 12 15:48:57 EST 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.5
12 changes: 12 additions & 0 deletions examples/HelloPatchy/HelloPatchy.pde
@@ -0,0 +1,12 @@
import patchy.*;

Patch patch;

void setup() {
size(200,200,P3D);

}
void draw() {
}


199 changes: 199 additions & 0 deletions resources/build.xml
@@ -0,0 +1,199 @@
<project name="processingLibs" default="build" basedir="../">

<description>
Patchy build
</description>

<property name="processing" location="c:/Documents and Settings/Administrator/Desktop/processing-1.0.1/libraries" />

<property name="libraryClasspath" location="${processing}/../lib" />
<path id="library-classpath">
<fileset dir="${libraryClasspath}">
<include name="core.jar" />
</fileset>
</path>

<property name="javaVersion" value="1.5" />

<property name="author" value="Jonathan Feinberg" />
<property name="copyright" value="(c) 2008" />
<property name="libraryName" value="Patchy" />
<property name="versionNumber" value="0.1.0" />
<property name="yourLink" value="http://mrfeinberg.com/" />
<property name="keywords" value="3D,camera,rotation" />
<property name="tested:platform" value="Windows" />
<property name="tested:processingVersion" value="1.0.1" />
<property name="tested:dependencies" value="" />
<property name="source:host" value="google code" />
<property name="source:url" value="http://code.google.com/p/patchy" />
<property name="source:repository" value="http://code.google.com/p/patchy/source/browse/" />


<!-- no changes or adjustments required below -->

<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="./resources/code/ant-contrib-1.0b3.jar" />
</classpath>
</taskdef>
<property name="jarFile" value="${libraryName}.jar" />
<property name="src" location="src" />
<property name="bin" location="bin" />
<property name="reference" location="reference" />
<property name="dist" location="distribution" />



<target name="init">
<echo>Properties initialized.
src path ${src}
bin path ${bin}
libraryClasspath ${libraryClasspath}
processing Libraries ${processing}
java version ${javaVersion}
</echo>
<echo>building library ...</echo>
<!-- Create the time stamp -->
<tstamp>
<format property="date" pattern="MM/dd/yyyy" offset="0" unit="hour" />
</tstamp>
<mkdir dir="${dist}" />
</target>

<!-- compile the library -->
<target name="compile" depends="init" description="compile the source">
<javac destdir="${bin}" source="${javaVersion}">
<classpath>
<path refid="library-classpath" />
</classpath>
<src path="${src}" />
</javac>
</target>

<!-- build the distribution of the library -->
<target name="build" depends="compile" description="generate the distribution">
<!-- delete the previous content of the ${dist} folder -->
<delete dir="${dist}" />

<!-- build the structure for ${dist} -->
<mkdir dir="${dist}" />

<property name="realDist" value="${dist}/patchy"/>
<mkdir dir="${realDist}" />

<mkdir dir="${realDist}/library" />
<mkdir dir="${realDist}/examples" />
<mkdir dir="${realDist}/reference" />
<mkdir dir="${realDist}/src" />
<jar jarfile="${realDist}/library/${jarFile}" basedir="${bin}" />
<copy todir="${realDist}/examples">
<fileset dir="examples" />
</copy>
<copy todir="${realDist}/src">
<fileset dir="src" />
</copy>
<copy todir="web" file="${realDist}/library/${jarFile}"/>

<!-- create the java reference of the library -->
<mkdir dir="${reference}" />
<javadoc bottom="processing library ${libraryName} by ${author}. ${copyright}" classpath="${libraryClasspath}/core.jar" destdir="${reference}" verbose="false" stylesheetfile="resources/stylesheet.css" doctitle="Javadocs: ${libraryName}" public="true" version="false" windowtitle="Javadocs: ${libraryName}">
<taglet name="ExampleTaglet" path="resources/code" />
<fileset dir="${src}" defaultexcludes="yes">
<!-- #### (9) add packages to be added to reference. #### -->
<include name="**/*" />
</fileset>
</javadoc>

<copy todir="${realDist}/reference">
<fileset dir="${reference}" />
</copy>

<!-- copy the jar file to processing's libraries -->
<copy todir="${processing}">
<fileset dir="${dist}" />
</copy>

<!-- zip the distribution of the library -->
<zip destfile="${dist}/${libraryName}.zip" basedir="${dist}" excludes="**/_DS.Store" />

<rename src="${dist}/${libraryName}.zip" dest="${dist}/${libraryName}_${versionNumber}.zip" />

<!-- organize the ${dist} folder -->
<mkdir dir="${dist}/web" />
<move todir="${dist}/web/reference">
<fileset dir="${realDist}/reference" />
</move>

<move todir="${dist}/web/examples">
<fileset dir="${realDist}/examples" />
</move>

<delete dir="${dist}/library" />

<copy todir="${dist}/web">
<fileset dir="web" />
</copy>

<!--
format the index.html file.
regular expressions are used to parse the web index.html file.
key words starting and ending with ## are replaced by values
defined earlier in the beginning of this build file.
-->

<replaceregexp file="${dist}/web/index.html" match="##yourLibrary##" replace="${libraryName}" flags="g" />

<replaceregexp file="${dist}/web/index.html" match="##author##" replace="${author}" flags="g" />

<replaceregexp file="${dist}/web/index.html" match="##versionNumber##" replace="${versionNumber}" flags="g" />

<replaceregexp file="${dist}/web/index.html" match="##yourLink##" replace="${yourLink}" flags="g" />

<replaceregexp file="${dist}/web/index.html" match="##date##" replace="${date}" flags="g" />

<replaceregexp file="${dist}/web/index.html" match="##keywords##" replace="${keywords}" flags="g" />



<replaceregexp file="${dist}/web/index.html" match="##tested:platform##" replace="${tested:platform}" flags="g" />
<replaceregexp file="${dist}/web/index.html" match="##tested:processingVersion##" replace="${tested:processingVersion}" flags="g" />
<replaceregexp file="${dist}/web/index.html" match="##tested:dependencies##" replace="${tested:dependencies}" flags="g" />
<replaceregexp file="${dist}/web/index.html" match="##source:host##" replace="${source:host}" flags="g" />
<replaceregexp file="${dist}/web/index.html" match="##source:url##" replace="${source:url}" flags="g" />
<replaceregexp file="${dist}/web/index.html" match="##source:repository##" replace="${source:repository}" flags="g" />


<echo>---------------------</echo>
<antcall target="processExamples" />
<echo>---------------------</echo>

<replaceregexp file="${dist}/web/index.html" match="##examples##" replace="" flags="g" />


<!-- finish organizating library's distribution -->
<mkdir dir="${dist}/web/download" />
<copy file="${dist}/${libraryName}_${versionNumber}.zip" todir="${dist}/web/download" />

<copy todir="${processing}/${libraryName}/reference">
<fileset dir="${reference}" />
</copy>

<!-- done, finished. -->
<echo>done, finished.</echo>
</target>



<!-- parsing the examples folder -->
<target name="processExamples">
<dirset id="examples.contents" dir="examples" excludes="*/*" />
<property name="examples.list" refid="examples.contents" />
<foreach list="${examples.list}" target="addExamples" param="exampleDir" delimiter=";">
</foreach>
</target>

<target name="addExamples">
<replaceregexp file="${dist}/web/index.html" match="(##examples##)" replace="&lt;li&gt;&lt;a href=&quot;examples/${exampleDir}/${exampleDir}.pde&quot;&gt;${exampleDir}&lt;/a&gt;&lt;/li&gt; \1" flags="g" />
</target>
</project>

0 comments on commit f93b14f

Please sign in to comment.