SDK Build Environment using Microsoft MSBuild - magic-lantern-studio/mle-documentation GitHub Wiki
This page discusses how to build the Magic Lantern SDK for Microsoft Win32 platforms using MSBuild. Instructions for building the Magic Lantern SDK for Microsoft platforms using Visual Studio can be found at SDK Build Environment using Microsoft Visual Studio.
Table of Contents
Dependencies
This section identifies dependencies for building the Magic Lantern SDK.
- Version 3.10.11 of Python is installed.
- Instructions assume that the installation directory is the default location chosen by the installer. The PYTHON_HOME environment variable will need to be set to indicate this location.
- Python is required by the mastering process to create a Digital Playprint.
- Instructions can be found at https://github.com/magic-lantern-python-studio/mle-documentation/wiki/Python-Development-Environment.
- Microsoft Visual Studio 2017 is installed. Note that Microsoft Visual Studio C++ v6.0, Microsoft Visual Studio C++ 2005 and Microsoft Visual Studio C++ 2010 are no longer being supported.
- Version 4.0.0 of Coin 3D is built and installed.
- Instructions assume that the installation directory is M:\Coin3D.
- Coin3D is an implementation of the SGI Inventor framework. It is required by the Magic Lantern Rehearsal Player. Note that the Rehearsal Player will be bound to the GNU General Public License if built with Coin3D. Alternative options are currently being investigated.
- The most recent version can be found at https://github.com/magic-lantern-studio/coin.
- Instructions to build the source can be found at https://github.com/magic-lantern-studio/coin/wiki/Coin-4.0.0-Build-Instructions-for-Windows.
- Version 1.6.0 of SoWin is built and installed.
- Instructions assume that the installation directory is M:\Coin3D.
- The most recent version can be found at https://github.com/magic-lantern-studio/sowin.
- Instructions to build the source can be found at https://github.com/magic-lantern-studio/mle-documentation/wiki/SoWin-Build-Instructions-for-Windows.
- Version 3.18.0 of FreeImage
- Instructions assume that the installation directory is M:\FreeImage. The **FREEIMAGEDIR **environment variable will need to be set to indicate this location.
- The most recent version can be found at http://freeimage.sourceforge.net/download.html .
Assumptions
These instructions assume the following
- The dependencies above are installed under a Windows drive labeled "M" (e.g. M:). You can use the Microsoft Command, subst, to point "M:" to a file directory that will be the root of the Magic Lantern build environment. For example, "subst M: F:/" will cause M: to reference the F drive. Or, "subst M: C:\Users\msm" will cause M: to reference the "Users\msm" directory on the C drive.
- The Magic Lantern software has been downloaded into the "M:\projects\MagicLantern" directory and the MLE_HOME environment variable is set to "M:\projects\MagicLantern".
- You already know how to use Microsoft Visual Studio 2017 (Microsoft Visual Studio C++ v6.0, 2005 and 2010 are no longer supported).
- You already know how to use git for downloading and managing the source code repositories.
Environment Variables
MLE_HOME Environment Variable
Set the variable MLE_HOME to reference the home of the Magic Lantern source. This document assumes that it is set to "M:\projects\MagicLantern".
MLE_ROOT Environment Variable
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 "M:/projects/MagicLantern".
Note that this variable uses the UNIX-style path delimiter ('/').
MLE_WORKPRINTS Environment Variable
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 //M/projects/MagicLantern/include.
The Magic Lantern Studio assumes that the Digital Workprints will be located under the $MLE_WORKPRINTS/workprints directory.
[!Note] This variable uses a canonical path style for the drive (i.e. //M/).
MLEDEV_CORE Environment Variable
Set the MLEDEV_CORE variable to the development directory where the Core library source is. This value will most likely be $MLE_HOME\Core.
MLEDEV_DWP Environment Variable
Set the MLEDEV_DWP variable to the development directory where the Digital Workprint library source is. This value will most likely be $MLE_HOME\DigitalWorkprint.
MLEDEV_DPP Environment Variable
Set the MLEDEV_DPP variable to the development directory where the Digital Playprint library source is. This value will most likely be $MLE_HOME\DigitalPlayprint.
PYTHON_HOME Environment Variable
Set the PYTHON_HOME variable to the installation directory for Python. For these instructions, use M:\Python.
COINDIR Environment Variable
Set the COINDIR variable to the installation directory for Coin3D. For these instructions, use M:\Coin3D.
FREEIMAGEDIR Environment Variable
Set the FREEIMAGEDIR variable to the installation directory for FreeImage. For these instructions, use M:\FreeImage\Dist.
BRENDER_PATH Environment Variable
Set the BRENDER_PATH variable to the installation directory for BRender. For these instructions, use M:\BRENDER\V1_2_1\DAT.
Note that the BRender target is Obsolete and only availabe on a 32-bit platform.
PATH Environment Variable
Make sure the following paths are part of the PATH environment variable.
- M:\projects\MagicLantern\bin
- M:\projects\MagicLantern\bin\rehearsal
- M:\Coin3d\bin
- M:\Python\bin
Details
Download Source
The source for the Magic Lantern projects is hosted at Github on the magic-lantern-studio Organization. The repositories are set up to use SSH.
The best way to utilize git on Windows platforms is to install the "Git for Windows" toolchain. Then use the Github instructions at Generating a new SSH key and adding it to the ssh-agent to manage your SSH key.
The Magic Lantern Studio git repositories are comprised of:
- mle-core-env
- mle-core-util
- mle-core-math
- mle-core-dwp
- mle-core-dpp
- mle-core-mlert
- mle-parts
- mle-atk
- mle-players
- mle-studio
- mle-titles
- mle-documentation
To download the source, do the following
$ mkdir Github-MagicLanternStudio
$ cd Github-MagicLanternStudio
$ git clone [email protected]:magic-lantern-studio/mle-core-env.git
$ git clone [email protected]:magic-lantern-studio/mle-core-util.git
$ git clone [email protected]:magic-lantern-studio/mle-core-math.git
$ git clone [email protected]:magic-lantern-studio/mle-core-dwp.git
$ git clone [email protected]:magic-lantern-studio/mle-core-dpp.git
$ git clone [email protected]:magic-lantern-studio/mle-core-mlert.git
$ git clone [email protected]:magic-lantern-studio/mle-parts.git
$ git clone [email protected]:magic-lantern-studio/mle-atk.git
$ git clone [email protected]:magic-lantern-studio/mle-players.git
$ git clone [email protected]:magic-lantern-studio/mle-studio.git
$ git clone [email protected]:magic-lantern-studio/mle-titles.git
$ git clone [email protected]:magic-lantern-studio/mle-documentation.git
32-bit Platform Target
To build the SDK for a 32-bit platform, do the following:
- Run the Visual Studio Command Prompt (x86 Native Tools Command Prompt for VS 2017) tool.
- In the command window, cd %MLE_HOME%\build\win32 directory.
- Run "msbuild build.msvc15.proj /t:BuildSDK32"
- Run "msbuild build.msvc15.proj /t:BuildRehearsal32"
See Microsoft MSBuild 32-bit Targets for more information concerning available build targets.
64-bit Platform Target
To build the SDK for a 64-bit platform, do the following:
- Run the Visual Studio Command Prompt (x64 Native Tools Command Prompt for VS 2017) tool.
- In the command window, cd %MLE_HOME%\build\win32 directory.
- Run "msbuild build.msvc15.proj /t:BuildSDK64"
- Run "msbuild build.msvc15.proj /t:BuildRehearsal64"
See Microsoft MSBuild 64-bit Targets for more information concerning available build targets.