Compiling 3Di Viewer “Rei” Firefox Plugin

Overview

By default, compiling 3Di Viewer “Rei” creates an ActiveX control that can be used in the Internet Explorer web browser. Additionally, there is a separate project that can be compiled to create a Firefox plugin. This page describes how to compile the Firefox plugin. Please note that the source code in this repository is LGPL-licensed.

Before you start

Please confirm that you are able to compile the main application for 3Di Viewer “Rei”, before attempting to compile the Firefox plugin.

Compiling the Firefox plugin requires both the Microsoft Visual C# 2008 compiler and the Microsoft Visual C++ 2008 compiler. The express editions can be downloaded for free as explained earlier in the system requirements page.

In this page SRC will refer to the directory where you downloaded the source code.

Additional libraries

Download the XULRunner SDK 1.9.0.xx for Win32: Mozilla page for downloading XULRunner

Note: these instructions were tested with 1.9.0.11; probably any 1.9.0 release will be compatible.

Unpack the ZIP archive in the SRC/ directory. This should create a subdirectory SRC/xulrunner-sdk. The XULRunner SDK must be in this directory because the Firefox plugin uses a relative directory path to access the SDK.

Compilation instructions

First, compile the bootstrap project as follows:

  1. Copy the following files from SRC/3di-viewer-rei/bin into SRC/3di-viewer-rei-firefox/bin. If some files do not exist in the source folder, you need to first compile the main application.
    • OpenViewer.dll
    • Interfaces.dll
    • Adapter.dll
    • OpenMetaverse.dll
    • OpenMetaverseTypes.dll
    • Nini.dll
  2. Start the Visual C# 2008 express compiler.
  3. Select Open Project, and select the following project file:
    • SRC/3di-viewer-rei-firefox/3DiOpenViewer/bootstrap/OpenViewer.bootstrap.csproj
  4. In the Solution Explorer, right-click the project OpenViewer.bootstrap and select “Build” from the pop-up menu. A dialog box will appear to save the project file; click OK to accept the defaults.
  5. Build should complete without errors.

Next, compile the main Firefox plugin as follows:

  1. Start the Visual C++ 2008 express compiler.
  2. Select Open Project, and select the following project file:
    • SRC/3di-viewer-rei-firefox/npOpenViewer/npOpenViewer.vcproj
  3. Dismiss the two error dialog boxes that appear, informing you that the express edition of VC++ cannot open C# projects.
  4. In the Solution Explorer, right-click on the project npOpenViewer and select “Build” from the pop-up menu.
  5. Build should complete without errors.

Installation instructions

In the following instructions, the string MOZ will refer to the location where you installed Firefox, which is typically C:/Program Files/Mozilla Firefox.

  1. If you have installed the 3Di OpenViewer plugin from http://3di.jp, uninstall it first. If you do not do this, it is conceivable that the existence of some files from the official 3Di OpenViewer may interfere with correct operation of the open source 3Di Viewer “Rei”, which is why it is recommended to uninstall 3Di OpenViewer before attempting to install the open source 3Di Viewer “Rei”.
  2. Copy the following files from SRC/3di-viewer-rei-firefox/bin/ to MOZ/plugins/
    • npOpenViewer.dll
    • npOpenViewer.xpt
  3. Copy the entire folder contents (including subfolders) from SRC/3di-viewer-rei/bin to MOZ/
  4. Copy the following files from SRC/3di-viewer-rei-firefox/bin/ to MOZ/
    • bootstrap.dll

NOTE: Step 4 must be performed after Step 3, because the same bootstrap.dll file is present in different directories. The bootstrap.dll from step 4 must be the one that is present in MOZ/, so it is copied last to ensure it overwrites any other version of the file that may be present.

Testing the Firefox plugin

  1. Start Firefox and open the file SRC/3di-viewer-rei-firefox/test.html
  2. You should see the viewer splash screen. Using the text entry forms on the right-hand side of the HTML page, you can specify grid and login information and login to a simulator.

Comments are closed.