This page discusses how to build the Magic Lantern SDK for Linux platforms using the C++ implementation.
The Linux build of the Magic Lantern SDK has the following dependencies:
These instructions assume the following
Set the variable MLE_HOME to reference the home of the Magic Lantern source. This document assumes that it is set to "$HOME/Projects/wz-mle-code".
Set the variable MLE_ROOT to reference the root directory where the Magic Lantern components will be installed. This document assumes that it is set to "/opt/MagicLantern".
Set the variable MLE_WORKPRINTS to the root directory where Magic Lantern Digital Workprints can be located. This document assumes that it is set to $HOME/Projects/wz-mle-code.
The Magic Lantern Studio assumes that the Digital Workprints will be located under the $MLE_WORKPRINTS/workprints directory.
Set the TCL_HOME variable to the installation directory for ActiveTcl. For these instructions, use ~/bin/ActiveTcl-8.6.
Set the COINDIR variable to the installation directory for Coin3D. For these instructions, use ~/bin/Coin3D.
Set the FREEIMAGEDIR variable to the installation directory for FreeImage. For these instructions, use ~/bin/FreeImage/Dist.
To build the Magic Lantern components using the Eclipse C/C++ toolchain, use the following instructions.
Subversion is used for source code management. To install, use:
$ sudo apt-get install subversion
The following build toolchain is required:
$ sudo apt-get install build-essential g++ automake autoconf gnu-standards autoconf-doc libtool gettext autoconf-archive gawk libxt-dev
The Java Development Kit is required to run the Eclipse IDE. These instructions may be used to install the JDK on an Ubuntu 14.04 LTS platform.
Download JDK 8u111 from Oracle:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Note that we are currently running with jdk-8u111-linux-i586.tar.gz (jdk-8u111-linux-x64.tar.gz for 64-bit platform).
Execute the following commands to reference the new JDK environment:
$ sudo mkdir /opt/java
$ sudo tar zxvf jdk-8u111-linux-i586.tar.gz -C /opt/java
$ sudo update-alternatives --install /usr/bin/java java /opt/java/jdk1.8.0_111/bin/java 0
$ sudo update-alternatives --install /usr/bin/javac javac /opt/java/jdk1.8.0_111/bin/javac 0
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java
Update the environment by appending the following to "~/.bashrc":
export JAVA_HOME=/opt/java/jdk1.8.0_111
export PATH=$JAVA_HOME/bin:$PATH
Execute the following commands to install ant:
$ sudo apt-get update
$ sudo apt-get install ant
$ sudo apt-get install ant-contrib
The Eclipse development toolchain needs to be installed in the Ubuntu host development platform:
TCL is a requirement for the Magic Lantern mastering tools.
Coin 3D and SoXt are requirements for building and running the Rehearsal Player on a Linux platform. Instructions for building these dependencies can be found at
To install FreeImage, follow the instructions in the README.linux file distrubuted with the FreeImage package. Essentially, the instructions are:
This will install FreeImage into /usr/lib with accompanying headers files located in /usr/include.
Note that on Linux, the FREEIMAGEDIR environment variable is not currently being used by the Magic Lantern build system.
Using subversion, retrive the Magic Lantern source:
$ svn checkout svn://svn.code.sf.net/p/wz-mle/code/trunk wz-mle-code
These instructions build the Core util libraries for the Magic Lantern Studio tools using the Eclipse IDE.
Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above libmlutil project.
In the Eclipse ProjectExplorer, right-click on the libmlutil project and select "Build Project" from the pop-up menu.
Note: Before building, you may need to first regenerate the autoconf environment. The easiest way to do this is from the command line. In a terminal, change to the project directory (i.e. "cd $MLE_HOME/Core/util/linux/build") and then run "make distclean").
To install the library, right-click on the libmlutil project and select "Make Targets->Build..." from the pop-up menu. This will bring up a dialog panel showing the possible Make Targets for this project. Select "install" from Target list and then complete the action by selecting the "Build" button.
The library components that are built include
Library | Directory Location | Component |
---|---|---|
libmlutil.a | "$MLE_ROOT/lib" | Magic Lantern SDK (Debug) |
libmlutil.so | "$MLE_ROOT/lib" | Magic Lantern SDK (Debug) |
where MLE_ROOT is currently /opt/MagicLantern.
Use the following instructions to build the libmlutil libraries in batch mode (without Eclipse):
These instructions build the Core math libraries for the Magic Lantern Studio tools, the Magic Lantern SDK for the OpenGL target, and the Magic Lantern Rehearsal Player. The Eclipse IDE development tool is used.
Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above libmlmath project.
In the Eclipse ProjectExplorer, right-click on the libmlmath project and select "Build Project" from the pop-up menu.
Note: Before building, you may need to first regenerate the autoconf environment. The easiest way to do this is from the command line. In a terminal, change to the project directory (i.e. "cd $MLE_HOME/Core/math/linux/libmlmath") and then run "make distclean").
To install the library, right-click on the libmlmath project and select "Make Targets->Build..." from the pop-up menu. This will bring up a dialog panel showing the possible Make Targets for this project. Select "install" from Target list and then complete the action by selecting the "Build" button.
The library components that are built for the Magic Lantern SDK (OpenGL Target Platform) include
Library | Directory Location | Component |
---|---|---|
libmlmath.a | "$MLE_ROOT/lib/" | Magic Lantern SDK (Debug) |
libmlmath.so | "$MLE_ROOT/lib" | Magic Lantern SDK (Debug) |
where MLE_ROOT is currently /opt/MagicLantern.
Use the following instructions to build the libmlmath libraries in batch mode (without Eclipse):
These instructions build the Digital Workprint libraries for the Magic Lantern Studio tools and Rehearsal Player using the Eclipse IDE.
Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above libDWP project.
In the Eclipse ProjectExplorer, right-click on the libDWP project and select "Build Project" from the pop-up menu.
Note: Before building, you may need to first regenerate the autoconf environment. The easiest way to do this is from the command line. In a terminal, change to the project directory (i.e. "cd $MLE_HOME/DigitalWorkprint/lib/linux") and then run "make distclean").
To install the library, right-click on the libDWP project and select "Make Targets->Build..." from the pop-up menu. This will bring up a dialog panel showing the possible Make Targets for this project. Select "install" from Target list and then complete the action by selecting the "Build" button.
The library components that are built for the Magic Lantern SDK (OpenGL Target Platform) include
Library | Directory Location | Component |
---|---|---|
libDWP.a | "$MLE_ROOT/lib/" | Magic Lantern SDK (Debug) |
libDWP.so | "$MLE_ROOT/lib" | Magic Lantern SDK (Debug) |
where MLE_ROOT is currently /opt/MagicLantern.
The executable components that are built for the Magic Lantern SDK include
Executable | Directory Location | Component |
---|---|---|
DWPChecker.exe | "$MLE_ROOT/bin" | DWP Validation tool, Magic Lantern Studio (Debug) |
where MLE_ROOT is currently /opt/MagicLantern.
Use the following instructions to build the libDWP libraries in batch mode (without Eclipse):
These instructions build the Digital Playprint libraries for the Magic Lantern Studio tools using the Eclipse IDE.
Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above libDPP project.
In the Eclipse ProjectExplorer, right-click on the libDPP project and select "Build Project" from the pop-up menu.
To install the library, right-click on the libDPP project and select "Make Targets->Build..." from the pop-up menu. This will bring up a dialog panel showing the possible Make Targets for this project. Select "install" from Target list and then complete the action by selecting the "Build" button.
The library components that are built for the Magic Lantern Studio include
Library | Directory Location | Component |
---|---|---|
libDPP.a | "$MLE_ROOT/lib" | Magic Lantern SDK (Debug) |
libDPP.so | "$MLE_ROOT/lib" | Magic Lantern SDK (Debug) |
where MLE_ROOT is currently /opt/MagicLantern.
Use the following instructions to build the libDPP libraries in batch mode (without Eclipse):
These instructions explain how to build the Digital Playprint runtime component employed by the Magic Lantern Studio mastering tools using the Eclipse IDE.
Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above libplayprint project.
In the Eclipse ProjectExplorer, right-click on the libplayprint project and select "Build Project" from the pop-up menu.
To install the library, right-click on the libplayprint project and select "Make Targets->Build..." from the pop-up menu. This will bring up a dialog panel showing the possible Make Targets for this project. Select "install" from Target list and then complete the action by selecting the "Build" button.
The library components that are built for the Magic Lantern Studio include
Library | Directory Location | Component |
---|---|---|
libplayprint.a | "$MLE_ROOT/lib" | Magic Lantern SDK (Debug) |
libplayprint.so | "$MLE_ROOT/lib" | Magic Lantern SDK (Debug) |
where MLE_ROOT is currently /opt/MagicLantern.
Use the following instructions to build the libplayprint libraries in batch mode (without Eclipse):
These instructions explain how to build the Digital Playprint library employed by the Magic Lantern Studio mastering tools. It also explains how to build the mastering tools.
Import the above Eclipse projects by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above Eclipse project.
In the Eclipse ProjectExplorer, right-click on the Eclipse project and select "Build Project" from the pop-up menu.
To install the library, right-click on the Eclipse project and select "Make Targets->Build..." from the pop-up menu. This will bring up a dialog panel showing the possible Make Targets for this project. Select "install" from Target list and then complete the action by selecting the "Build" button.
The library components that are built include
Library | Directory Location | Component |
---|---|---|
libDPPGen.a | "$MLE_ROOT\lib" | Magic Lantern Studio Mastering Library (Debug) |
libDPPGend.so | "$MLE_ROOT\lib\" | Magic Lantern Studio Mastering Library (Debug) |
where MLE_ROOT is currently /opt/MagicLantern.
The executable tools that are built include
Exectuable | Directory Location | Component |
---|---|---|
gentables.exe | "$MLE_ROOT\bin" | Generates the tables (source code) for the title (Debug) |
gengroup.exe | "$MLE_ROOT\bin" | Generates the Group chunks for the DPP (Debug) |
genscene.exe | "$MLE_ROOT\bin" | Generates the Scene chunks for the DPP (Debug) |
genmedia.exe | "$MLE_ROOT\bin" | Generates the MediaRef chunks for the DPP (Debug) |
gendppscript.exe | "$MLE_ROOT\bin" | Generates a TCL script for laying out the DPP (Debug) |
gendpp.exe | "$MLE_ROOT\bin" | Generates a DPP using the TCL script (Debug) |
genmakefile.exe | "$MLE_ROOT\bin" | Generates a Makefile for the title (Debug) |
dumpgroup.exe | "$MLE_ROOT\bin" | Dump the contents of a Group chunk (Debug) |
dumpmedia.exe | "$MLE_ROOT\bin" | Dump the contents of a MediaRef chunk (Debug) |
dumpscene.exe | "$MLE_ROOT\bin" | Dump the contents of a Scene chunk (Debug) |
dumpdpp.exe | "$MLE_ROOT\bin" | Dump the contents of a Digital Playprint (Debug) |
where MLE_ROOT is currently /opt/MagicLantern.
Use the following instructions to build the mastering libraries and tools in batch mode (without Eclipse):
These instructions build the Magic Lantern SDK Runtime Engine libraries for the Inventor and OpenGL platforms using the Eclipse IDE.
Import the above Eclipse projects by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above libmlert projects.
Build for the Inventor targets. The Rehearsal Player is an Inventor target utilizing the Coin3D implmentation for Inventor. In the Eclipse ProjectExplorer, right-click on the libmlert-rehearsal project and select "Build Project" from the pop-up menu.
To install the library, right-click on the libmlert-rehearsal project and select "Make Targets->Build..." from the pop-up menu. This will bring up a dialog panel showing the possible Make Targets for this project. Select "install" from Target list and then complete the action by selecting the "Build" button.
Build for the OpenGL target. In the Eclipse ProjectExplorer, right-click on the libmlert-runtime project and select "Build Project" from the pop-up menu.
To install the library, right-click on the libmlert-runtime project and select "Make Targets->Build..." from the pop-up menu. This will bring up a dialog panel showing the possible Make Targets for this project. Select "install" from Target list and then complete the action by selecting the "Build" button.
The library components that are built for the Magic Lantern Studio include
Library | Directory Location | Component |
---|---|---|
libmlert.a | "$MLE_ROOT/lib/mle/rehearsal" | Magic Lantern SDK (Debug) |
libmlert.so | "$MLE_ROOT/lib/mle/rehearsal" | Magic Lantern SDK (Debug) |
libmlert.a | "$MLE_ROOT/lib/mle/inventor" | Magic Lantern SDK (Debug) |
libmlert.so | "$MLE_ROOT/lib/mle/inventor" | Magic Lantern SDK (Debug) |
libmlert.a | "$MLE_ROOT/lib/mle/runtime" | Magic Lantern SDK (Debug) |
libmlert.so | "$MLE_ROOT/lib/mle/runtime" | Magic Lantern SDK (Debug) |
where MLE_ROOT is currently /opt/MagicLantern.
Use the following instructions to build the runtime engine libraries in batch mode (without Eclipse):
These instructions build the Magic Lantern Studio Authoring Toolkit for the Inventor platform.
Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above rehearsal project.
In the Eclipse ProjectExplorer, right-click on the libmleatk project and select "Build Project" from the pop-up menu.
The library components that are built include
Library | Directory Location | Component |
---|---|---|
libmleatk.a | "$MLE_ROOT/lib" | Magic Lantern Studio ATK (Debug) |
libmleatk.so | "$MLE_ROOT/lib" | Magic Lantern Studio ATK (Debug) |
where MLE_ROOT is currently /opt/MagicLantern.
Use the following instructions to build the ATK libraries in batch mode (without Eclipse):
These instructions discuss how to build the Properties and Digital Workprints for Magic Lantern SDK.
This distributes the props header files to "$MLE_ROOT/include/mle" and the props workprint files to "$MLE_ROOT/include/workprints".
Note: the current Makefiles are based on the Wizzer Works ISM (Independent Software Module) scripts and require them to be installed in the $MLE_ROOT/include/make directory. To install the ISM scripts, simply copy $MLE_HOME/include/make directory to $MLE_ROOT/include/make (sudo cp -R $MLE_HOME/include/make $MLE_ROOT/include/make).
Use the following instructions to build the properties libraries in batch mode (without Eclipse):
These instructions build the Magic Lantern Roles for the Inventor (Rehearsal) platform.
Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above linux project.
In the Eclipse ProjectExplorer, right-click on the MleIvRoles project and select "Build Project" from the pop-up menu.
The library components that are built include
Library | Directory Location | Component |
---|---|---|
libivroles.a | "$MLE_ROOT/lib" | Magic Lantern Studio SDK (Debug) |
libivroles.so | "$MLE_ROOT/lib" | Magic Lantern Studio SDK (Debug) |
MleIv2dRole.a | "$MLE_ROOT/lib" | Magic Lantern Studio 2D Role for Inventor target (Debug) |
MleIv2dRole.so | "$MLE_ROOT/lib" | Magic Lantern Studio 2D Role for Inventor target (Debug) |
MleIv3dRole.a | "$MLE_ROOT/lib" | Magic Lantern Studio 3D Role for Inventor target (Debug) |
MleIv3dRole.so | "$MLE_ROOT/lib" | Magic Lantern Studio 3D Role for Inventor target (Debug) |
where MLE_ROOT is currently /opt/MagicLantern.
Use the following instructions to build the roles libraries in batch mode (without Eclipse):
These instructions build the Magic Lantern Sets for the Inventor (Rehearsal) platform.
Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above linux project.
In the Eclipse ProjectExplorer, right-click on the MleIvSets project and select "Build Project" from the pop-up menu.
The library components that are built include
Library | Directory Location | Component |
---|---|---|
MleIvSet.a | "$MLE_ROOT/lib" | Magic Lantern Studio Set for Inventor target (Debug) |
MleIvSet.so | "$MLE_ROOT/lib" | Magic Lantern Studio Set for Inventor target (Debug) |
where MLE_ROOT is currently /opt/MagicLantern.
Use the following instructions to build the sets libraries in batch mode (without Eclipse):
These instructions build the Magic Lantern MediaRefs for the Inventor (Rehearsal) platform.
Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above linux project.
In the Eclipse ProjectExplorer, right-click on the MleMediaref project and select "Build Project" from the pop-up menu.
The library components that are built include
Library | Directory Location | Component |
---|---|---|
Mle3dModelMediaref.a | "$MLE_ROOT/lib" | 3D Model MediaRef for Inventor target (Debug) |
Mle3dModelMediaref.so | "$MLE_ROOT/lib" | 3D Model MediaRef for Inventor target (Debug) |
Mle3dTextureMapMediaref.a | "$MLE_ROOT/lib" | 3D Texture Map MediaRef for Inventor target (Debug) |
Mle3dTextureMapMediaref.so | "$MLE_ROOT/lib" | 3D Texture Map MediaRef for Inventor target (Debug) |
Mle3dColorMapMediaref.a | "$MLE_ROOT/lib" | 3D Color Map MediaRef for Inventor target (Debug) |
Mle3dColorMapMediaref.so | "$MLE_ROOT/lib" | 3D Color Map MediaRef for Inventor target (Debug) |
where MLE_ROOT is currently /opt/MagicLantern.
Use the following instructions to build the mediarefs libraries in batch mode (without Eclipse):
These instructions build the Magic Lantern Stages for the Inventor (Rehearsal) platform.
Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above linux project.
In the Eclipse ProjectExplorer, right-click on the MleIvStage project and select "Build Project" from the pop-up menu.
The library components that are built include
Library | Directory Location | Component |
---|---|---|
MleIvtage.a | "$MLE_ROOT/lib" | Stage for Inventor target (Debug) |
MleIvStage.so | "$MLE_ROOT/lib" | Stage for Inventor target (Debug) |
where MLE_ROOT is currently /opt/MagicLantern.
Use the following instructions to build the stages libraries in batch mode (without Eclipse):
These instructions build the Magic Lantern Actors for the Inventor (Rehearsal) platform.
Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above linux project.
In the Eclipse ProjectExplorer, right-click on the MleActors project and select "Build Project" from the pop-up menu.
The library components that are built include
Library | Directory Location | Component |
---|---|---|
MleEscapeActor.a | "$MLE_ROOT/lib" | Escape Key Actor (Debug) |
MleEscapeActor.so | "$MLE_ROOT/lib" | Escape Key Actor (Debug) |
Mle3dCameraActor.a | "$MLE_ROOT/lib" | 3D Camera Actor (Debug) |
Mle3dCameraActor.so | "$MLE_ROOT/lib" | 3D Camera Actor (Debug) |
Mle2dImageActor.a | "$MLE_ROOT/lib" | Image Actor(Debug) |
Mle2dImageActor.so | "$MLE_ROOT/lib" | Image Actor (Debug) |
where MLE_ROOT is currently /opt/MagicLantern.
Use the following instructions to build the actors libraries in batch mode (without Eclipse):
Magic Lantern uses the Google Test framework to perform unit testing. For more information on setting up Google Test and executing test cases developed for Magic Lantern, please go to
Unit Testing for Linux Platform
The Magic Lantern Rehearsal Player is based on Open Inventor as implemented by the Coin3D and the SoXt libraries. The above instructions support the SDK for the Open Inventor target. More details for building the Rehearsal Player can be found at
Linux Build Environment for Rehearsal Player
A Qt runtime targert for the Linux platform is currently under development. Instructions for this target can be found at
Developer Wiki: Building_Coin
Developer Wiki: Developer_Documentation
Developer Wiki: Qt_Target_for_Linux_Platform
Developer Wiki: Rehearsal_Player_for_Linux_Platform
Developer Wiki: SoXt_Build_Instructions_For_Linux
Developer Wiki: Unit_Testing_for_Linux_Platform
Moving to Eclipse Neon requires Java version 1.8 which can be downloaded from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
The above libraries and executables can be built and installed from the shell command line once the autoconf tools have been run. For example, change the working directory to the project root and run:
sudo MLE_ROOT=/usr/local make install
If you use the default configuration settings when installing ActiveTcl, then ActiveTcl will be installed in /opt/ActiveTcl-8.6.
Create a link in ~/bin to refer to /opt/ActiveTcl-8.6:
ln -s /opt/ActiveTcl-8.6 ~/bin/ActiveTcl-8.6
export TCL_HOME=$HOME/bin/ActiveTcl-8.6
Last edit: Mark Millard 2017-05-18
Modified configure.ac and build instructions to install into /opt/MagicLantern instead of /usr/local.