Permalink
Browse files

automatically synchronized identical files to ef56fee

  • Loading branch information...
robertoostenveld committed Sep 21, 2018
1 parent ef56fee commit e2925af2bb76ad957e76260638cd87af8ba8d55a
Showing with 84 additions and 30 deletions.
  1. +28 −10 fileio/private/ft_hastoolbox.m
  2. +28 −10 forward/private/ft_hastoolbox.m
  3. +28 −10 inverse/private/ft_hastoolbox.m
@@ -383,7 +383,7 @@
case 'PLOTLY'
dependency = {'fig2plotly' 'savejson'};
% the following are FieldTrip modules/toolboxes
% the following are FieldTrip modules/toolboxes
case 'FILEIO'
dependency = {'ft_read_header', 'ft_read_data', 'ft_read_event', 'ft_read_sens'};
case 'FORWARD'
@@ -420,13 +420,13 @@
% try to determine the path of the requested toolbox
if autoadd>0 && ~status
% for core FieldTrip modules
prefix = fileparts(which('ft_defaults'));
if ~status
status = myaddpath(fullfile(prefix, lower(toolbox)), silent);
end
% for external FieldTrip modules
prefix = fullfile(fileparts(which('ft_defaults')), 'external');
if ~status
@@ -438,7 +438,7 @@
feval(licensefile);
end
end
% for contributed FieldTrip extensions
prefix = fullfile(fileparts(which('ft_defaults')), 'contrib');
if ~status
@@ -450,25 +450,25 @@
feval(licensefile);
end
end
% for linux computers in the Donders Centre for Cognitive Neuroimaging
prefix = '/home/common/matlab';
if ~status && isfolder(prefix)
status = myaddpath(fullfile(prefix, lower(toolbox)), silent);
end
% for windows computers in the Donders Centre for Cognitive Neuroimaging
prefix = 'h:\common\matlab';
if ~status && isfolder(prefix)
status = myaddpath(fullfile(prefix, lower(toolbox)), silent);
end
% use the MATLAB subdirectory in your homedirectory, this works on linux and mac
prefix = fullfile(getenv('HOME'), 'matlab');
if ~status && isfolder(prefix)
status = myaddpath(fullfile(prefix, lower(toolbox)), silent);
end
if ~status
% the toolbox is not on the path and cannot be added
sel = find(strcmp(url(:,1), toolbox));
@@ -514,6 +514,8 @@
if any(~cellfun(@isempty, regexp(toolbox, {'spm2', 'spm5', 'spm8', 'spm12'})))
% SPM needs to be added with all its subdirectories
addpath(genpath(toolbox));
% check whether the mex files are compatible
check_spm_mex;
else
addpath(toolbox);
end
@@ -600,6 +602,24 @@
token = regexp(version_str,'(\d*)','tokens');
v = str2num([token{:}{:}]);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SUBFUNCTION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function status = check_spm_mex()
status = true;
try
% this will always result in an error
spm_conv_vol
catch
me = lasterror;
% any error is ok, except when due to an invalid MEX file
status = ~isequal(me.identifier, 'MATLAB:mex:ErrInvalidMEXFile');
end
if ~status
% SPM8 mex file issues are common on macOS with recent MATLAB versions
ft_warning('the SPM mex files are incompatible with your platform, see http://bit.ly/2OGF6US');
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% helper function
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -628,7 +648,6 @@
assert(false,'this should not happen');
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% helper function
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -638,7 +657,6 @@
% must be in path and not a variable
status = ~isempty(w) && ~isequal(w, 'variable');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ISFOLDER is needed for versions prior to 2017b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -383,7 +383,7 @@
case 'PLOTLY'
dependency = {'fig2plotly' 'savejson'};
% the following are FieldTrip modules/toolboxes
% the following are FieldTrip modules/toolboxes
case 'FILEIO'
dependency = {'ft_read_header', 'ft_read_data', 'ft_read_event', 'ft_read_sens'};
case 'FORWARD'
@@ -420,13 +420,13 @@
% try to determine the path of the requested toolbox
if autoadd>0 && ~status
% for core FieldTrip modules
prefix = fileparts(which('ft_defaults'));
if ~status
status = myaddpath(fullfile(prefix, lower(toolbox)), silent);
end
% for external FieldTrip modules
prefix = fullfile(fileparts(which('ft_defaults')), 'external');
if ~status
@@ -438,7 +438,7 @@
feval(licensefile);
end
end
% for contributed FieldTrip extensions
prefix = fullfile(fileparts(which('ft_defaults')), 'contrib');
if ~status
@@ -450,25 +450,25 @@
feval(licensefile);
end
end
% for linux computers in the Donders Centre for Cognitive Neuroimaging
prefix = '/home/common/matlab';
if ~status && isfolder(prefix)
status = myaddpath(fullfile(prefix, lower(toolbox)), silent);
end
% for windows computers in the Donders Centre for Cognitive Neuroimaging
prefix = 'h:\common\matlab';
if ~status && isfolder(prefix)
status = myaddpath(fullfile(prefix, lower(toolbox)), silent);
end
% use the MATLAB subdirectory in your homedirectory, this works on linux and mac
prefix = fullfile(getenv('HOME'), 'matlab');
if ~status && isfolder(prefix)
status = myaddpath(fullfile(prefix, lower(toolbox)), silent);
end
if ~status
% the toolbox is not on the path and cannot be added
sel = find(strcmp(url(:,1), toolbox));
@@ -514,6 +514,8 @@
if any(~cellfun(@isempty, regexp(toolbox, {'spm2', 'spm5', 'spm8', 'spm12'})))
% SPM needs to be added with all its subdirectories
addpath(genpath(toolbox));
% check whether the mex files are compatible
check_spm_mex;
else
addpath(toolbox);
end
@@ -600,6 +602,24 @@
token = regexp(version_str,'(\d*)','tokens');
v = str2num([token{:}{:}]);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SUBFUNCTION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function status = check_spm_mex()
status = true;
try
% this will always result in an error
spm_conv_vol
catch
me = lasterror;
% any error is ok, except when due to an invalid MEX file
status = ~isequal(me.identifier, 'MATLAB:mex:ErrInvalidMEXFile');
end
if ~status
% SPM8 mex file issues are common on macOS with recent MATLAB versions
ft_warning('the SPM mex files are incompatible with your platform, see http://bit.ly/2OGF6US');
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% helper function
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -628,7 +648,6 @@
assert(false,'this should not happen');
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% helper function
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -638,7 +657,6 @@
% must be in path and not a variable
status = ~isempty(w) && ~isequal(w, 'variable');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ISFOLDER is needed for versions prior to 2017b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -383,7 +383,7 @@
case 'PLOTLY'
dependency = {'fig2plotly' 'savejson'};
% the following are FieldTrip modules/toolboxes
% the following are FieldTrip modules/toolboxes
case 'FILEIO'
dependency = {'ft_read_header', 'ft_read_data', 'ft_read_event', 'ft_read_sens'};
case 'FORWARD'
@@ -420,13 +420,13 @@
% try to determine the path of the requested toolbox
if autoadd>0 && ~status
% for core FieldTrip modules
prefix = fileparts(which('ft_defaults'));
if ~status
status = myaddpath(fullfile(prefix, lower(toolbox)), silent);
end
% for external FieldTrip modules
prefix = fullfile(fileparts(which('ft_defaults')), 'external');
if ~status
@@ -438,7 +438,7 @@
feval(licensefile);
end
end
% for contributed FieldTrip extensions
prefix = fullfile(fileparts(which('ft_defaults')), 'contrib');
if ~status
@@ -450,25 +450,25 @@
feval(licensefile);
end
end
% for linux computers in the Donders Centre for Cognitive Neuroimaging
prefix = '/home/common/matlab';
if ~status && isfolder(prefix)
status = myaddpath(fullfile(prefix, lower(toolbox)), silent);
end
% for windows computers in the Donders Centre for Cognitive Neuroimaging
prefix = 'h:\common\matlab';
if ~status && isfolder(prefix)
status = myaddpath(fullfile(prefix, lower(toolbox)), silent);
end
% use the MATLAB subdirectory in your homedirectory, this works on linux and mac
prefix = fullfile(getenv('HOME'), 'matlab');
if ~status && isfolder(prefix)
status = myaddpath(fullfile(prefix, lower(toolbox)), silent);
end
if ~status
% the toolbox is not on the path and cannot be added
sel = find(strcmp(url(:,1), toolbox));
@@ -514,6 +514,8 @@
if any(~cellfun(@isempty, regexp(toolbox, {'spm2', 'spm5', 'spm8', 'spm12'})))
% SPM needs to be added with all its subdirectories
addpath(genpath(toolbox));
% check whether the mex files are compatible
check_spm_mex;
else
addpath(toolbox);
end
@@ -600,6 +602,24 @@
token = regexp(version_str,'(\d*)','tokens');
v = str2num([token{:}{:}]);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SUBFUNCTION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function status = check_spm_mex()
status = true;
try
% this will always result in an error
spm_conv_vol
catch
me = lasterror;
% any error is ok, except when due to an invalid MEX file
status = ~isequal(me.identifier, 'MATLAB:mex:ErrInvalidMEXFile');
end
if ~status
% SPM8 mex file issues are common on macOS with recent MATLAB versions
ft_warning('the SPM mex files are incompatible with your platform, see http://bit.ly/2OGF6US');
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% helper function
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -628,7 +648,6 @@
assert(false,'this should not happen');
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% helper function
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -638,7 +657,6 @@
% must be in path and not a variable
status = ~isempty(w) && ~isequal(w, 'variable');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ISFOLDER is needed for versions prior to 2017b
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

0 comments on commit e2925af

Please sign in to comment.