Skip to content

Commit 76b6fb0

Browse files
committed
IO: Prepare for standalone distribution in Contribution Manager
1 parent 05995b9 commit 76b6fb0

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

java/libraries/io/build.xml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,46 @@
2929
<target name="build" depends="compile" description="Build I/O library">
3030
<jar basedir="bin" destfile="library/io.jar" />
3131
</target>
32+
33+
<target name="dist" depends="build" description="Package standalone library">
34+
<!-- set revision number as library version -->
35+
<loadfile srcfile="../../../todo.txt" property="revision">
36+
<filterchain>
37+
<headfilter lines="1"/>
38+
<tokenfilter>
39+
<stringtokenizer suppressdelims="true"/>
40+
<!-- grab the thing from the first line that's 4 digits -->
41+
<containsregex pattern="(\d\d\d\d)" />
42+
</tokenfilter>
43+
</filterchain>
44+
</loadfile>
45+
<replaceregexp file="library.properties" match="version = .*" replace="version = ${revision}" flags="g" />
46+
<replaceregexp file="library.properties" match="prettyVersion = .*" replace="prettyVersion = ${revision}" flags="g" />
47+
48+
<get src="http://download.processing.org/reference.zip"
49+
dest="reference.zip"
50+
usetimestamp="true" />
51+
<mkdir dir="reference" />
52+
<unzip dest="."
53+
src="reference.zip"
54+
overwrite="true">
55+
<patternset>
56+
<include name="reference/css/**" />
57+
<include name="reference/img/**" />
58+
<include name="reference/javascript/**" />
59+
<include name="reference/libraries/io/**" />
60+
</patternset>
61+
</unzip>
62+
<delete file="reference.zip" />
63+
<echo file="reference/index.html" message="&lt;html&gt;&lt;head&gt;&lt;meta http-equiv='refresh' content='0; url=libraries/io/index.html'&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;" />
64+
65+
<zip destfile="../io.zip">
66+
<zipfileset dir="." prefix="io">
67+
<exclude name="bin/**"/>
68+
</zipfileset>
69+
</zip>
70+
71+
<copy file="library.properties"
72+
toFile="../io.txt"/>
73+
</target>
3274
</project>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
name = Hardware I/O
2+
authors = The Processing Foundation
3+
url = http://processing.org/reference/libraries/io/index.html
4+
categories = Hardware
5+
sentence = Access peripherals on the Raspberry Pi and other Linux-based computers.
6+
paragraph = For other platforms, this is solely provided in order to build and export sketches that require processing.io.
27
version = 1
8+
prettyVersion = 1
9+
minRevision = 247

0 commit comments

Comments
 (0)