MATLAB C/C++ Graphics Library    

Distributing Stand-Alone Graphics Applications 

You may freely distribute applications you develop with the MATLAB C/C++ Graphics Library, subject to The MathWorks software license agreement. However, when you package your application for distribution, remember to include, along with your application executable, these additional files:

To make packaging an application easier, the graphics library has prepackaged all the necessary MATLAB run-time libraries into a single, self-extracting archive file. For more information about how you can use this archive, see Packaging the MATLAB Run-Time Libraries. For information about how customers who receive your application can use this archive, see Installing Your Application.

Packaging the MATLAB Run-Time Libraries

The MATLAB C/C++ Graphics Library has prepackaged all the MATLAB math and graphics run-time libraries required by stand-alone graphics applications into a single, self-extracting archive file, called the MATLAB Math and Graphics Run-Time Library Installer. Instead of including all the run-time libraries individually in your stand-alone application distribution package, you can simply include this archive file.

The following table lists the name of the archive file for both PCs and UNIX systems. In the table <MATLAB> represents your MATLAB installation directory and <ARCH> represents your UNIX platform.

Platform
MATLAB Math and Graphics Run-Time Library Installer
UNIX systems
<MATLAB>/extern/lib/<ARCH>/mglinstaller
PCs
<MATLAB>\extern\lib\win32\mglinstaller.exe

Installing Your Application

To install your application, your customers must:

On UNIX Systems

On UNIX systems, your customers run the MATLAB Math and Graphics Run-Time Library Installer by executing the mglinstaller command at the system prompt. Your customers can specify the name of the directory into which they want to install the libraries. By default, the installer puts the files in the current directory.

After the installer unpacks and uncompresses the libraries, your customers must add the name of the bin/<ARCH> subdirectory to the LD_LIBRARY_PATH environment variable. (The equivalent variable on HP-UX systems is the SHLIB_PATH.)

For example, if your customers working on a Linux system specify the installation directory mgl_runtime_dir, then they must add
mgl_runtime_dir/bin/glnx86 to the LD_LIBRARY_PATH environment variable.

On PCs

On PCs, your customers can run the MATLAB Math and Graphics Run-Time Library Installer by double-clicking on the mglinstaller.exe file. Your customers can specify the name of the directory into which they want to install the libraries. By default, the installer puts the files in the current directory.

After the installer unpacks and uncompresses the libraries, your customers must add the bin\win32 subdirectory to the system path variable (PATH).

For example, if your customers specify the installation directory mgl_runtime_dir, then they must add mgl_runtime_dir\bin\win32 to PATH.


 Changes to the Figure Window File Menu Options Troubleshooting