Skip to content

Commit

Permalink
Merge pull request #514 from HJZollner/develop
Browse files Browse the repository at this point in the history
Prepare windwos compilation
  • Loading branch information
HJZollner authored Sep 6, 2022
2 parents 0b1fde5 + c1f0b9c commit 4dd5145
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
Binary file modified job/CreateOspreyJob.mlapp
Binary file not shown.
4 changes: 2 additions & 2 deletions job/CreateOspreyJob_app.m
Original file line number Diff line number Diff line change
Expand Up @@ -497,11 +497,11 @@ function StatcsvFileButtonPushed(app, event)

% Button pushed function: basissetfileButton
function basissetfileButtonPushed(app, event)
info = 'Select a .mat basis file to overwrite the automatic basis set selection';
info = 'Select a basis file (.mat for Osprey / .basis for LCModel) to overwrite the automatic basis set selection';

ndata = 1;

basisfiles = spm_select(ndata,'any',info,{},pwd,'any','1');
basisfiles = spm_select(ndata,'any',info,{},pwd,{'.mat','.BASIS','.basis'},'1');

app.BasisSetEditField.Value = basisfiles(1,:);

Expand Down
19 changes: 16 additions & 3 deletions settings/OspreySettings.m
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,30 @@
MRSCont.flags.didOverview = 0;

if (ismcc || isdeployed)
currentDir = ctfroot;
[currentDir,~,~] = fileparts(currentDir);
SepFileList = split(currentDir, filesep);
if ismac
currentDir = ctfroot;
[currentDir,~,~] = fileparts(currentDir);
SepFileList = split(currentDir, filesep);
index = find(strcmp(SepFileList,'application'));
if ~isempty(index)
MRSCont.opts.fit.basissetFolder = fullfile(SepFileList{1:index},'basissets');
else
MRSCont.opts.fit.basissetFolder = [];
end
end
if ispc
[~, result] = system('path');
currentDir = char(regexpi(result, 'Path=(.*?);', 'tokens', 'once'));
SepFileList = split(currentDir, filesep);
MRSCont.opts.fit.basissetFolder =currentDir;
index = find(strcmp(SepFileList,'application'));
if ~isempty(index)
MRSCont.opts.fit.basissetFolder = fullfile(SepFileList{1:index},'basissets');
else
MRSCont.opts.fit.basissetFolder = [];
end
end

else
MRSCont.opts.fit.basissetFolder = [];
end
Expand Down

0 comments on commit 4dd5145

Please sign in to comment.