Commit 67d08340 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Fixed behaviour in case of missing X13 binary...

... Also do not crash dynare_config() if matlab is not able to download the X13 binary.
parent f7d8164a
...@@ -22,8 +22,16 @@ function run(o, basename) ...@@ -22,8 +22,16 @@ function run(o, basename)
% Print spc file. % Print spc file.
basename = o.print(); basename = o.print();
% Get expected path to X13 binary.
x13b = select_x13_binary();
% Test for the existence of the binary.
if ~exist(x13b, 'file')
error('X13 is not available, so we cannot run the generated spc file.')
end
% Run spc file. % Run spc file.
[~, ~] = system(sprintf('%s %s', select_x13_binary(), basename)); [~, ~] = system(sprintf('%s %s', x13b, basename));
o.results.name = basename; % Base name of the generated files. o.results.name = basename; % Base name of the generated files.
......
...@@ -78,8 +78,13 @@ end ...@@ -78,8 +78,13 @@ end
% Install X13 binaries % Install X13 binaries
opath = pwd(); opath = pwd();
cd([dseries_src_root '/../externals/x13']) try
installx13(); cd([dseries_src_root '/../externals/x13'])
installx13();
catch
warning('X13 is not available!')
p(strmatch('/utilities/x13', p, 'exact')) = [];
end
cd(opath); cd(opath);
% Set path % Set path
......
...@@ -40,5 +40,5 @@ elseif ispc() ...@@ -40,5 +40,5 @@ elseif ispc()
x13_binary = sprintf('%s%s%s%s', x13_binary, '32', filesep(), 'x13.exe'); x13_binary = sprintf('%s%s%s%s', x13_binary, '32', filesep(), 'x13.exe');
end end
else else
error('X13 binary is not yet available for this plateform') error('X13 binary is not available for this plateform')
end end
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment