Build a toolbox

 To get started you can get inspiration from the toolbox_skeleton, packaged and distributed with Scilab in the contrib directory:To get started you can get inspiration from the toolbox_skeleton, packaged and distributed with Scilab in the contrib directory:

 

Minimal Version

Let us start with the very little you need in order to get your toolbox working:

  • etc/
    • myToolbox.quit
    • myToolbox.start
  • macros/
    • buildmacros.sce
    • myFirstFunction.sci
  • builder.sce
  • cleaner.sce

 

 

.quit

Not so important at first. It defines the actions to perform when we quit the toolbox. You can leave it empty.

.start

This script is executed at startup. You can add a function call at the end of the script.

Macros

This is where you save all your functions written in Scilab (also called macros).

Buildmacros

This script is called by the builder.sce at the root of your toolbox. It generates a binary version of your Scilab functions (.bin).

 Builder

By executing this file, you will build your toolbox.

 

Cleaner 

This is important if you want to carry modifications on your toolbox. You need to clean the previous build. This will result in deleting all the .bin files, as long as the loader and unloader.