Install

Disclaimer

BlockFactory has been widely tested on Ubuntu 16:04 and Ubuntu 18.04 with Matlab R2017b. If you face any issue either with your OS or Matlab version, please submit an Issue.

Requirements

  • Supported Operating Systems
    • GNU/Linux
    • macOS
    • Windows
  • C++14 compiler
  • CMake 3.5

BlockFactory provides three components, listed here below with their dependencies. If a component dependency is not found, the component is not built.

Core SimulinkCoder Simulink
Dependencies ~ ~ - Matlab
- Simulink

Note

Simulink Coder is not a build dependency of the SimulinkCoder component. Of course, you must have it if you want to generate C++ code from a Simulink model.

Installation

If all the dependencies are met, proceed with the following instructions:

From sources

Substitute to <install-prefix> the absolute path where you want to install the project.

git clone https://github.com/robotology/blockfactory.git
mkdir -p blockfactory/build && cd blockfactory/build
cmake .. -DCMAKE_INSTALL_PREFIX=<install-prefix>
cmake --build .
cmake --build . --target install
git clone https://github.com/robotology/blockfactory.git
mkdir -p blockfactory/build && cd blockfactory/build
cmake .. -DCMAKE_INSTALL_PREFIX=<install-prefix>
cmake --build . --config Release
cmake --build . --config Release --target install

Configuration

Matlab

BlockFactory provides the support of:

These two files are installed in the <install-prefix>/mex folder, which should be added to the Matlab search path.

Plugins

The archictecture of BlockFactory is based on a plugin system. The libraries containing the blocks must be found in the filesystem. Add to the following environment variable all the folders that contain BlockFactory plugins:

Environment

export BLOCKFACTORY_PLUGIN_PATH=/installfolder1/subfolder1/blockfactory:/installfolder2/subfolder2/blockfactory/:<...>
$env:BLOCKFACTORY_PLUGIN_PATH = "C:\installfolder1\subfolder1\blockfactory;C:\installfolder2\subfolder2\blockfactory:<...>";