Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use new processing library scheme

  • Loading branch information...
commit 766f44408cb95dab05a58303649a14c80d12a4fe 1 parent 09fa877
@jdf authored
View
39 build.xml
@@ -16,10 +16,11 @@
<property name="javaVersion" value="1.5" />
- <property name="author" value="Jonathan Feinberg" />
+ <property file="library.properties" prefix="library" />
+
+ <property name="author" value="Jonathan Feinberg" />
<property name="copyright" value="(c) 2011" />
- <property name="libraryName" value="PeasyCam" />
- <property name="versionNumber" value="0.92" />
+ <property name="libraryName" value="peasycam" />
<property name="yourLink" value="http://mrfeinberg.com" />
<property name="keywords" value="3D,camera,rotation" />
<property name="tested:platform" value="Windows" />
@@ -79,14 +80,14 @@
<echo message="Bump version number in applet"/>
<replaceregexp
match='VERSION = "[^"]+"'
- replace='VERSION = "${versionNumber}"'
+ replace='VERSION = "${library.version}"'
file="${src}/peasy/PeasyCam.java"/>
<echo message="bin: ${bin}"/>
<echo message="javaVersion: ${javaVersion}"/>
<echo message="library-classpath$ ${library-classpath}"/>
<mkdir dir="${bin}"/>
- <javac destdir="${bin}" source="${javaVersion}">
+ <javac target="${javaVersion}" destdir="${bin}" source="${javaVersion}">
<classpath>
<path refid="library-classpath" />
</classpath>
@@ -110,13 +111,16 @@
<mkdir dir="${realDist}/reference" />
<mkdir dir="${realDist}/src" />
<jar jarfile="${realDist}/library/${jarFile}" basedir="${bin}" />
+
+ <copy todir="${realDist}" file="library.properties"/>
+
<copy todir="${realDist}/examples">
<fileset dir="examples" />
</copy>
<copy todir="${realDist}/src">
<fileset dir="src" />
</copy>
- <copy todir="web" file="${realDist}/library/${jarFile}"/>
+ <copy todir="web" file="${realDist}/library/${jarFile}"/>
<copy todir="../Patchy/web" file="${realDist}/library/${jarFile}"/>
<!-- create the java reference of the library -->
@@ -140,7 +144,7 @@
<!-- zip the distribution of the library -->
<zip destfile="${dist}/${libraryName}.zip" basedir="${dist}" excludes="**/_DS.Store,**/applet/**" />
- <move file="${dist}/${libraryName}.zip" tofile="${dist}/${libraryName}_${versionNumber}.zip" />
+ <copy file="${dist}/${libraryName}.zip" tofile="${dist}/${libraryName}_${library.version}.zip" />
<!-- organize the ${dist} folder -->
<mkdir dir="${dist}/web" />
@@ -158,27 +162,15 @@
<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.
- -->
+ <copy tofile="${dist}/web/peasycam.txt" file="library.properties"/>
<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="##versionNumber##" replace="${library.version}" 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" />
@@ -186,7 +178,6 @@
<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>
@@ -195,8 +186,8 @@
<!-- finish organizating library's distribution -->
- <mkdir dir="${dist}/web/download" />
- <copy file="${dist}/${libraryName}_${versionNumber}.zip" todir="${dist}/web/download" />
+ <copy file="${dist}/${libraryName}.zip" todir="${dist}/web" />
+ <copy file="${dist}/${libraryName}_${library.version}.zip" todir="${dist}/web" />
<copy todir="${processingLibraries}/peasycam/reference">
<fileset dir="${reference}" />
View
6 library.properties
@@ -0,0 +1,6 @@
+name = PeasyCam
+authorList = [Jonathan Feinberg](http://mrfeinberg.com/)
+url = http://mrfeinberg.com/peasycam/
+category = 3D
+sentence = A mouse driven camera-control library for 3D sketches.
+version = 101
View
2  src/peasy/PeasyCam.java
@@ -102,7 +102,7 @@ public void handleWheel(final int delta) {
private final PMatrix3D originalMatrix; // for HUD restore
- public final String VERSION = "0.92";
+ public final String VERSION = "101";
public PeasyCam(final PApplet parent, final double distance) {
this(parent, 0, 0, 0, distance);
View
8 web/index.html
@@ -44,11 +44,11 @@
<!--[if !IE]> -->
<object classid="java:HelloPeasy.class"
type="application/x-java-applet"
- archive="HelloPeasy.jar,PeasyCam.jar,core.jar"
+ archive="HelloPeasy.jar,peasycam.jar,core.jar"
width="200" height="200"
standby="Loading Processing software..." >
- <param name="archive" value="HelloPeasy.jar,PeasyCam.jar,core.jar" />
+ <param name="archive" value="HelloPeasy.jar,peasycam.jar,core.jar" />
<param name="mayscript" value="true" />
<param name="scriptable" value="true" />
@@ -66,7 +66,7 @@
standby="Loading Processing software..." >
<param name="code" value="HelloPeasy" />
- <param name="archive" value="HelloPeasy.jar,PeasyCam.jar,core.jar" />
+ <param name="archive" value="HelloPeasy.jar,peasycam.jar,core.jar" />
<param name="mayscript" value="true" />
<param name="scriptable" value="true" />
@@ -185,7 +185,7 @@
<h2>Download</h2>
<p>
Download ##yourLibrary## version ##versionNumber## in
- <a href="./download/##yourLibrary##_##versionNumber##.zip">.zip format</a>.
+ <a href="##yourLibrary##_##versionNumber##.zip">.zip format</a>.
</p>
<h2>Installation</h2>
<p>
Please sign in to comment.
Something went wrong with that request. Please try again.