function config = ecrobot_install_config
% ECROBOT_INSTALL_CONFIG
%
% C = ECROBOT_INSTALL_CONFIG returns a structure of configuration
% information that is used by DOWNLOAD_ECROBOT_TOOLS,
% INSTALL_ECROBOT_TOOLS, and CHECK_ECROBOT_TOOLS.
%
% ECROBOT_INSTALL_CONFIG, by itself, displays the installation
% directories of the various components
% Copyright 2009 The MathWorks, Inc.
% ECRobotInstaller version 1.37: (Jan-01-2011)
% * Changed config.NXTOSEK_URL to point to http://voxel.dl.sourceforge.net/...
% (the previous URL no longer worked for automated download)
% * Changed config.GnuTools_EXEFile, ECRobot_ZIPFile, etc. These were
% hardcoded to the name of the downloaded file (which may encode version
% numbers and other incidental info). Now the .exe and .zip files have
% more generic names.
%
% ECRobotInstaller version 1.38: (Dec-01-2011)
% * Changed config.NXTOSEK_URL to point to nxtOSEK ver 2.14 (needed for ECRobot 4.0)
% * Changed Cygwin URL to mirror.mcs.anl.gov (gatech.edu was no longer a valid mirror)
% * Changed Cygwin_quiet_download default to false. When it was true, on Win7 w/ 32-bit
% MATLAB the cygwin setup.exe wasn't downloading (it seemed to do a dummy run)
config = [];
%% --------------------------------
% All the downloaded files are saved under the archive directory. Before
% running DOWNLOAD_ECROBOT_TOOLS, ensure that this directory exists and is
% writable.
% The string "%DEFAULT%" expands to the name of the directory that has
% contains this file (ECROBOT_INSTALL_CONFIG). You can also specify an
% absolute pathname
config.ArchiveDir = '%DEFAULT%\ECRobotDownloads\';
% config.ArchiveDir = 'C:\ECRobotDownloads\'; % Optional absolute path
%% --------------------------------
% The following entries are used by DOWNLOAD_ECROBOT_TOOLS. They specify
% the file names for the downloaded files (all the files and directories
% will be created under config.ArchiveDir). You shouldn't need to modify
% these names.
config.Cygwin_PackageDirectory = 'cygwin_packages';
config.GnuTools_EXEFile = 'gnu_arm_installer.exe';
config.LEGOUSBDriver_ZIPFile = 'lego_standard_usb_driver.zip';
config.NXTEnhancedFirmware_ZIPFile = 'nxt_enhanced_firmware.zip';
config.NXTTOOL_ZIPFile = 'nexttool.zip';
config.ECRobot_ZIPFile = 'ecrobotNXT.zip';
config.NXTOSEK_ZIPFile = 'nxtOSEK.zip';
% If Cygwin_quiet_download is true, then Cygwin will be downloaded
% silently. If it is false, the Cygwin dialog boxes will be displayed
% during the download, allowing the default settings to be changed.
% Use this if you need to configure Cygwin to use a proxy server.
config.Cygwin_quiet_download = false;
%% --------------------------------
% The following entries are used by INSTALL_ECROBOT_TOOLS and
% CHECK_ECROBOT_TOOLS. They specify where the various programs should be
% installed.
% Note:
% 1) The Cygwin and GnuTools installation directories should not
% contain any spaces.
% 2) If an InstallationDirectory value is [], the installation for that
% program is skipped.
config.Cygwin_InstallationDirectory = 'c:\cygwin\';
config.GnuTools_InstallationDirectory = 'c:\LegoMindstorms\GNU_ARM_Compiler\';
config.LEGOUSBDriver_InstallationDirectory = 'c:\LegoMindstorms\LEGO_USB_Driver\';
config.NXTEnhancedFirmware_InstallationDirectory = 'c:\LegoMindstorms\NXT_Tools\';
config.NXTTOOL_InstallationDirectory = 'c:\LegoMindstorms\NXT_Tools\';
config.ECRobot_InstallationDirectory = 'c:\LegoMindstorms\ECRobot\';
% Do not change the following line. nxtOSEK is required to be installed in
% the ECRobot environment subdirectory.
config.NXTOSEK_InstallationDirectory = '%ECRobot_InstallationDirectory%\ecrobotNXT\environment\';
%% --------------------------------
% The following entries are used by DOWNLOAD_ECROBOT_TOOLS, and they
% specify the download URLs for the various programs. You shouldn't need to
% necessary to modify this information, except if:
% 1) You want to specify a different mirror for Cygwin downloads
% (the list of mirrors is here: http://www.cygwin.com/mirrors.html).
% 2) One of the URLs becomes stale. If so, either specify the new URL here,
% or email me (Gautam.Vallabha@mathworks.com) so that I can update the
% URL list as needed.
config.Cygwin_URL = 'http://mirror.mcs.anl.gov/cygwin/';
config.GnuTools_URL = 'http://www.gnuarm.com/bu-2.16.1_gcc-4.0.2-c-c++_nl-1.14.0_gi-6.4.exe';
config.LEGOUSBDriver_URL = 'http://cache.lego.com/upload/contentTemplating/Mindstorms2SupportFilesDownloads/otherfiles/download936C391AD9DAA7CB4AA9A9ADBEED89FB.zip';
config.NXTEnhancedFirmware_URL = 'http://bricxcc.sourceforge.net/lms_arm_nbcnxc.zip';
config.NXTTOOL_URL = 'http://bricxcc.sourceforge.net/nexttool.zip';
config.ECRobot_URL = 'http://www.mathworks.com/matlabcentral/fileexchange/13399?controller=file_infos&download=true';
config.NXTOSEK_URL = 'http://voxel.dl.sourceforge.net/project/lejos-osek/nxtOSEK/nxtOSEK_v214.zip';
%% --------------------------------
% DO NOT MODIFY THE CODE BELOW!
% Expand %DEFAULT% to the current directory
if isfield(config, 'ArchiveDir')
currentDir = fileparts(which(mfilename));
config.ArchiveDir = strrep(config.ArchiveDir, '%DEFAULT%', currentDir);
end
% Ensure that NXT OSEK is installed in the ECRobot directory
if isfield(config, 'ECRobot_InstallationDirectory') && isfield(config, 'NXTOSEK_InstallationDirectory')
config.NXTOSEK_InstallationDirectory = strrep(config.NXTOSEK_InstallationDirectory, ...
'%ECRobot_InstallationDirectory%', config.ECRobot_InstallationDirectory);
end
config.InstallType = 'RequireClickthrough';
config.InstallerVersion = 'Version 1.381 (Dec-7-2011)';
%% --------------------------------
if nargout == 0
fprintf('-------------\n');
fprintf('Archive directory for installation files:\n %s\n', config.ArchiveDir);
fprintf('-------------\n');
fprintf('Installation directories\n');
fprintf(' Cygwin : %s\n', config.Cygwin_InstallationDirectory);
fprintf(' GNU ARM Compiler : %s\n', config.GnuTools_InstallationDirectory);
fprintf(' LEGO USB Driver : %s\n', config.LEGOUSBDriver_InstallationDirectory);
fprintf(' NXT Firmware : %s\n', config.NXTEnhancedFirmware_InstallationDirectory);
fprintf(' NXT Tools : %s\n', config.NXTTOOL_InstallationDirectory);
fprintf(' ECRobot : %s\n', config.ECRobot_InstallationDirectory);
fprintf(' NXT OSEK : %s\n', config.NXTOSEK_InstallationDirectory);
fprintf('-------------\n');
clear config;
end