Skip to content

Commit

Permalink
Fixed ability to find subclasses in the deployed version in MATLAB 2019a
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanRace committed Apr 9, 2019
1 parent d9e4568 commit 21606de
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ src/processing/postprocessing/tSNE/
us.stackdump

Ontologies/

mccExcludedFiles\.log

*.exe
7 changes: 4 additions & 3 deletions src/SpectralAnalysis.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
if(isdeployed())
disp('Initialising MATLAB, please wait...');
path = ctfroot();
disp(path);
else
path = [fileparts(mfilename('fullpath'))];

% Ensure all folders are on the path
addpath(genpath(path));
end

% Ensure all folders are on the path
addpath(genpath(path));

% Ensure libraries are on the path
addJARsToClassPath();

Expand Down
8 changes: 8 additions & 0 deletions src/util/getSubclasses.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@
% Get the location of the m file to instigate the search for subclasses
if(isdeployed())
spectralAnalysisPath = [ctfroot() filesep 'src' filesep];

if(~exist(spectralAnalysisPath, 'file'))
spectralAnalysisPath = [ctfroot() filesep 'SpectralAnal' filesep 'src' filesep];
end
else
spectralAnalysisPath = [fileparts(mfilename('fullpath')) filesep '..' filesep];
end

if(~exist(spectralAnalysisPath, 'file'))
disp(['Couldn''t find the SpectralAnalysis path: ' spectralAnalysisPath]);
end

% Limit the locations to speed up the search when looking for specific
% types
Expand Down

0 comments on commit 21606de

Please sign in to comment.