Building the Open VXI library and Reference Clients


Windows NT

Note: This procedure has been tested on WindowsNT 4.0 SP5 with VC6.0 sp3.

Building the Open VXI library and Reference Clients requires several pieces of external open software: The Xerces XML parser from Apache, and the SpiderMonkey JavaScript engine and NSPR runtime system from Mozilla. These must be downloaded into the SpeechBrowser tree before build. The steps below lead through the following procedure:

Xerces download.

You can download the Xerces binary distribution from Apache here. This site, xml.apache.org also has extensive documentation on Xerces, and a number of other interesting XML-related projects.

Now expand this archive in the OpenVXI/Xerces directory using WinZip or unzip It should create a subdirectory xerces-c_1_2_0-win32

NSPR Download

NSPR is a Netscape Runtime library required to run threadsafe JavaScript. Headers and library files are need to build the SpiderMonkey js32.dll. The nspr4.dll is loaded at runtime.

Binary distributions of nspr4.1 can be found at mozilla.org in both debug and release versions in the form of JAR archives at the links below.. There is one JAR file for headers and another for libraries and DLLs.

The JAR files can be expanded with WinZip, unzip, or jar (available from the Java SDK). Expand mdheader.jar into OpenVXI/JavaScriptEngine/nspr/include. Expand mdbinary.jar into OpenVXI/JavaScriptEngine/nspr/ (the archive will create bin and lib subdirectories).

SpiderMonkey (JavaScript) Download

SpiderMonkey is a C implementation of JavaScript from Mozilla. Unfortunately, there is no thread-safe binary distribution of the JavaScript Engine. A tarball of the SpiderMonkey source js-1.5.rc2.tar.gz is available from Mozilla here. This gzipped archive can be expanded with gzip and tar or WinZip.

Expand js-1.5.rc2.tar.gz in OpenVXI/JavaScriptEngine/SpiderMonkey/, it will create a js subdirectory.

Fix SpiderMonkey Makefiles to Compile Threadsafe.

If PERL is installed on your system, you should be able to skip this step. Otherwise:

Run NMake

After above installations, change to the top-level speech_browser directory and run nmake on Makefile.NT with either release or debug as the target (release is default). Ex.:
cd speech_browser
nmake -f Makefile.NT release
This makefile should compile SpiderMonkey, the VXI library, the Reference Integration Libraries and Reference Clients. All binaries (.exe and .dll files) should be copied to OpenVXI/bin/[cfg] where [cfg] is either Debug or Release.

To build the debug version do

cd speech_browser
nmake -f Makefile.NT debug

Test

If the build successfully complete you can now test it. To test the release version, copy the sample file test2.vxml from browser/samples to OpenVXI/bin/Release and run
testVXI test2.vxml -maxCalls 1
The output should contain the line
VXI returned 5040

To test the debug vrersion, copy the sample file test2.vxml from browser/samples to OpenVXI/bin/Debug and run

testVXID test2.vxml -maxCalls 1
The output should contain the line
VXI returned 5040

Linux

Note: The Linux build system is currently under development. The procedure below MAY work.

Building the VXI library and Reference Clients requires several pieces of external open software: The Xerces XML parser from Apache, and the SpiderMonkey JavaScript engine and NSPR runtime system from Mozilla. These must be downloaded into the SpeechBrowser tree before build. The steps below lead through the following procedure:

Xerces download.

The Linux Makefile are set up to link to Xerces 1.4.0 which is the latest stable release. You can download the Xerces binary distribution from Apache at http://xml.apache.org/dist/xerces-c/stable/stable/xerces-c1_4_0-linux.tar.gz .

xml.apache.org also has extensive documentation on Xerces, and a number of other interesting XML-related projects.

Now expand this archive in the OpenVXI/Xerces directory cd OpenVXI/Xerces tar zxvf xerces-c1_4_0-linux.tar.gz It should create a subdirectory xerces-c1_4_0-linux.

NSPR Download

NSPR is a Netscape Runtime library required to run threadsafe JavaScript. Headers and library files are need to build the SpiderMonkey js32.dll. The nspr4.dll is loaded at runtime.

Binary distributions of nspr4.1 can be found at mozilla.org in both debug and release versions in the form of JAR archives at the links below.. There is one JAR file for headers and another for libraries and DLLs.

The JAR files can be expanded with WinZip, unzip, or jar (available from the Java SDK). Expand mdheader.jar into OpenVXI/JavaScriptEngine/nspr/include. Expand mdbinary.jar into OpenVXI/JavaScriptEngine/nspr/ (the archive will create bin and lib subdirectories).

SpiderMonkey (JavaScript) Download

SpiderMonkey is a C implementation of JavaScript from Mozilla. Unfortunately, there is no thread-safe binary distribution of the JavaScript Engine. A tarball of the SpiderMonkey source js-1.5.rc2.tar.gz is available from Mozilla here. This gzipped archive can be expanded with gzip and tar or WinZip.

Expand js-1.5.rc2.tar.gz in OpenVXI/JavaScriptEngine/SpiderMonkey/, it will create a js subdirectory.

Fix SpiderMonkey Makefiles to Compile Threadsafe.

If PERL is installed on your system, you should be able to skip this step. Otherwise:

Run make

After above installations, change to the top-level speech_browser directory and run
cd OpenVXI
make -f Makefile.unix
This makefile should compile SpiderMonkey, the VXI library, the Reference Integration Libraries and Reference Clients. All binaries (.exe and .dll files) should be copied to OpenVXI/bin/osb/Release.

Test

NOTES: You should set LD_LIBRARY_PATH to OpenVXI/bin/osb/Release (or OpenVXI/bin/osb/Debug). If the build successfully complete you can now test it. To test the release version, copy the sample file test2.vxml from browser/samples to OpenVXI/bin/osb/Release and run
testVXI test2.vxml -maxCalls 1
The output should contain the line
VXI returned 5040


Copyright 2000, 2001. SpeechWorks International, Inc. All rights reserved. Distributed under SpeechWorks Open Document License, v1.0