File Exchange

image thumbnail

Toolbox Installer 2.2

version (2.66 KB) by Rasmus Anthin
Routines for easily installing and uninstalling toolbox directories.


Updated 22 Jul 2003

No License

This kit contains four files for assisting the toolbox author to make a userfriendly alternative to EDITPATH for his/her toolbox. The author uses MAKEINSTALL to create an info-file that will be located in the base/home-directory of a particular toolbox. Then by including the INSTALL and UNINSTALL programs in your toolbox the user simply writes INSTALL to install the directories you specified (you don't have to specify the base directory) to the matlab path, or removing them from the matlabpath by using UNINSTALL.

You can at any instant check the info-file by executing the CHECKINSTALL command.

Example of usage:
The author does something like this:

» cd(fullfile(matlabroot,'toolbox','digitalsim'))
» disp(pwd)
» makeinstall gates latches flipflops registers counters

The user does something like this:

» cd(fullfile(matlabroot,'toolbox','digitalsim'))
» install

Cite As

Rasmus Anthin (2020). Toolbox Installer 2.2 (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (4)

Norbert Marwan

Why not simply use the <a href="">makeinstall tool</a>? It provides the author of the toolbox with a single install file, dynamically created from the toolbox. Makeinstall or the installer, resp., is only ONE script, containing everything you need.

Rasmus Anthin

I think you can solve it by simply creating a pathdef.m on your account (with editpath or pathtool) if it's not there, then use the "-" flag for the installer. See "help install".

Paul Leopardi

I need something similar, what I would call a package installer. This would be for users who do not have system privileges and want to install a package in their home directory, etc. Instead of changing pathdef.m, it would need to change startup.m, or create it if it does not exist.

Rasmus Anthin

I should point out that these routines use matlab's PATH2RC in order to write to the pathdef.m file.


A warning rather than an error will be shown when attempting to reinstall an already installed toolbox or uninstalling an already uninstalled toolbox.

I thought that ADDPATH would automatically update the pathdef.m file, which it doesn't. So this new version saves the path using PATH2RC.
Selection of pathdef.m to save to is now also possible.

MATLAB Release Compatibility
Created with R10
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired: eq_sphere_partitions