Stephen Davies - 2014-12-04

Build from Source - OS X

1 December 2014 (orig. Yosemite)
Updated 13 May 2016 (El Capitan)

To build YAD2XX from source on OS X you need to install and configure several tools to build the two modules, the Java Library (.jar file) and the Native Library (.jnilib).

Java Library

Install the following software, parenthesised values have been tested:
1) Java 8 (1.8.0_92-b14)
2) Maven 3 (3.3.3)
3) Xcode (7.3.1) (installs gcc and subversion client)

Update the shell PATH (Environment Variables) manually to include the install locations (~/.bash_profile) e.g:
JAVA_HOME=`/usr/libexec/java_home -v 1.8`
MAVEN_HOME=/usr/local/apache/apache-maven-3.3.3
PATH=$PATH:$MAVEN_HOME/bin

You can sanity check your setup from the OS X Terminal:
1) "java -fullversion" -> outputs the Java version you've configured
2) "mvn --version" -> ditto for Maven

Checkout the source code and build:
1) Open an OS X Terminal window
2) Change to your work directory e.g. "cd /Users/me/workspace"
3) "svn checkout https://svn.code.sf.net/p/yad2xx/code/trunk yad2xx"
4) Navigate into the checked out project, e.g. "cd yad2xx"
5) "mvn install"

First time through this will take a while because Maven will download and cache its plugins. You should ultimately get a FAILURE attempting to build the native library but the top level and Java Library modules should indicate SUCCESS.

If other errors occur then first check the steps above. If it still fails then raise a ticket.

Native Library

The Native library (.jnilib) needs a C compiler and the FTDI supplied driver files for the D2XX library.

Install:
1) FTDI D2XX Driver (1.2.2)

Once the driver files in /usr/local/include and /usr/local/lib are created the build should run to completion. The native interface library will be in yad2xx/yad2xxJnilib/target.

The Java native library needs to be copied where the JVM can find it. Execute:

"sudo cp libFTDIInterface.jnilib /Library/Java/Extensions"

 

Last edit: Stephen Davies 2016-05-13