Compiling 3Di Viewer “Rei” libraries and API
Before you start
Please confirm that you are able to compile the main application for 3Di Viewer “Rei”, before attempting to compile the libraries and API described on this page.
In this page SRC will refer to the directory where you downloaded the source code.
Compilation instructions
This section describes how to compile the main support libraries and JavaScript API for 3Di Viewer “Rei”. This is only necessary if you want to change or debug the libraries, since the pre-compiled libraries are already provided in binary form with the source code of 3Di Viewer “Rei”.
This section covers the following libraries used by 3Di Viewer “Rei”:
- Irrlicht (C++ 3D engine)
- IrrlichtW (C++ <–> C# wrapping layer for Irrlicht)
- Irrlicht.NETCP (C# API for Irrlicht)
- libopenmetaverse (network communication library for OpenSim virtual world servers)
- Adapter (C# <–> JavaScript API for viewer)
Note that this list only includes the main libraries used by 3Di Viewer “Rei”, not all of the libraries. For a list of all of the libraries used by 3Di Viewer “Rei”, please see the file ThirdPartyLicenses.txt in the source code distribution.
Compiling Irrlicht
- Start the Visual C++ 2008 express compiler.
- Select Open Project, and select the following solution file:
- SRC/3di-viewer-rei-libs/irrlicht*/Irrlicht SDK/source/Irrlicht/Irrlicht9.0.sln
- Change the project type to “release” in the toolbar.
- Select Build/Build Solution to compile the source files.
Compiling IrrlichtW
- Start the Visual C++ 2008 express compiler.
- Select Open Project, and select the following solution file:
- SRC/3di-viewer-rei-libs/irrlicht*/irrlichtW/IrrlichtW.sln
- Change the project type to “release” in the toolbar.
- Select Build/Build Solution to compile the source files.
Compiling Irrlicht.NETCP
- Create the Irrlicht.NETCP build files as follows:
- Open Windows Explorer
- Browse to SRC/3di-viewer-rei-libs/irrlicht*/Irrlicht.NET
- Double click on “runprebuild2008.bat”. This will create the necessary solution and project files.
- Start the Visual C# 2008 express compiler.
- By default the debug/release switch is disabled in Visual C# 2008 express edition. To enable it, select Tools/Options/Projects and Solutions, select General, and enable “Show advanced build configurations.”
- Select Open Project, and select the following solution file:
- SRC/3di-viewer-rei-libs/irrlicht*/Irrlicht.NET/Irrlicht.NET.sln
- Make sure that the project type is “release” in the toolbar.
- Select Build/Build Solution to compile the source files.
Compiling libopenmetaverse
- Create the libomv build files as follows:
- Open Windows Explorer
- Browse to SRC/3di-viewer-rei-libs/libomv*/trunk
- Double click on “runprebuild2008.bat”. This will create the necessary solution and project files.
- Start the Visual C# 2008 express compiler.
- Select Open Project, and select the following solution file:
- SRC/3di-viewer-rei-libs/libomv*/trunk/OpenMetaverse.sln
- Ignore the warning message about solution folders and dismiss it with OK.
- Select Build/Build Solution to compile the source files.
Compiling JavaScript API
Note that the source code in this repository is LGPL-licensed.
- Create the build files as follows:
- Open Windows Explorer
- Browse to SRC/3di-viewer-rei-api/
- Double click on “runprebuild2008.bat”. This will create the necessary solution and project files.
- Compile the main viewer application following the compilation instructions. The JavaScript API requires that the main viewer application be compiled first.
- Note: more specifically, the JavaScript API depends only on the files OpenViewer.dll and Interfaces.dll from the main viewer application; if these 2 files are compiled, it is enough to compile the JavaScript API.
- Copy the following compiled files from the SRC/3di-viewer-rei/bin/ directory to the SRC/3di-viewer-rei-api/bin/ directory:
- OpenViewer.dll
- Interfaces.dll
- If you compiled the other support libraries above, then you need to copy the compiled files into SRC/3di-viewer-rei-api/bin/ from the following locations:
- SRC/3di-viewer-rei-libs/irrlicht*/bin/Release/* (excluding Prebuild.exe)
- SRC/3di-viewer-rei-libs/libomv*/trunk/bin/OpenMetaverse.dll
- Start the Visual C# 2008 express compiler.
- Select Open Project, and select the following solution file:
- SRC/3di-viewer-rei-api/Adapter.sln
- Select Build/Build Solution to compile.
Alternatively, this project can also be compiled from the command line by invoking COMPILE.BAT after executing steps 1-4.
Using the compiled libraries
After compiling the libraries as described above, you need to copy all of the following compiled binary files into SRC/3di-viewer-rei/bin/ from the following locations:
- SRC/3di-viewer-rei-libs/irrlicht*/bin/Release/* (excluding Prebuild.exe)
- SRC/3di-viewer-rei-libs/libomv*/trunk/bin/OpenMetaverse.dll
- SRC/3di-viewer-rei-api/bin/Adapter.dll
After copying the binary files in this fashion, the main application 3Di Viewer “Rei” will use the newly compiled versions of the library files.