Skip to content

Commit fcf2df6

Browse files
committed
cleaning up build behavior and readme
1 parent a500bc6 commit fcf2df6

File tree

4 files changed

+75
-76
lines changed

4 files changed

+75
-76
lines changed

.gitignore

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
# Mac fun
21
.DS_Store
2+
*~
3+
4+
local.properties
5+
/BezierSQLib
36

47
# ant-javac build directory
5-
bin/
8+
/bin/
69

710
# hide some results
811
documentation/*

build.xml

+63-57
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,40 @@
11
<project name="BezierSQLib" default="install" basedir="./">
2-
2+
33
<description>
44
BezierSQLib (formerly SQLibrary) build file, based on Processing libraries build file.
55
</description>
6-
6+
77
<target name="settings">
8-
8+
99
<!-- == Change these two for building == -->
10-
11-
<!-- Change to point to Processings library folder (core.jar, etc) -->
12-
<property name="libraryClasspath"
13-
location="/Applications/Processing.app/Contents/Resources/Java/"/>
14-
<property name="processing.classes"
15-
location="/Users/fjenett/Repos/processing/build/macosx/work/Processing.app/Contents/Resources/Java/" />
16-
10+
11+
<property file="local.properties" />
12+
13+
<condition property="props.present">
14+
<available file="local.properties" />
15+
</condition>
16+
17+
<fail unless="processing.dir" message="To make the build work, create a file named local.properties, with the following:
18+
${line.separator}processing.dir=/path/to/processing-git
19+
${line.separator}with the path to where you have the code for Processing checked out. ${line.separator}(This script will look for the 'core' directory inside that folder.)
20+
${line.separator}libraries.dir=/path/to/sketchbook/libraries
21+
${line.separator}with the full path to the 'libraries' folder inside your sketchbook." />
22+
1723
<!-- Change to point to your user libraries folder inside your sketchbook -->
18-
<property name="processing" location="/Users/fjenett/Documents/Processing/libraries"/>
19-
24+
<property name="processing" location="/Users/fjenett/Documents/Processing/libraries"/>
25+
2026
<!-- No changes or adjustments required below -->
2127

2228
<property name="author" value="Florian Jenett"/>
2329
<property name="copyright" value="(c) 2005 - 2012"/>
2430
<property name="libraryName" value="BezierSQLib"/>
25-
<property name="versionNumber" value="0.2.1"/>
31+
<property name="versionNumber" value="0.3.1"/>
2632
<property name="yourLink" value="http://bezier.de/" />
2733
<property name="keywords" value="MySQL, SQLite, PostgreSQL, SQL, database"/>
28-
<property name="javaVersion" value="1.5"/>
34+
<property name="javaVersion" value="1.8"/>
2935

3036
<buildnumber file="resources/build.number" />
31-
37+
3238
<path id="library-classes-add">
3339
<fileset dir="lib">
3440
<include name="mysql-connector-java-3.1.14-bin.jar"/> <!-- MySQL -->
@@ -38,50 +44,50 @@
3844
</path>
3945

4046
<path id="library-classpath">
41-
<fileset dir="${processing.classes}" >
47+
<fileset dir="${processing.dir}" >
4248
<include name="core/library/core.jar"/>
4349
</fileset>
4450
<path refid="library-classes-add" />
4551
</path>
46-
52+
4753
<property name="jarFile" value="${libraryName}.jar"/>
4854
<property name="src" location="src"/>
4955
<property name="bin" location="bin"/>
5056
<property name="javadoc" location="documentation"/>
5157
<property name="dist" value="${libraryName}"/>
5258
<property name="build" location="build"/>
53-
<property name="web" location="../sql-website" />
59+
<property name="web" location="../sql-website" />
5460

5561
</target>
56-
62+
5763
<target name="init" depends="settings">
58-
64+
5965
<echo>
6066
Properties initialized.
6167
src path ${src}
6268
bin path ${bin}
63-
Processing classes ${processing.classes}
64-
processing Libraries ${processing}
69+
Processing dir ${processing.dir}
70+
processing Libraries ${libraries.dir}
6571
java version ${javaVersion}
6672
</echo>
67-
73+
6874
<buildnumber file="lib/build.number"/>
6975
<tstamp>
7076
<format property="date" pattern="MM/dd/yyyy" offset="0" unit="hour"/>
7177
</tstamp>
7278
<echo>Start to build the library ... this is vers. ${versionNumber}, build #${build.number} on ${date}</echo>
73-
79+
7480
<!-- add ant-contrib package, needed for <foreach> -->
7581
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
7682
<classpath>
7783
<pathelement location="lib/ant-contrib-1.0b3.jar"/>
7884
</classpath>
7985
</taskdef>
80-
86+
8187
<mkdir dir="${dist}"/>
8288
</target>
8389

84-
90+
8591
<!-- + + + + + + + + + + + + + + + + + + + + + + +
8692
COMPILE, BUILD
8793
+ + + + + + + + + + + + + + + + + + + + + + + -->
@@ -103,11 +109,11 @@ java version ${javaVersion}
103109
<mkdir dir="${javadoc}" />
104110

105111
<javadoc bottom="Processing library ${libraryName} (formerly SQLibrary) by ${author}. ${copyright}"
106-
destdir="${javadoc}"
107-
verbose="false"
108-
stylesheetfile="resources/stylesheet.css"
109-
doctitle="Javadocs: ${libraryName}"
110-
public="true" version="false"
112+
destdir="${javadoc}"
113+
verbose="false"
114+
stylesheetfile="resources/stylesheet.css"
115+
doctitle="Javadocs: ${libraryName}"
116+
public="true" version="false"
111117
windowtitle="Javadocs: ${libraryName} (formerly SQLibrary)">
112118
<fileset dir="${src}" defaultexcludes="yes">
113119
<include name="**/*"/>
@@ -144,7 +150,7 @@ java version ${javaVersion}
144150
<copy todir="${dist}/library">
145151
<path refid="library-classes-add" />
146152
</copy>
147-
153+
148154
<copy todir="${dist}/documentation">
149155
<fileset dir="${javadoc}" />
150156
</copy>
@@ -176,7 +182,7 @@ java version ${javaVersion}
176182
<fileset file="${dist}/library.properties" />
177183
</copy>
178184

