Skip to content
Snippets Groups Projects
Verified Commit d6c536f5 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Drop routines for downloading X13-ARIMA-SEATS binaries from the website

On Windows and macOS, those binaries are now bundled in packages. On Debian,
one can use the official x13as package.
parent 29a2aa76
Branches
No related tags found
No related merge requests found
...@@ -30,25 +30,19 @@ Add the `dseries/src` folder to the MATLAB/Octave path, and run the following co ...@@ -30,25 +30,19 @@ Add the `dseries/src` folder to the MATLAB/Octave path, and run the following co
>> dseries().initialize() >> dseries().initialize()
which, depending on your system, will add the necessary subfolders to which, depending on your system, will add the necessary subfolders to
the MATLAB/Octave path. Also, if the MATLAB/Octave path.
[X13-ARIMA-SEATS](https://www.census.gov/srd/www/x13as/) is not
installed in your system (on debian it is possible to install it with
the `apt-get`) you will need (only the first time) to install the
binary. Scripts are available to install (or update) this
dependency. From the MATLAB/Octave prompt:
>> cd dseries/externals/x13 You are then ready to go. A full documentation will come soon,
>> installx13()
and run the configuration again:
>> dseries.initialize()
You should not see the warning related to the missing `x13as`
binary. You are then ready to go. A full documentation will come soon,
but you can already obtain a general idea by looking into the Dynare but you can already obtain a general idea by looking into the Dynare
reference manual. reference manual.
Note that [X13-ARIMA-SEATS](https://www.census.gov/srd/www/x13as/) is required
for accessing all the features of the toolbox. On Windows and macOS, an
X13-ARIMA-SEATS binary is included in standalone dseries packages and in Dynare
packages. On Debian and Ubuntu it is possible to install X13-ARIMA-SEATS with
`apt install x13as` (on Debian, you must have the non-free archive area listed
in package sources).
## Examples ## Examples
### Instantiate a dseries object from an array ### Instantiate a dseries object from an array
......
x13.zip
linux/*
windows/*
*~
function installx13()
% Installs CENSUS X13 binaries (Windows and Linux).
% Copyright (C) 2017-2018 Dynare Team
%
% This code is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare dseries submodule is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
if ~exist('x13.zip','file')
if ~isoctave() && verLessThan('matlab', 'R2014b')
websave('x13.zip', 'https://www.dynare.org/x13/x13.zip');
else
urlwrite('https://www.dynare.org/x13/x13.zip', 'x13.zip');
end
unzip('x13.zip');
if ismac()
if exist('./osx', 'dir')
rmdir('osx', 's')
end
mkdir osx;
movefile('binaries/osx/*','./osx');
elseif isunix()
if exist('./linux', 'dir')
rmdir('linux', 's')
end
mkdir linux;
movefile('binaries/linux/*','./linux');
elseif ispc()
if exist('./windows', 'dir')
rmdir('windows', 's')
end
mkdir windows;
movefile('binaries/windows/*','./windows');
else
error('X13 is not available for the current platform!')
end
rmdir('binaries', 's');
end
function uninstallx13()
% Uninstalls CENSUS X13 binaries (Windows, OSX and Linux).
% Copyright (C) 2017 Dynare Team
%
% This code is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare dseries submodule is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
if exist('x13.zip','file')
delete('x13.zip')
end
if exist('linux','dir')
rmdir('linux', 's')
end
if exist('windows','dir')
rmdir('windows', 's')
end
if exist('osx','dir')
rmdir('osx', 's')
end
\ No newline at end of file
function updatex13()
% Uninstalls CENSUS X13 binaries (Windows, OSX and Linux).
% Copyright (C) 2017 Dynare Team
%
% This code is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare dseries submodule is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
if exist('x13.zip','file')
delete('x13.zip')
end
if exist('./binaries', 'dir')
rmdir('binaries', 's');
end
installx13();
\ No newline at end of file
...@@ -37,7 +37,7 @@ else ...@@ -37,7 +37,7 @@ else
error('Unsupported platform.') error('Unsupported platform.')
end end
if nox13 if nox13
warning('X13 binary is not available.\nIf you are under Debian or Ubuntu, you can install it through your package manager, with ''apt install x13as''.\nOtherwise, you can install it manually by running\nthe function installx13() available in:\n\n\t%s\n', [dseries_src_root(1:end-4), 'externals' filesep() 'x13']); warning('X13 binary is not available.\nIf you are under Debian or Ubuntu, you can install it through your package manager, with ''apt install x13as''.\nIf you are under Windows or macOS, this probably means that you did not install the dseries toolbox through an official package.\n');
end end
% Set the subfolders to be added in the path. % Set the subfolders to be added in the path.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment