Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* rdsamp: octave compatibility fixes. Java arrays may or may not be directly usable as Octave matrices, depending on the version of Octave in use, the type of the array, and the dimensionality. Octave 4.0 permits using 1D arrays of various types without any explicit conversion. 1D and 2D 'double' arrays can be converted using the builtin java2mat function. Other types can be converted (less efficiently) using the org.octave.Matrix class. There are a lot of layers involved here, and a lot of magical bits I don't understand. The efficiency could certainly be improved. * rdsampjni: add a working test case for 'make check'. * SystemSettings: fix native library loading on Windows. This was broken by "SystemSettings: use standard paths for loading rdsampjni". The story in more detail: - To load DLLs, Windows looks in the PATH, the directory containing the executable, and the current working directory (in some order, I don't remember exactly.) Despite what you might naively expect, it doesn't search in the directory containing the library that requested the dependency. - System.loadLibrary() searches for library files according to the system property 'java.library.path'. However, it's impossible to change that at runtime. (The value is cached. http://fahdshariff.blogspot.com/2011/08/changing-java-library-path-at-runtime.html proposes a way to hack 'ClassLoader' to make it work. This doesn't appear to work with the current JRE.) I also don't know whether this has any effect on DLL dependencies, but I somewhat suspect it doesn't. So there doesn't seem to be any sane way to load a DLL, along with its dependencies, from an arbitrary location. Instead (as the code did prior to my recent changes), we must pre-load the required libraries. To avoid hard-coding that list, read it from a text file in the bin directory; that file is now generated by mcode/nativelibs/Makefile and is only somewhat hard-coded. Finally, throw an exception if this fails, rather than calling System.exit(). (Note that none of this is necessary on ELF systems, where we set the RPATH to "$ORIGIN/../lib", or on Darwin, where we set the install name to "@loader_path/../lib/libfoo.dylib".) * Add note to UnitTests about the required toolboxes. * Bump version to 0.10.0. * NEWS updates. * Add a simple script for building all binaries. * wfdbloadlib: bump version number.
- Loading branch information
1 parent
c7daec5
commit f1dd6e8
Showing
11 changed files
with
115 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -x | ||
|
||
if [ $# != 3 ]; then | ||
echo "Usage: $0 repository branch version" >&2 | ||
exit 1 | ||
fi | ||
|
||
repo=$1 | ||
branch=$2 | ||
version=$3 | ||
|
||
package=wfdb-app-toolbox-$version | ||
|
||
builddir=/tmp/toolbox-build | ||
outdir=/tmp | ||
make="make -j" | ||
|
||
rm -rf $builddir | ||
|
||
git clone --branch $branch --depth 1 $repo $builddir | ||
|
||
cd $builddir | ||
|
||
git archive --prefix=wfdb-app-toolbox-$version/ HEAD | gzip -c -9 > $outdir/$package.tar.gz | ||
|
||
# FIXME: use wfdb-toolbox-build chroot for this | ||
schroot -cjessie make jar7 &> jar7.log | ||
|
||
$make -C mcode/nativelibs download &> download.log | ||
|
||
(cd dependencies/jni && ./autogen.sh) &> autogen.log | ||
|
||
$make -C mcode/nativelibs install-linux install-windows install-macosx &> nativelibs.log | ||
|
||
make package APP_NAME=wfdb-app-toolbox-$version.zip | ||
mv $package.zip $outdir/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
995 | ||
1011 | ||
995 | ||
1011 | ||
995 | ||
1011 | ||
995 | ||
1011 | ||
995 | ||
1011 | ||
995 | ||
1011 | ||
995 | ||
1011 | ||
995 | ||
1011 | ||
1000 | ||
1008 | ||
997 | ||
1008 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters