Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Panel
titleTable of Contents
Table of Contents
outlinetrue

Overview

Starting with Rel6, the TWB SDK can now be installed as a bundled package that includes Eclipse (with the TWB SDK installed) and a version of the OCAP RI. This option allows new users to immediately being creating xlets in Eclipse without registering a RI bundle or installing the SDK.

Requirements

In order to build the bundled installer, your environment should be set up to build the OCAP RI and the SDK. The following requirements are also necessary for building the bundled installer:

  • InstallJammer (I recommend the 1.2 snapshot) http://sourceforge.net/projects/installjammer/files/InstallJammer/
  • An environment variable INSTALL_JAMMER_HOME that points to the top level directory of InstallJammer
  • An environment variable SDK_HOME that points to the top level directory of the SDK
  • An environment variable ECLIPSE_HOME that points to the top level directory of Eclipse (Note that currently the SDK can only be built using Eclipse 3.6)

Building the Installer

  1. Check out the packaging directory in an appropriate location

    Code Block
    xml
    xml
    svn co https://community.cablelabs.com/svn/OCAPRI/trunk/packaging/
  2. Build the RI (platform and stack). Instructions can be found here: Building the RI
  3. Build the SDK. Use the following commands to build the SDK:

    Code Block
    cd $SDK_HOME
    Code Block
    ant

    Currently the Ant build fails in Linux. See Known Issues for a workaround.

  4. cd to the packaging directory and type:

    Code Block
     ant stage.sdk_with_ri_bundle
  5. The staging may take a while as it stages the RI, downloads a version of Eclipse, and installs the SDK in the downloaded Eclipse version. Once the staging is complete, type the following command to build the installer:

    Code Block
    ant build.installer.sdk_with_ri_bundle
  6. If building in Windows, a Windows (.exe) installer will be built, while in Linux, a Linux installer (ending with a "-Linux" suffix) will be built.
  7. In order to successfully build installers later, clean the packaging directory with the following command:

    Code Block
    ant clean

Testing an Xlet

  1. Start Eclipse from the C:\CableLabs\tru2way\trunk-<revision>\eclipse_twb_sdk folder.
  2. Open File->New->Other...
  3. Select New OCAP Project under OCAP, click Next>
  4. Give your project a name, e.g. "Hello", and choose your Xlet template. For initial testing, choose "Hello World", then click Finish.
  5. Open Run->Package Services->Open Services Dialog...
  6. Double-click Xlet Service Configurations. You will get a "New_configuration" Xlet. The Workspace should show the Hello Xlet. Rename the configuration to "Hello Xlet", click Apply, then click Package.
  7. Open Run->Run Configurations..., double-click "OCAP Simulation".  You will get a "New_configuration". Rename to "Hello", click Apply.
  8. Click the Unbound Xlets tab, then the Add... button, select the Hello Xlet, then click OK. You should now see a Run button.
  9. Click Run. The RI should start up, and display Hello World.
  10. You will have to kill the RI (ri.exe) from the Task Manager.

Known Issues

The SDK is built in a Windows environment using Eclipse 3.7.1 as the version pointed to by the ECLIPSE_HOME variable. In order to build a bundled installer for Linux, do the following:

  • Build the SDK in Windows.
  • Copy the file $SDK_HOME/pde_build/results/updateSite-0.1.0.*NGT.zip (the * will actually be a build date, for example, 201111141837) to the directory $SDK_HOME/pde_build/results in Linux. Note that the directories pde_build and results will not exist in Linux since the SDK build fails, so these directories will need to be created.
  • Build the bundled installer starting with step 4 in "Building the Installer