Skip to content

Commit

Permalink
Release version 1.1
Browse files Browse the repository at this point in the history
 * Build the Maven artifacts for Linux in a CentOS 6 Docker container, for maximum compatibility (issue #22)
  • Loading branch information
saudet committed Oct 25, 2015
1 parent e59d688 commit 9f05c50
Show file tree
Hide file tree
Showing 92 changed files with 191 additions and 154 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

### October 25, 2015 version 1.1
* Build the Maven artifacts for Linux in a CentOS 6 Docker container, for maximum compatibility ([issue #22](https://github.com/bytedeco/javacpp-presets/issues/22))
* Cache files downloaded by `cppbuild.sh` in the `downloads` subdirectory to prevent having to redownload everything after a clean
* Add the `clang` module to the presets for LLVM
* Propose for FFmpeg in the `cppbuild.sh` file a minimal configuration to support MPEG-4 streams with H.264 and AAC
Expand Down
71 changes: 38 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Downloads
---------
To install manually the JAR files, obtain the following archives and follow the instructions in the [Manual Installation](#manual-installation) section below.

* JavaCPP Presets 1.0 binary archive [javacpp-presets-1.0-bin.zip](http://search.maven.org/remotecontent?filepath=org/bytedeco/javacpp-presets/1.0/javacpp-presets-1.0-bin.zip) (232 MB)
* JavaCPP Presets 1.0 source archive [javacpp-presets-1.0-src.zip](http://search.maven.org/remotecontent?filepath=org/bytedeco/javacpp-presets/1.0/javacpp-presets-1.0-src.zip) (1.9 MB)
* JavaCPP Presets 1.1 binary archive [javacpp-presets-1.1-bin.zip](http://search.maven.org/remotecontent?filepath=org/bytedeco/javacpp-presets/1.1/javacpp-presets-1.1-bin.zip) (278 MB)
* JavaCPP Presets 1.1 source archive [javacpp-presets-1.1-src.zip](http://search.maven.org/remotecontent?filepath=org/bytedeco/javacpp-presets/1.1/javacpp-presets-1.1-src.zip) (2.0 MB)

The binary archive contains builds for Android, Linux, Mac OS X, and Windows. The JAR files for specific child modules or platforms can also be obtained individually from the [Maven Central Repository](http://search.maven.org/#search|ga|1|bytedeco).

Expand All @@ -25,21 +25,21 @@ We can also have everything downloaded and installed automatically with:
<dependency>
<groupId>org.bytedeco.javacpp-presets</groupId>
<artifactId>${moduleName}</artifactId>
<version>${moduleVersion}-1.0</version>
<version>${moduleVersion}-1.1</version>
</dependency>
```

* Gradle (inside the `build.gradle` file)
```groovy
dependencies {
compile group: 'org.bytedeco.javacpp-presets', name: moduleName, version: moduleVersion + '-1.0'
compile group: 'org.bytedeco.javacpp-presets', name: moduleName, version: moduleVersion + '-1.1'
}
```

* sbt (inside the `build.sbt` file)
```scala
classpathTypes += "maven-plugin"
libraryDependencies += "org.bytedeco.javacpp-presets" % moduleName % moduleVersion + "-1.0"
libraryDependencies += "org.bytedeco.javacpp-presets" % moduleName % moduleVersion + "-1.1"
```

where the `moduleName` and `moduleVersion` variables correspond to the desired module. Additionally, we need to either set the `platform` system property (via the `-D` command line option) to something like `android-arm`, or set the `platform.dependencies` one to `true` to get all the binaries for Android, Linux, Mac OS X, and Windows. **On build systems where this does not work, we need to add the platform-specific artifacts manually.**
Expand All @@ -49,32 +49,31 @@ Required Software
-----------------
To use the JavaCPP Presets, you will need to download and install the following software:

* An implementation of Java SE 6 or newer
* An implementation of Java SE 7 or newer:
* OpenJDK http://openjdk.java.net/install/ or
* Sun JDK http://www.oracle.com/technetwork/java/javase/downloads/ or
* IBM JDK http://www.ibm.com/developerworks/java/jdk/ or
* Java SE for Mac OS X http://developer.apple.com/java/ etc.
* IBM JDK http://www.ibm.com/developerworks/java/jdk/

Further, in the case of Android, the JavaCPP Presets also rely on:

* Android SDK API 8 or newer http://developer.android.com/sdk/
* Android SDK API 14 or newer http://developer.android.com/sdk/


Manual Installation
-------------------
Simply put all the desired JAR files (`opencv*.jar`, `ffmpeg*.jar`, etc.), in addition to `javacpp.jar`, somewhere in your class path. The JAR files available as pre-built artifacts are meant to be used with [JavaCPP](https://github.com/bytedeco/javacpp). They were built on Fedora 21, so they may not work on all distributions of Linux, especially older ones. The binaries for Android were compiled for ARMv7 processors featuring an FPU, so they will not work on ancient devices such as the HTC Magic or some others with an ARMv6 CPU. Here are some more specific instructions for common cases:
Simply put all the desired JAR files (`opencv*.jar`, `ffmpeg*.jar`, etc.), in addition to `javacpp.jar`, somewhere in your class path. The JAR files available as pre-built artifacts are meant to be used with [JavaCPP](https://github.com/bytedeco/javacpp). The binaries for Linux were built for CentOS 6, so they should work on most distributions currently in use. The ones for Android were compiled for ARMv7 processors featuring an FPU, so they will not work on ancient devices such as the HTC Magic or some others with an ARMv6 CPU. Here are some more specific instructions for common cases:

NetBeans (Java SE 6 or newer):
NetBeans (Java SE 7 or newer):

1. In the Projects window, right-click the Libraries node of your project, and select "Add JAR/Folder...".
2. Locate the JAR files, select them, and click OK.

Eclipse (Java SE 6 or newer):
Eclipse (Java SE 7 or newer):

1. Navigate to Project > Properties > Java Build Path > Libraries and click "Add External JARs...".
2. Locate the JAR files, select them, and click OK.

IntelliJ IDEA (Android 2.2 or newer):
IntelliJ IDEA (Android 4.0 or newer):

1. Follow the instructions on this page: http://developer.android.com/training/basics/firstapp/
2. Copy all the JAR files into the `app/libs` subdirectory.
Expand All @@ -83,35 +82,41 @@ IntelliJ IDEA (Android 2.2 or newer):

After that, we can access almost transparently the corresponding C/C++ APIs through the interface classes found in the `org.bytedeco.javacpp` package. Indeed, the `Parser` translates the code comments from the C/C++ header files into the Java interface files, (almost) ready to be consumed by Javadoc. However, since their translation still leaves to be desired, one may wish to refer to the original documentation pages. For instance, the ones for OpenCV and FFmpeg can be found online at:

* [OpenCV documentation](http://docs.opencv.org/)
* [FFmpeg documentation](http://ffmpeg.org/doxygen/)
* [OpenCV documentation](http://docs.opencv.org/master/)
* [FFmpeg documentation](http://ffmpeg.org/doxygen/trunk/)


Build Instructions
------------------
If the binary files available above are not enough for your needs, you might need to rebuild them from the source code. To this end, the project files on the Java side were created for:
If the binary files available above are not enough for your needs, you might need to rebuild them from the source code. To this end, project files on the Java side were created as [Maven modules](#the-maven-modules). Before running the Maven build, however, we recommend to install the native libraries on the native C/C++ side with the [`cppbuild.sh` scripts](#the-cppbuildsh-scripts), but they can also be installed by other means.

* Maven 2 or 3 http://maven.apache.org/download.html
* JavaCPP 1.0 https://github.com/bytedeco/javacpp
Additionally, one can find on the wiki page additional information about the recommended [build environments](https://github.com/bytedeco/javacpp-presets/wiki/Build-Environments) for the major platforms.

Each child module in turn relies on its corresponding native libraries being already installed in the `cppbuild` subdirectory created by a prior execution of the included [CPPBuild Scripts](#cppbuild-scripts), explained below. To use native libraries already installed somewhere else on the system, other installation directories than `cppbuild` can also be specified either in the `pom.xml` files or in the `.java` configuration files. The following versions are supported:

### The Maven modules
The JavaCPP Presets depend on Maven, a powerful build system for Java, so before attempting a build, be sure to install and read up on:

* Maven 3.x http://maven.apache.org/download.html
* JavaCPP 1.1 https://github.com/bytedeco/javacpp

Each child module in turn relies on its corresponding native libraries being already installed in the `cppbuild` subdirectory created by a prior execution of the included [`cppbuild.sh` scripts](#the-cppbuildsh-scripts), explained below. To use native libraries already installed somewhere else on the system, other installation directories than `cppbuild` can also be specified either in the `pom.xml` files or in the `.java` configuration files. The following versions are supported:

* OpenCV 3.0.0 http://opencv.org/downloads.html
* FFmpeg 2.7.x http://ffmpeg.org/download.html
* FlyCapture 2.7.x http://www.ptgrey.com/flycapture-sdk
* FFmpeg 2.8.x http://ffmpeg.org/download.html
* FlyCapture 2.7.x or 2.8.x http://www.ptgrey.com/flycapture-sdk
* libdc1394 2.1.x or 2.2.x http://sourceforge.net/projects/libdc1394/files/
* libfreenect 0.5.2 https://github.com/OpenKinect/libfreenect
* libfreenect 0.5.3 https://github.com/OpenKinect/libfreenect
* videoInput 0.200 https://github.com/ofTheo/videoInput/
* ARToolKitPlus 2.3.1 https://launchpad.net/artoolkitplus
* Chilitags https://github.com/chili-epfl/chilitags
* flandmark 1.07 http://cmp.felk.cvut.cz/~uricamic/flandmark/#download
* FFTW 3.3.4 http://www.fftw.org/download.html
* GSL 1.16 http://www.gnu.org/software/gsl/#downloading
* LLVM 3.6.1 http://llvm.org/releases/download.html
* LLVM 3.7.0 http://llvm.org/releases/download.html
* Leptonica 1.72 http://www.leptonica.org/download.html
* Tesseract 3.03-rc1 https://code.google.com/p/tesseract-ocr/
* Tesseract 3.04 https://code.google.com/p/tesseract-ocr/
* Caffe https://github.com/BVLC/caffe
* CUDA 7.0 https://developer.nvidia.com/cuda-downloads
* CUDA 7.5 https://developer.nvidia.com/cuda-downloads

Once everything installed and configured, simply execute
```bash
Expand All @@ -120,12 +125,11 @@ $ mvn install --projects .,opencv,ffmpeg,flycapture,libdc1394,libfreenect,videoi
inside the directory containing the parent `pom.xml` file, by specifying only the desired child modules in the command, but **without the leading period "." in the comma-separated list of projects, the parent `poml.xml` file itself might not get installed.** Please refer to the comments inside the `pom.xml` file for further details.


CPPBuild Scripts
----------------
Before running the Maven build, however, we recommend to install the native libraries on the native C/C++ side with the `cppbuild.sh` scripts. In this case, additional software is required:
### The `cppbuild.sh` scripts
Running the scripts allows us to install easily the native libraries on multiple platforms, but additional software is required:

* A recent version of Linux, Mac OS X, or Windows with MSYS and Visual Studio
* Android NDK r7 or newer http://developer.android.com/sdk/ndk/ (required only for Android builds)
* Android NDK r7 or newer http://developer.android.com/ndk/downloads/ (required only for Android builds)

With the above in working order, simply execute
```bash
Expand All @@ -152,11 +156,12 @@ Thanks to Jose Gómez for testing this out!

How Can I Help?
---------------
Contributions of any kind are highly welcome! At the moment, the `Parser` has limited capabilities, so I plan to improve it gradually to the point where it can successfully parse large C++ header files that are even more convoluted than the ones from OpenCV, but the build system could also be improved. Consequently, I am looking for help especially with the four following tasks, in no particular order:
Contributions of any kind are highly welcome! At the moment, the `Parser` has limited capabilities, so I plan to improve it gradually to the point where it can successfully parse large C++ header files that are even more convoluted than the ones from OpenCV or Caffe, but the build system could also be improved. Consequently, I am looking for help especially with the five following tasks, in no particular order:

* Improving the `Parser`
* Providing builds for more platforms, most notably `linux-arm`
* Replacing the Bash/Maven build combo by something better (Gradle?)
* Setting up continuous integration, preferably free on the cloud ([Travis CI](https://travis-ci.org/)?)
* Improving the `Parser` (by using the [presets for Clang](llvm/src/main/java/org/bytedeco/javacpp/clang.java)?)
* Providing builds for more platforms, most notably `linux-arm` for [Raspberry Pi](https://www.raspberrypi.org/), etc.
* Replacing the Bash/Maven build combo by something easier to use ([Gradle](http://gradle.org/)?)
* Adding new presets as child modules for other C/C++ libraries (OpenNI, OpenMesh, PCL, etc.)

To contribute, please fork and create pull requests, or post your suggestions [as a new "issue"](https://github.com/bytedeco/javacpp-presets/issues). Thank you very much in advance for your contribution!
Expand Down
4 changes: 2 additions & 2 deletions artoolkitplus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ We can use [Maven 3](http://maven.apache.org/) to download and install automatic
<modelVersion>4.0.0</modelVersion>
<groupId>org.bytedeco.javacpp-presets.artoolkitplus</groupId>
<artifactId>multimain</artifactId>
<version>1.0</version>
<version>1.1</version>
<dependencies>
<dependency>
<groupId>org.bytedeco.javacpp-presets</groupId>
<artifactId>artoolkitplus</artifactId>
<version>2.3.1-1.0</version>
<version>2.3.1-1.1</version>
</dependency>
</dependencies>
</project>
Expand Down
2 changes: 1 addition & 1 deletion artoolkitplus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.bytedeco</groupId>
<artifactId>javacpp-presets</artifactId>
<version>1.1-SNAPSHOT</version>
<version>1.1</version>
</parent>

<groupId>org.bytedeco.javacpp-presets</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.1-SNAPSHOT
// Targeted by JavaCPP version 1.1

package org.bytedeco.javacpp;

Expand Down
4 changes: 2 additions & 2 deletions caffe/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ We can use [Maven 3](http://maven.apache.org/) to download and install automatic
<modelVersion>4.0.0</modelVersion>
<groupId>org.bytedeco.javacpp-presets.caffe</groupId>
<artifactId>caffe</artifactId>
<version>1.0</version>
<version>1.1</version>
<dependencies>
<dependency>
<groupId>org.bytedeco.javacpp-presets</groupId>
<artifactId>caffe</artifactId>
<version>master-1.0</version>
<version>master-1.1</version>
</dependency>
</dependencies>
</project>
Expand Down
2 changes: 1 addition & 1 deletion caffe/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.bytedeco</groupId>
<artifactId>javacpp-presets</artifactId>
<version>1.1-SNAPSHOT</version>
<version>1.1</version>
</parent>

<groupId>org.bytedeco.javacpp-presets</groupId>
Expand Down
2 changes: 1 addition & 1 deletion caffe/src/main/java/org/bytedeco/javacpp/caffe.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.1-SNAPSHOT
// Targeted by JavaCPP version 1.1

package org.bytedeco.javacpp;

Expand Down
4 changes: 2 additions & 2 deletions chilitags/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ We can use [Maven 3](http://maven.apache.org/) to download and install automatic
<modelVersion>4.0.0</modelVersion>
<groupId>org.bytedeco.javacpp-presets.chilitags</groupId>
<artifactId>detectlive</artifactId>
<version>1.0</version>
<version>1.1</version>
<dependencies>
<dependency>
<groupId>org.bytedeco.javacpp-presets</groupId>
<artifactId>chilitags</artifactId>
<version>master-1.0</version>
<version>master-1.1</version>
</dependency>
</dependencies>
</project>
Expand Down
2 changes: 1 addition & 1 deletion chilitags/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.bytedeco</groupId>
<artifactId>javacpp-presets</artifactId>
<version>1.1-SNAPSHOT</version>
<version>1.1</version>
</parent>

<groupId>org.bytedeco.javacpp-presets</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.1-SNAPSHOT
// Targeted by JavaCPP version 1.1

package org.bytedeco.javacpp;

Expand Down
6 changes: 3 additions & 3 deletions cuda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Introduction
------------
This directory contains the JavaCPP Presets module for:

* CUDA 7.0 https://developer.nvidia.com/cuda-zone
* CUDA 7.5 https://developer.nvidia.com/cuda-zone

Please refer to the parent README.md file for more detailed information about the JavaCPP Presets.

Expand Down Expand Up @@ -35,12 +35,12 @@ We can use [Maven 3](http://maven.apache.org/) to download and install automatic
<modelVersion>4.0.0</modelVersion>
<groupId>org.bytedeco.javacpp-presets.cuda</groupId>
<artifactId>mnistcudnn</artifactId>
<version>1.0</version>
<version>1.1</version>
<dependencies>
<dependency>
<groupId>org.bytedeco.javacpp-presets</groupId>
<artifactId>cuda</artifactId>
<version>7.0-1.0</version>
<version>7.5-1.1</version>
</dependency>
</dependencies>
</project>
Expand Down
2 changes: 1 addition & 1 deletion cuda/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.bytedeco</groupId>
<artifactId>javacpp-presets</artifactId>
<version>1.1-SNAPSHOT</version>
<version>1.1</version>
</parent>

<groupId>org.bytedeco.javacpp-presets</groupId>
Expand Down
2 changes: 1 addition & 1 deletion cuda/src/main/java/org/bytedeco/javacpp/cublas.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.1-SNAPSHOT
// Targeted by JavaCPP version 1.1

package org.bytedeco.javacpp;

Expand Down
2 changes: 1 addition & 1 deletion cuda/src/main/java/org/bytedeco/javacpp/cuda.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.1-SNAPSHOT
// Targeted by JavaCPP version 1.1

package org.bytedeco.javacpp;

Expand Down
2 changes: 1 addition & 1 deletion cuda/src/main/java/org/bytedeco/javacpp/cudnn.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.1-SNAPSHOT
// Targeted by JavaCPP version 1.1

package org.bytedeco.javacpp;

Expand Down
2 changes: 1 addition & 1 deletion cuda/src/main/java/org/bytedeco/javacpp/cufft.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.1-SNAPSHOT
// Targeted by JavaCPP version 1.1

package org.bytedeco.javacpp;

Expand Down
2 changes: 1 addition & 1 deletion cuda/src/main/java/org/bytedeco/javacpp/cufftw.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.1-SNAPSHOT
// Targeted by JavaCPP version 1.1

package org.bytedeco.javacpp;

Expand Down
2 changes: 1 addition & 1 deletion cuda/src/main/java/org/bytedeco/javacpp/curand.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.1-SNAPSHOT
// Targeted by JavaCPP version 1.1

package org.bytedeco.javacpp;

Expand Down
2 changes: 1 addition & 1 deletion cuda/src/main/java/org/bytedeco/javacpp/cusolver.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.1-SNAPSHOT
// Targeted by JavaCPP version 1.1

package org.bytedeco.javacpp;

Expand Down
2 changes: 1 addition & 1 deletion cuda/src/main/java/org/bytedeco/javacpp/cusparse.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.1-SNAPSHOT
// Targeted by JavaCPP version 1.1

package org.bytedeco.javacpp;

Expand Down
2 changes: 1 addition & 1 deletion cuda/src/main/java/org/bytedeco/javacpp/nppc.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.1-SNAPSHOT
// Targeted by JavaCPP version 1.1

package org.bytedeco.javacpp;

Expand Down
2 changes: 1 addition & 1 deletion cuda/src/main/java/org/bytedeco/javacpp/nppi.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.1-SNAPSHOT
// Targeted by JavaCPP version 1.1

package org.bytedeco.javacpp;

Expand Down
2 changes: 1 addition & 1 deletion cuda/src/main/java/org/bytedeco/javacpp/npps.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.1-SNAPSHOT
// Targeted by JavaCPP version 1.1

package org.bytedeco.javacpp;

Expand Down
23 changes: 23 additions & 0 deletions ffmpeg/LICENSE.openh264
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Copyright (c) 2013, Cisco Systems
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading

0 comments on commit 9f05c50

Please sign in to comment.