Commit 6cc486a0 authored by Günter Windau's avatar Günter Windau

Merge branch 'update_lsl_1.13.1' into 'master'

Update labstreaminglayer to 1.13.1 / 1.13.0-b13

See merge request marcw/biofysica!2
parents e847f480 bce64348
Please make sure that you have the most recent binaries from liblsl/bin/ in here.
\ No newline at end of file
#!/bin/sh
# Build Octave bindings on 64bit Linux
# You need the package liboctave-dev *or* matlab-support installed and
# either liblsl64.so or a link to it in the bin folder
# This builds with matlab by default, but you can suppress the check by
# setting OCT (e.g. OCT=1 ./build_linux.sh)
if [ ! -e bin/liblsl64.so ]; then
echo 'liblsl64.so not found in bin/'
exit 1;
fi
if [ -z "$OCT" ] && [ `which matlab-mex` ]; then
echo 'Building with matlab-mex'
buildcmd='matlab-mex'
elif [ `which mkoctfile` ]; then
echo 'Building with mkoctfile'
buildcmd='mkoctfile --mex'
else
echo 'No build command found, exiting...'
exit 1;
fi
cd bin
for i in ../mex/*.c; do $buildcmd -I../../liblsl/include -L. -llsl64 -ldl ../mex/$i; done
cd ..
octave-cli -p bin examples/LSLVersion.m
......@@ -21,6 +21,10 @@ for i = 1:size(pathdirs,1)
exclude_p=genpath(exclude_d);
rmpath(exclude_p);
exclude_d=[d '/liblsl'];
exclude_p=genpath(exclude_d);
rmpath(exclude_p);
% disp(['added directory ', d, ' to the MATLAB path']);
else
disp(['directory ', d, ' does not exist, not added to the MATLAB path']);
......
% print which lsl_api.cfg files we found
if IsWin
cfgs= { 'c:\etc\lsl_api\lsl_api.cfg', [ getenv('HOMEPATH') '\lsl_api\lsl_api.cfg'], getenv('LSLAPICFG') };
else
cfgs= { '/etc/lsl_api/lsl_api.cfg', [ getenv('HOME') '/lsl_api/lsl_api.cfg'], getenv('LSLAPICFG') };
end
for ff=cfgs
f=ff{1};
if exist(f,'file')
fprintf('LSL: found api configuration in %s\n',f);
end
end
% Set up matlab path for the labstreaminglayer library
pathdirs = { ...
[ biofysica_root '/liblsl/glnxa64' ]
};
for i = 1:size(pathdirs,1)
d = pathdirs{i};
if exist(d,'dir')
p=genpath(d);
addpath(p);
exclude_d=[d '/init.d'];
exclude_p=genpath(exclude_d);
rmpath(exclude_p);
exclude_d=[d '/.svn'];
exclude_p=genpath(exclude_d);
rmpath(exclude_p);
exclude_d=[d '/.git'];
exclude_p=genpath(exclude_d);
rmpath(exclude_p);
exclude_d=[d '/liblsl'];
exclude_p=genpath(exclude_d);
rmpath(exclude_p);
% disp(['added directory ', d, ' to the MATLAB path']);
else
disp(['directory ', d, ' does not exist, not added to the MATLAB path']);
end
clear pathdirs d p exclude_d i exclude_p
end
% Set up matlab path for the labstreaminglayer library
pathdirs = { ...
[ biofysica_root '/liblsl/maci64' ]
};
for i = 1:size(pathdirs,1)
d = pathdirs{i};
if exist(d,'dir')
p=genpath(d);
addpath(p);
exclude_d=[d '/init.d'];
exclude_p=genpath(exclude_d);
rmpath(exclude_p);
exclude_d=[d '/.svn'];
exclude_p=genpath(exclude_d);
rmpath(exclude_p);
exclude_d=[d '/.git'];
exclude_p=genpath(exclude_d);
rmpath(exclude_p);
exclude_d=[d '/liblsl'];
exclude_p=genpath(exclude_d);
rmpath(exclude_p);
% disp(['added directory ', d, ' to the MATLAB path']);
else
disp(['directory ', d, ' does not exist, not added to the MATLAB path']);
end
clear pathdirs d p exclude_d i exclude_p
end
% Set up matlab path for the labstreaminglayer library
pathdirs = { ...
[ biofysica_root '/liblsl/win64' ]
};
for i = 1:size(pathdirs,1)
d = pathdirs{i};
if exist(d,'dir')
p=genpath(d);
addpath(p);
exclude_d=[d '/init.d'];
exclude_p=genpath(exclude_d);
rmpath(exclude_p);
exclude_d=[d '/.svn'];
exclude_p=genpath(exclude_d);
rmpath(exclude_p);
exclude_d=[d '/.git'];
exclude_p=genpath(exclude_d);
rmpath(exclude_p);
exclude_d=[d '/liblsl'];
exclude_p=genpath(exclude_d);
rmpath(exclude_p);
% disp(['added directory ', d, ' to the MATLAB path']);
else
disp(['directory ', d, ' does not exist, not added to the MATLAB path']);
end
clear pathdirs d p exclude_d i exclude_p
end
This is liblsl-Matlab 1.13.0_b13 downloaded from https://github.com/labstreaminglayer/liblsl-Matlab/releases
GW 20200806 This is source code only
{
"package": {
"name": "liblsl-Matlab",
"repo": "LSL",
"subject": "labstreaminglayer",
"desc": "Travis CI build",
"website_url": "https://github.com/labstreaminglayer/liblsl-matlab",
"issue_tracker_url": "https://github.com/labstreaminglayer/liblsl-matlab/issues",
"vcs_url": "https://github.com/labstreaminglayer/liblsl-matlab.git",
"github_use_tag_release_notes": true,
"licenses": ["MIT"],
"public_download_numbers": false,
"public_stats": false
},
"version": {
"name": "1.12",
"desc": "Matlab bindings for liblsl",
"released": "2018-05-02",
"vcs_tag": "",
"gpgSign": false
},
"files": [ {
"includePattern": "./((.)[^/]*\.tar\.bz2)",
"uploadPattern": "$1",
"matrixParams": { "override": 1 }
}],
"publish": true
}
language: c
env:
LSLDIST_URL="https://dl.bintray.com/labstreaminglayer/LSL/"
UBUNTU_DIST="trusty"
LSL_VERSION="1.1.2"
- CMakeArgs=""
script:
- cp ${LSL_INSTALL_ROOT}/lib/* bin/
- octave-cli --eval build_mex
- rm bin/*.o
- tar --transform "s/^\.\?/liblsl-matlab/" -cjf liblsl-matlab-${LSL_VERSION}.tar.bz2 . || true
matrix:
include:
- os: linux
addons:
apt:
packages:
- liboctave-dev
before_script:
- travis_retry wget --quiet ${LSLDIST_URL}/lsl-liblsl{,-dev}_${LSL_VERSION}-${UBUNTU_DIST}_amd64.deb
- for deb in *.deb; do dpkg -x ${deb} LSL; done
- export LSL_INSTALL_ROOT=LSL/usr
- os: osx
before_install:
- brew install octave
before_script:
- travis_retry wget --quiet ${LSLDIST_URL}/LSL-${LSL_VERSION}-Darwin-liblsl{,-dev}.tar.bz2
- mkdir LSL; for file in *.tar.bz2; do tar -xf ${file} -C LSL; done
- export LSL_INSTALL_ROOT=LSL
deploy:
skip_cleanup: true
provider: bintray
user: tstenner
key:
secure: "PoHMsNdp5UgFtAPljabOVC+6r5wjwHZwGgVDLEgKs0b+EwgkShj42Li03vQCz2u0cRkgHutv5cGCe8L5+ez4zyqnF98gXrgflbhcfdjhHEB6hp65kV2+9myNOPcrlsm+gR0Ex1kN1owfDRfBIasa6SMp2+4Ii4mxm/aiSaLnvaB1lM6zknNZMpW0lucdQVqKH+HatUaHRc0EB1KgzSRU7jKxA/XWqHQ8lRk2Hnk5bVOWCu755DLbKquuZUV1KmxvF5TolDahhwh/DuCFa/UJ9G2eHdt/1/7Pb2w1Dx+9oyW4D6kjbxuYLuUjeeRBnRg/XUNQ6HPywC9b4jMgyu7bRnfKgXmM323FYRp3iybuK8BQpv7QbRbX3s4VEjEp/LbPqLBIqiSShy2lRloNI2YfCFyaOunYVSPCavXslzyURdx/l/RiweZe9YDUq03GL8QNs2vMmnS5ieVIqW6X2PNGZqitV5nXNnTPfU+mJk51vzv32C1vQQFZTJ9qBg57GAfp3WfRI3MVfx62ix8Zc1TTjevSB1ISQKRuqv5zFrMsx+5Ymj7mZxokkGqYA1/OS9SxWISZ8+nd9veYB4ykKA3qZEvmF3vaC559pY00IpjlSoI38cQADsSd1EivMhM9JuIxFpOmnLtZJyk1AvW47hxXgXupf099Vfea3ycBElk7eqQ="
file: .bintray.json
This is the MATLAB interface for liblsl.
* You need to add this directory to your MATLAB path recursively
* Using the MATLAB GUI, use File/Set Path...
* Alternatively, in a script, use `addpath(genpath('path/to/liblsl-Matlab'));`
* The bin/ directory needs to contain an up-to-date build of the library file for your MATLAB version.
* e.g. liblsl64.dll for 64-bit MATLAB on Windows.
* e.g. `liblsl64.dylib` and `liblsl64.1.4.0.dylib` for 64-bit MATLAB on MacOS.
* e.g. `liblsl64.so` and `liblsl64.so.1.4.0` for 64-bit MATLAB in Linux
* Once this taken care of, see the example files in the examples/ directory for how to use this interface in a MATLAB program.
### Troubleshooting
If you get an error similar to `lsl_loadlib_ undefined`, then you may need to run the `build_mex.m` script from within the liblsl-Matlab directory. In Linux, you may need to run `build_linux.sh` instead.
On MacOS, you may still get an error similar to `Invalid MEX-file [...] lsl_loadlib_.mexmaci64; Reason: image not found.`. To fix this run the following command in a Terminal window from within the liblsl-Matlab directory: `install_name_tool -add_rpath "@loader_path/" bin/lsl_loadlib_.mexmaci64`
This is the MATLAB interface for liblsl.
* You need to add this directory to your MATLAB path recursively
* Using the MATLAB GUI, use File/Set Path...
* Alternatively, in a script, use `addpath(genpath('path/to/liblsl-Matlab'));`
* The bin/ directory needs to contain an up-to-date build of the library file for your MATLAB version.
* e.g. liblsl64.dll for 64-bit MATLAB on Windows.
* e.g. `liblsl64.dylib` and `liblsl64.1.4.0.dylib` for 64-bit MATLAB on MacOS.
* e.g. `liblsl64.so` and `liblsl64.so.1.4.0` for 64-bit MATLAB in Linux
* Once this taken care of, see the example files in the examples/ directory for how to use this interface in a MATLAB program.
### Troubleshooting
If you get an error similar to `lsl_loadlib_ undefined`, then you may need to run the `build_mex.m` script from within the liblsl-Matlab directory.
(From the command line: `matlab -nodesktop -nosplash -r 'build_mex'`)
On MacOS, you may still get an error similar to `Invalid MEX-file [...] lsl_loadlib_.mexmaci64; Reason: image not found.`. To fix this run the following command in a Terminal window from within the liblsl-Matlab directory: `install_name_tool -add_rpath "@loader_path/" bin/lsl_loadlib_.mexmaci64`
version: 1.12.0.{build}
pull_requests:
do_not_increment_build_number: true
shallow_clone: true
environment:
LSLVERSION: 1.12
OCTAVE_VER: 4.4.0-w64
VCVER: 14.0
install:
- cmd: >-
appveyor DownloadFile https://ftp.gnu.org/gnu/octave/windows/octave-%OCTAVE_VER%.7z -FileName octave.7z
7z x octave.7z -o"c:\dev" -y
build_script:
- cmd: >-
call "C:\Program Files (x86)\Microsoft Visual Studio %VCVER%\VC\vcvarsall.bat" x64
appveyor DownloadFile https://bintray.com/labstreaminglayer/LSL/download_file?file_path=liblsl_x64_%LSLVERSION%.zip -FileName liblsl.zip
7z x liblsl.zip
cp LSL/lib/liblsl64.dll bin/
c:\dev\octave-%OCTAVE_VER%\bin\octave-gui.exe --eval build_mex
del bin\*.o
artifacts:
- path: .
name: ${APPVEYOR_PROJECT_NAME}_x64_${APPVEYOR_BUILD_VERSION}
deploy:
- provider: BinTray
username: tstenner
api_key:
secure: Fo9tIQnGjVnCXB3euItvYrt85A5O9FPqq7LEpsdOuwW+eOg1rwA5Q1HLp4yWDXAl
subject: labstreaminglayer
version: 1.12
repo: LSL
package: liblsl-matlab
override: true
% Build mex bindings
% For Octave on Linux, you need the package liboctave-dev installed
% You also need the liblsl64 binary in the bin folder and a configured
% C compiler (mex -setup)
libs = '-llsl64';
if ispc
dllext = 'dll';
elseif ismac
dllext = 'dylib';
elseif isunix
dllext = 'so';
libs = ['-llsl64 -ldl'];
end
if isempty(dir(['bin/liblsl64.', dllext]))
error(['liblsl64.' dllext ' not found in bin/']);
end
ext = ['.' mexext];
files = dir('mex/*.c');
cd('bin');
for i = 1:length(files)
f = files(i);
[~, base, ~] = fileparts(f.name);
targetstats = dir([base, ext]);
if isempty(targetstats) || f.datenum > targetstats.datenum
mex('-I../../liblsl/include','-L.', libs, ['../mex/', f.name]);
else
disp([base, ext, ' up to date']);
end
end
cd('..');
% Build mex bindings
% For Octave on Linux, you need the package liboctave-dev installed
% You also need the liblsl64 binary in the bin folder and a configured
% C compiler (mex -setup)
libs = {'-llsl64'};
if ispc
dllext = 'dll';
elseif ismac
dllext = 'dylib';
elseif isunix
dllext = 'so';
libs = {'-llsl64','-ldl'};
end
if isempty(dir(['bin/liblsl64.', dllext]))
error(['liblsl64.' dllext ' not found in bin/']);
end