|
2 | 2 | <project name="Processing" default="build"> |
3 | 3 |
|
4 | 4 | <!-- 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> |
15 | 12 |
|
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}" /> |
17 | 25 |
|
18 | 26 | <property environment="env" /> |
| 27 | + |
| 28 | + <!-- code signing hack, turns on code signing during dist --> |
19 | 29 | <condition property="codesign"> |
20 | 30 | <equals arg1="${env.USER}" arg2="fry" /> |
21 | 31 | </condition> |
22 | 32 |
|
| 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. --> |
23 | 49 | <condition property="target.path" |
24 | 50 | value="macosx/work/Processing.app/Contents/Resources/Java"> |
25 | 51 | <os family="mac" /> |
|
0 commit comments