ghtb
provides a simple way to manage toolbox installation of open-source MATLAB Community Toolboxes linked to GitHub (via Releases).
This Toolbox can be accessed via ghtb
and provides a way to directly install
, uninstall
, require
, or package
MATLAB Community Toolboxes. For upgrade and downgrade use-cases, users can set the override
option to force the install. GHToolbox
makes the following assumptions:
- Community Toolbox linked on FileExchange to GitHub via GitHub Releases.
- Community Toolbox publicly available as open-source on GitHub.
- Community Toolbox attaches a single
.mltbx
artifact to GitHub Releases. - Community Toolbox name matches the filename of
.mltbx
artifact. - Users do not wish to have multiple simultaneous versions installed i.e. only a single version per Toolbox is installed at any given time.
Here are some examples on how to invoke it once installed or saved to path:
ghtb.install('guzman-raphael/compareVersions') % default: version='latest' and override=false
ghtb.install('guzman-raphael/compareVersions', 'version', '1.0.7') % default: override=false
ghtb.install('guzman-raphael/compareVersions', 'version', '1.0.6', 'override', true)
ghtb.install('guzman-raphael/compareVersions', 'version', ...
@(v) cellfun(@(x) contains(x, '1.0.'), v, 'uni', true))
ghtb.install('compareVersions.mltbx') %install from local toolbox file
ghtb.uninstall('compareVersions') % uninstalls all versions of Toolbox
requiredToolboxes = {...
struct(...
'Name', 'GHToolbox', ...
'ResolveTarget', 'datajoint/GHToolbox'...
), ...
struct(...
'Name', 'compareVersions', ...
'ResolveTarget', 'guzman-raphael/compareVersions', ...
'Version', '1.0.8'...
), ...
struct(...
'Name', 'mym', ...
'ResolveTarget', 'datajoint/mym', ...
'Version', @(v) cellfun(@(x) contains(x, '2.7.'), v, 'uni', true)...
)...
};
ghtb.require(requiredToolboxes) % require with prompts
ghtb.require(requiredToolboxes, 'prompt', false)
ghtb.package('GHToolbox', ...
'Raphael Guzman', ...
'raphael.h.guzman@gmail.com', ...
['''ghtb'' provides a simple way to manage addon installation of ' ...
'open-source MATLAB Community Toolboxes linked to GitHub (via ' ...
'Releases).'], ...
'long description', ...
{'.vscode', '.git', '.env', '.gitignore', '.travis.yml', 'tests', ...
'*docker-compose.yml', 'LICENSE', 'matlab.prf', 'package.m', ...
'README.md'}, ...
@() ghtb.version, ...
{'+ghtb'});
ghtb.package('mym', ...
'Raphael Guzman', ...
'raphael.h.guzman@gmail.com', ...
'MySQL API for MATLAB with support for BLOB objects', ...
'long description', ...
{'mexa64/libmysqlclient.so.18.4.'}, ...
@() strjoin(arrayfun(@(x) num2str(x), ...
cell2mat(struct2cell(mym('version'))), ...
'uni', false), ...
'.'), ...
{'distribution/mexa64', 'distribution/mexmaci64', ...
'distribution/mexw64'}, ...
'toolboxVersionDir', 'distribution/mexa64', ...
'toolboxRootDir', 'distribution');
ghtb.version % display GHToolbox version
- Utilize MATLAB built-in GUI i.e. Top Ribbon -> Add-Ons -> Get Add-Ons
- Search and Select
GHToolbox
- Select Add from GitHub
- Utilize MATLAB built-in GUI i.e. Top Ribbon -> Add-Ons -> Get Add-Ons
- Search and Select
GHToolbox
- Select Download from GitHub
- Save
GHToolbox.mltbx
locally - Navigate in MATLAB tree browser to saved toolbox file
- Right-Click and Select Install
- Select Install
- Download
GHToolbox.mltbx
locally - Navigate in MATLAB tree browser to saved toolbox file
- Right-Click and Select Install
- Select Install