MT Showcase SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Getting started

This reference documentation provides information on how to write custom C++ plugins for MT Showcase.
MT Showcase is built on Cornerstone SDK and relies heavily on its concepts. See the Cornerstone documentation here.

Setting up development environment

The sections below describe how to setup a development environment for Showcase SDK.

Windows

By default, Showcase SDK will install to C:\Program Files\MT Showcase.

Linux

  • Install gcc-8 compiler:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-8 g++-8

The Showcase SDK will install into /opt/mt-showcase

Plugin system

To extend Showcase, you write your own custom components using the Showcase component system. See Component system for more information on different Showcase components and how to write them.
Components are imported to Showcase in packages, each package can include one or more components. See Packages for how to define and import custom packages into Showcase.

Showcase SDK has example plugins under examples/plugins. You can copy this folder to a convenient place and test your build environment by building and running the examples, see Building examples.

You must recompile your plugins after updating Showcase. Different versions are not binary compatible.

Loading packages

By default Showcase looks for packages under lib in its installation folder, and standard plugin folder locations that depend on the platfrom.

On Windows Showcase automatically loads plugins from these system and user data folders

%PROGRAMDATA%\MultiTaction\showcase\plugins
%LOCALAPPDATA%\MultiTaction\showcase\plugins

On Linux Showcase loads plugins from these system and user data folders

/etc/MultiTaction/mt-showcase/plugins
/home/multi/MultiTaction/showcase/plugins

If you want to load packages from non-standard locations, you can add custom package locations by editing the configuration files for the client and server.

Custom package locations

To load custom packages into the client, create a file showcase-config.json Then add you packages path in it, for example:

{
"component-paths" : [ "/home/multi/ShowcasePlugins" ]
}

Give the file location to Showcase client with showcase-config command line parameter, for example

mt-showcase --showcase-config /home/multi/showcase-config.json

If you're running Showcase with MT Launcher, customize the Showcase tile to include the command line parameter. Copy the default Showcase pipeline configuration file to the user configuration folder, and add the command line parameter to the custom configuration file. See Launcher documentation for more information.

To load custom packages to the server, edit production_users.yaml. This file is under /etc/MultiTaction/mt-showcase/server on Linux and under MT Showcase SDK\server on Windows.

For example:

component_paths: "/home/multi/ShowcasePlugins"

Note that you need to set the path for both Showcase client and server. Restart both the server and client to load new plugins.

Building examples

You can test your development environment and learn how to load custom packages by building and running the Showcase examples. The examples are under examples/plugins in your Showcase installation directory. You can copy the examples to a convenient location where you have the necessary access rights.

The examples use a SHOWCASE_SDK_ROOT environment variable to locate the plugin.pri:

exists($$(SHOWCASE_SDK_ROOT)/plugin.pri):include($$(SHOWCASE_SDK_ROOT)/plugin.pri)
else:error(Failed to find plugin.pri. Is SHOWCASE_SDK_ROOT set?)

Make sure SHOWCASE_SDK_ROOT environment variable is set to point to your Showcase installation, for example:

// Windows
set SHOWCASE_SDK_ROOT=C:\Program Files\MT Showcase
// Linux
export SHOWCASE_SDK_ROOT=/opt/mt-showcase

Note that you shouldn't use quotes in the environment variable value, or qmake wont parse it correctly.

Windows

Steps to build and run HelloPlugins on Windows:

  • Copy HelloPlugins directory to "%LOCALAPPDATA%\MultiTaction\showcase\plugins"
  • Open 64bit compiler prompt
  • Set SHOWCASE_SDK_ROOT to point to Showcase installation root
  • Navigate to HelloPlugins
  • "%SHOWCASE_SDK_ROOT%\bin\qmake"
  • nmake
  • Restart the Showcase server
  • Restart the Showcase client

Linux

Steps to build and run HelloPlugins on Linux:

  • Copy HelloPlugins directory to /home/multi/MultiTaction/showcase/plugins
  • Open terminal window
  • Set SHOWCASE_SDK_ROOT to point to Showcase installation root
  • Navigate to HelloPlugins
  • run qmake, for example /opt/multitaction-qt/5.12/gcc_64/bin/qmake
  • make
  • Restart the Showcase server
  • Restart the Showcase client