Skip to content

Building on macOS

aushacker edited this page Jul 20, 2021 · 6 revisions

1 December 2014 (orig. Yosemite)

Updated 13 May 2016 (El Capitan)
Updated 13 May 2020 (Catalina)
Updated 20 July 2021 (Catalina)

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, 1.8.0_251-b08)
  2. Maven 3 (3.3.3, 3.6.3)
  3. Xcode (7.3.1, 11.4.1) (installs gcc and git 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.6.3
PATH=$PATH:$JAVA_HOME/bin:$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. "git clone https://github.com/aushacker/yad2xx.git"
  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 SUCCESS.

If other errors occur then first check the steps above. If it still fails then open an issue.

NB. This process changed as part of GitHub migration. The FTDI C headers and libraries are now included in the repository. Maven builds should complete without any further steps. However, to run your own code locally you will need to configure the FTDI libraries manually.

Native Libraries

From the FTDI website download and install:

  1. FTDI D2XX Driver (1.4.24)
  2. FTDI FT4222 Driver (1.4.4.48)

The install process for the FTDI drivers is completely manual, follow the ReadMe.rtf.

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

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

Clone this wiki locally