179-
185+
180186
</target>
181187

182188

@@ -185,9 +191,9 @@ java version ${javaVersion}
185191
+ + + + + + + + + + + + + + + + + + + + + + + -->
186192
<target name="install" depends="package">
187193

188-
<mkdir dir="${processing}/${libraryName}" />
194+
<mkdir dir="${libraries.dir}/${libraryName}" />
189195

190-
<copy todir="${processing}/${libraryName}">
196+
<copy todir="${libraries.dir}/${libraryName}">
191197
<fileset dir="${dist}"/>
192198
</copy>
193199

@@ -203,61 +209,61 @@ java version ${javaVersion}
203209
<move todir="${web}/documentation">
204210
<fileset dir="${dist}/documentation" />
205211
</move>
206-
212+
207213
<move todir="${web}/examples">
208214
<fileset dir="${dist}/examples" />
209215
</move>
210-
216+
211217
<copy todir="${web}">
212218
<fileset dir="resources/web" />
213219
</copy>
214-
220+
215221
<!--
216-
format the index.html file.
217-
regular expressions are used to parse the web index.html file.
218-
key words starting and ending with ## are replaced by values
222+
format the index.html file.
223+
regular expressions are used to parse the web index.html file.
224+
key words starting and ending with ## are replaced by values
219225
defined earlier in the beginning of this build file.
220226
-->
221-
227+
222228
<replaceregexp file="${web}/index.html"
223229
match="##yourLibrary##"
224230
replace="${libraryName}"
225231
flags="g" />
226-
232+
227233
<replaceregexp file="${web}/index.html"
228234
match="##author##"
229235
replace="${author}"
230236
flags="g" />
231-
237+
232238
<replaceregexp file="${web}/index.html"
233239
match="##versionNumber##"
234240
replace="${versionNumber}"
235241
flags="g" />
236-
242+
237243
<replaceregexp file="${web}/index.html"
238244
match="##yourLink##"
239245
replace="${yourLink}"
240246
flags="g" />
241-
247+
242248
<replaceregexp file="${web}/index.html"
243249
match="##date##"
244250
replace="${date}"
245251
flags="g" />
246-
252+
247253
<replaceregexp file="${web}/index.html"
248254
match="##keywords##"
249255
replace="${keywords}"
250256
flags="g" />
251-
252-
257+
258+
253259
<antcall target="processExamples" />
254-
260+
255261
<mkdir dir="${web}/download" />
256262

