Skip to content

Commit

Permalink
Teach JNA to look for custom library paths
Browse files Browse the repository at this point in the history
This is twall's jna git, commit a82a6ca (post release 4.1.0), with my path ("Get additional library paths from ldconfig on Linux"), commit f0ea52c, on top. Upstream PR: java-native-access/jna#478
  • Loading branch information
gohai committed Aug 1, 2015
1 parent cd0d8b1 commit 038d80f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
Binary file modified library/jna.jar
Binary file not shown.
19 changes: 5 additions & 14 deletions src/processing/video/Video.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,20 +155,11 @@ static protected void removePlugins() {


static protected void buildLinuxPaths() {
// looking pretty dire, make sure at least LD_LIBRARY_PATH is set
// see https://github.com/twall/jna/issues/477
String ldPath = System.getenv("LD_LIBRARY_PATH");
if (ldPath == null || ldPath.length() == 0) {
System.out.println("Your system's LD_LIBRARY_PATH environment variable " +
"is not set, limiting the search for the video libraries to /usr/lib " +
"and /lib.");
// temporary hack for testing on Raspbian
if (System.getProperty("os.arch").equals("arm")) {
gstreamerLibPath = "/opt/vc/lib:/usr/local/lib:/lib/arm-linux-gnueabihf:/usr/lib/arm-linux-gnueabihf";
}
} else {
gstreamerLibPath = ldPath;
}
// the version of the JNA library bundled automatically tries
// all library paths known to the host system's ldconfig
// so we'd even catch locations like /usr/local/lib etc
// PL for upstream: https://github.com/twall/jna/pull/478
gstreamerLibPath = "";
gstreamerPluginPath = "";
}

Expand Down

0 comments on commit 038d80f

Please sign in to comment.