Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare windwos compilation #514

Merged
merged 1 commit into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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