257263
<copy file="releases/${libraryName}-${versionNumber}.zip" todir="${web}/download" />
258264

259265
</target>
260-
266+
261267

262268
<!-- + + + + + + + + + + + + + + + + + + + + + + +
263269
CLEAN
@@ -267,9 +273,9 @@ java version ${javaVersion}
267273
<delete dir="${javadoc}" />
268274
<delete dir="${build}" />
269275
<delete dir="${web}" />
270-
</target>
271-
272-
276+
</target>
277+
278+
273279
<!-- + + + + + + + + + + + + + + + + + + + + + + +
274280
EXAMPLES, all
275281
+ + + + + + + + + + + + + + + + + + + + + + + -->
@@ -289,17 +295,17 @@ java version ${javaVersion}
289295
replace=""
290296
flags="g" />
291297
</target>
292-
298+
293299
<!-- + + + + + + + + + + + + + + + + + + + + + + +
294300
EXAMPLES, one
295301
+ + + + + + + + + + + + + + + + + + + + + + + -->
296302
<target name="addExamples" depends="settings">
297303
<property name="exampleZipped" value="${exampleDir}.zip"/>
298-
304+
299305
<zip destfile="${web}/examples/${exampleZipped}"
300306
basedir="${web}/examples/${exampleDir}/"
301307
excludes="**/_DS.Store" />
302-
308+
303309
<replaceregexp file="${web}/index.html"
304310
match="(##examples##)"
305311
replace="&lt;li&gt;&lt;a href=&quot;examples/${exampleZipped}&quot;&gt;${exampleDir}&lt;/a&gt;&lt;/li&gt; \1"

readme.md

+6-16
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
--------------------------------------------------------------------------------
1+
Florian Jenett's library that wraps around JDBC drivers to let you access MySQL, SQLite and PostgreSQL databases. [Link to original project](https://github.com/fjenett/sql-library-processing)
22

3-
SQLibrary, a Processing library that wraps around JDBC drivers to let
4-
you access MySQL, SQLite and PostgreSQL databases
5-
6-
--------------------------------------------------------------------------------
3+
## Latest Release
74

85
~~Latest release (same that is in Processing's library manager):
96
https://raw.github.com/fjenett/sql-library-processing/latest/release/BezierSQLib.zip~~
107

11-
Modified slightly for Processing 3. Install manually by unzipping this folder into your libraries folder:
8+
This fork has been modified slightly for Processing 3. It's now available in the Contribution Manager in the PDE, or you can install manually by unzipping this folder into your libraries folder:
129
https://github.com/benfry/sql-library-processing/raw/master/release/BezierSQLib.zip
1310

14-
--------------------------------------------------------------------------------
11+
## Features
1512

1613
It's not an ORM (and will not become one) but it has some handy features
1714
since v0.2.0 that makes it easier to load and save objects to a database.
@@ -23,10 +20,9 @@ since v0.2.0 that makes it easier to load and save objects to a database.
2320
See:
2421
https://raw.github.com/fjenett/sql-library-processing/master/src/de/bezier/data/sql/SQL.java
2522

26-
--------------------------------------------------------------------------------
23+
## Database Drivers
2724

28-
Parts of this library are available under their own licenses. These are
29-
redistributed as downloaded from the original sources:
25+
Parts of this library are available under their own licenses. These are redistributed as downloaded from the original sources:
3026

3127
MySQL Connector/J (JDBC driver)
3228
mysql-connector-java-3.1.8-bin.jar
@@ -44,9 +40,3 @@ SQLite JDBC driver
4440
sqlite-jdbc-3.7.2.jar
4541
http://code.google.com/p/sqlite-jdbc/
4642
Apache License 2.0, http://www.apache.org/licenses/LICENSE-2.0
47-
48-
--------------------------------------------------------------------------------
49-
50-
https://github.com/fjenett/sql-library-processing
51-
52-
--------------------------------------------------------------------------------

resources/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = @@LIBRARY_NAME@@
22
authorList = [Florian Jenett](http://www.bezier.de/)
33
url = https://github.com/fjenett/sql-library-processing
4-
category = DATA
4+
category = Data
55
sentence = A library to facilitate communication with SQL-based databases
66
paragraph = SQLibrary is an interface to MySQL, SQLite and PostgreSQL databases
77
version = @@VERSION@@

0 commit comments

Comments
 (0)