Skip to content

Commit 5bbad1e

Browse files
committed
add build warnings for JAVA_HOME, improve platform detection, misc todo notes
1 parent 90eae78 commit 5bbad1e

3 files changed

Lines changed: 46 additions & 14 deletions

File tree

app/build.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,13 @@
7878

7979
<mkdir dir="bin" />
8080

81+
<!-- moved to the main build script -->
8182
<!-- ant seems to nuke ${java.home} for some reason, pointing at the JRE
8283
subfolder instead of the actual JDK found at JAVA_HOME.
8384
To avoid this, we grab the actual JAVA_HOME environment variable
8485
and use that to specify the location of tools.jar. -->
8586
<!-- if someone is better with ant please help clean this up -->
87+
<!--
8688
<property environment="env" />
8789
<property name="java_home" value="${env.JAVA_HOME}" />
8890
<available file="${env.JAVA_HOME}/lib/tools.jar"
@@ -104,6 +106,7 @@
104106
</condition>
105107
<fail if="windows" unless="java_tools_found"
106108
message="The JAVA_HOME variable must be set to the location of a full JDK. For instance, on Windows, this might be c:\jdk1.6.0_19." />
109+
-->
107110

108111
<javac source="1.6"
109112
target="1.6"

build/build.xml

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,50 @@
22
<project name="Processing" default="build">
33

44
<!-- Sets properties for macosx/windows/linux depending on current system -->
5-
<condition property="macosx"><os family="mac" /></condition>
6-
<condition property="windows"><os family="windows" /></condition>
7-
<condition property="linux"><os family="unix" /></condition>
8-
9-
<condition property="platform"
10-
value="macosx"><os family="mac" /> </condition>
11-
<condition property="platform"
12-
value="windows"><os family="windows" /> </condition>
13-
<condition property="platform"
14-
value="linux"><os family="unix" /> </condition>
5+
<condition property="platform" value="macosx">
6+
<os family="mac" />
7+
</condition>
8+
9+
<condition property="platform" value="windows">
10+
<os family="windows" />
11+
</condition>
1512

16-
<!-- <echo message="" />-->
13+
<condition property="platform" value="linux">
14+
<and>
15+
<os family="unix" />
16+
<not>
17+
<os family="mac" />
18+
</not>
19+
</and>
20+
</condition>
21+
22+
<!-- Set a property named macosx, linux, or windows.
23+
The 'value' chosen is arbitrary. -->
24+
<property name="${platform}" value="${platform}" />
1725

1826
<property environment="env" />
27+
28+
<!-- code signing hack, turns on code signing during dist -->
1929
<condition property="codesign">
2030
<equals arg1="${env.USER}" arg2="fry" />
2131
</condition>
2232

33+
<!-- Make sure that we have a legitimate JDK... This was promoted
34+
from app/build.xml because we now need this on OS X as well. -->
35+
<property name="java_home" value="${env.JAVA_HOME}" />
36+
<available file="${env.JAVA_HOME}/lib/tools.jar"
37+
property="java_tools_found" />
38+
39+
<fail if="windows" unless="java_tools_found"
40+
message="The JAVA_HOME variable must be set to the location of a full JDK. For instance, on Windows, this might be c:\jdk1.6.0_19." />
41+
42+
<fail if="macosx" unless="java_tools_found"
43+
message="To build on OS X, you must have a full JDK installed, and set JAVA_HOME=`/usr/libexec/java_home`" />
44+
45+
<fail if="linux" unless="java_tools_found"
46+
message="The JAVA_HOME variable must be set to the location of a full JDK. For instance, on Ubuntu Linux, this might be /usr/lib/jvm/java-6-sun." />
47+
48+
<!-- Figure out the platform-specific output directory for all this work. -->
2349
<condition property="target.path"
2450
value="macosx/work/Processing.app/Contents/Resources/Java">
2551
<os family="mac" />

todo.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ X Library manager leaves temporary folders in sketchbook folder
5454
X http://code.google.com/p/processing/issues/detail?id=1527
5555
X "Auto format" should not scroll current line to first line
5656
X http://code.google.com/p/processing/issues/detail?id=1533
57+
X add to build instructions for OS X:
58+
X ant won't work w/ Java 1.7 until you set JAVA_HOME
59+
X export JAVA_HOME=`/usr/libexec/java_home`
5760

5861
manindra
5962
M bug that was causing the Debugger to point to wrong break point line numbers
@@ -78,9 +81,9 @@ o if sketch was open, then restart by dragging the .pde to p5.app
7881

7982
https://processing-js.lighthouseapp.com/
8083

81-
_ add to build instructions for OS X:
82-
_ ant won't work w/ Java 1.7 until you set JAVA_HOME
83-
_ export JAVA_HOME=`/usr/libexec/java_home`
84+
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Bounds out of range: 5374,5376 [5375]
85+
at processing.app.syntax.JEditTextArea.select(JEditTextArea.java:1214)
86+
at processing.app.Editor.handleIndentOutdent(Editor.java:1819)
8487

8588
_ add Iterator as an import?
8689

0 commit comments

Comments
 (0)