Building a phoneME Feature Software Reference Port (MR1)

first | prev | next-last

The phoneME Feature software is an Open Source version of Sun Microsystems' commercial implementation, the Sun Java Wireless Client software, version 1.1.3. The phoneME Feature software is built on top of CLDC, an Open Source version of Sun Microsystems' Connected Limited Device Configuration, HotSpot Implementation, version 1.1.3.

This document has instructions for building a default configuration of the phoneME Feature software. It has the following sections:

For proper building and performance, your system must meet the requirements provided in Build Environment

For more information on items in this chapter or other phoneME Feature software build topics, see the Sun Java Wireless Client Build Guide.


Using the make Command

To build a default implementation of the phoneME Feature software, you run the make command with the file, Default.gmk. This builds a default version of the phoneME Feature software for your target platform.

The Default.gmk file is located in the directory InstallDir/midp/build/platform

Note:InstallDir is the location of your phoneME Feature software.

For more information on using the Default.gmk file to build a default configuration of the phoneME Feature software for your target platform, see Building phoneME Feature Software.

phoneME Feature Software Build Targets

The phoneME Feature software provides several make targets for building a phoneME Feature reference port. Although several make targets are available, this guide describes only two, as shown in TABLE 5-1.

TABLE 5-1 phoneME Feature Software Build Targets

Target

Description

all

Creates the executables, classes, and tools for a version of the phoneME Feature software.

docs_html

Generates phoneME Feature API documentation.

For more information on phoneME Feature build targets, see the Sun Java Wireless Client Build Guide.


Default Build Configuration

The default build configuration for your target platform is named using a combination of operating system (Linux or Win32), platform (ARM or i386), and one or more build options. Setting (or not setting) specific build options determines the configuration of the build.

For example, for the Linux/ARM target platform (P2 board), the default build configuration uses Frame Buffer graphics (fb), with Adaptive User Interface Technology (chameleon), and multitasking (mvm). Therefore, the default build configuration is named linux_arm_fb_chameleon_mvm.

On the Win32/i386 platform, the default build configuration is win32_i386.

For more information about build options in the phoneME Feature software default build configuration, see Default Bulld Configuration Options.

Building a Complete Audio Implementation

In order to build a complete implementation of JSR 135, the following files need to be modified.

On a Win32/i386 platform:

  • jsr135/win32-jsr135/src/native/AMRDecoder.c
  • jsr135/win32-jsr135/src/native/qsoundnative.c

On a Linux/ARM platform:

  • jsr135/linux-abb/src/native/qsoundnative.c

These files contain stubbed implementations of all native methods for the following classes.

On a Win32/i386 platform:

  • com.sun.mmedia.AMRDecoder

On Win32/i386 and Linux/ARM platforms:

  • com.sun.mmedia.QSound*

Sun Microsystems' compliant Mobile Media API (JSR 135) implementation utilizes audio libraries licensed from QSound Labs, Inc. (www.qsound.com).

Note: Other libraries are possible. If you choose other audio libraries, you will need to modify the listed files for those libraries.


Building phoneME Feature Software

By following the procedures provided in this section, you can build a default phoneME Feature software reference port that contains the libraries, tools, tests, and documentation bundles for your target platform.

Building for a Linux Platform

Note: This procedure assumes the use of the Bash shell on the Linux platform.

  1. Change to the default phoneME Feature software build directory for the Linux/ARM target platform.
  2. $ cd InstallDir/midp/build/linux_fb_gcc

    Note: InstallDir represents the location of your phoneME Feature software.

  3. Ensure that all environment variables have been set.
  4. For more information on environment variables, see Build Envrionment and Building a PCSL Reference Port.

  5. Ensure that a PCSL reference port has been built for the Linux/ARM target platform.
  6. For more information on building PCSL, see Building a PCSL Reference Port.

  7. Ensure that a CLDC reference port has been built for the Linux/ARM target platform.
  8. For more information on building CLDC, see Building a CLDC Reference Port.

  9. Use make to build a reference port of the phoneME Feature software.
  10. $ make VAR_IMPORT_FROM=Default.gmk all

    This builds the full phoneME Feature software.

    Note: To build Javadoc documentation at the same time you build the phoneME Feature software default build configuration, enter the following command in Step 5:

    $ make VAR_IMPORT_FROM=Default.gmk docs_html all

Building for a Windows Platform

Note: This document assumes the use of Cyg4Me on the Windows platform.

  1. Change to the default phoneME Feature build directory for the Win32/i386 target platform.
  2. $ cd InstallDir/midp/build/win32

    Note: InstallDir represents the location of your phoneME Feature software.

  3. Ensure that all environment variables are set.
  4. For more information on environment variables, see Build Environment and Building a PCSL Reference Port.

  5. Ensure that a PCSL reference port is built for the Win32/i386 target platform.
  6. For more information on building PCSL, see Building a PCSL Reference Port.

  7. Ensure that a CLDC reference port is built for the Win32/i386 target platform.
  8. For more information on building CLDC, see Building a CLDC Reference Port.

  9. Mount the phoneME Feature software midp directory at the root level.
  10. For example, if you installed the phoneME Feature software in C:\jwc1.1.3, use the following command:

    mount C:\jwc1.1.3\midp /jwc1.1.3/midp

  11. Use make to build a reference port of the phoneME Feature software.

    $ make VAR_IMPORT_FROM=Default.gmk all

    This builds the full phoneME Feature software bundle, including the example executables.

    Note: To build Javadoc documentation at the same time you build the phoneME Feature software default build configuration, enter the following command in Step 6:

    $ make VAR_IMPORT_FROM=Default.gmk docs_html all


Building phoneME Feature Software Documentation

You can create HTML documents from phoneME Feature software from porting interfaces. To do this for the phoneME Feature software, use the make docs_html build target.

Generating Javadoc Tool Documentation

Building Javadoc tool documentation is the same for both Linux and Windows platforms.

  1. Change to the default build directory for your target platform.
  2. $ cd InstallDir/midp/build/platform

  3. Build Javadoc tool HTML documentation.
  4. $ make docs_html

    The generated HTML documents are put in the following directory:

    $PHONEME_OUTPUT_DIR/doc/javadoc/html

Viewing phoneME Feature Software Documents

Use any browser to display the Javadoc output file at the following URL:

file:///$PHONEME_OUTPUT_DIR/doc/javadoc/html/index.html


Using phoneME Feature Software

Once you build the phoneME Feature software for your target platform, it provides an environment in which MIDlet suites can be installed, listed, run, and uninstalled.

Installing a MIDlet Suite

For end users, the Over the Air (OTA) installer is used to install a MIDlet suite by clicking on the graphical link to a Java Application Descriptor (JAD) or Java Archive (JAR) file. For developers, a shell script is provided, called installMidlet that runs the OTA Installer from the command line. The installMidlet script is located in the directory $MIDP_OUTPUT_DIR/bin/cpu.

  1. Change to the directory containing the installMidlet script.
  2. For example, on a Linux/ARM platform, change to the following directory:

    $ cd $MIDP_OUTPUT_DIR/bin/arm

  3. To run the installMidlet script, enter the following in a command line:
  4. $ installMidlet url

    The argument url indicates the URL of a JAD or a JAR file. The MIDlet suite is installed from this URL.

    Note: The OTA installer used by the phoneME Feature software uses only the HTTP and HTTPS protocols to install MIDlet suites.

For more information on the OTA installer and installMIDlet subcommands, see the Sun Java Wireless Client Build Guide.

Using the runMidlet Command

The runMidlet application is built by default when you run the make all command to build the phoneME Feature software. The runMidlet script is located in the directory $MIDP_OUTPUT_DIR/bin/cpu.

Several arguments can be used with the runMidlet command, but this guide describes only two. For a complete list of arguments for runMidlet, see the Sun Java Wireless Client Build Guide.

  1. Change to the directory that contains the runMidlet script.
  2. For example, on a Linux/ARM platform, change to the following directory:

    $ cd $MIDP_OUTPUT_DIR/bin/arm

  3. Enter the following in a command line:

    $ runMidlet suiteNumber | suiteID

    The runMidlet command takes the argument suiteNumber | suiteID, which is the number or storage identifier given to the MIDlet suite when it was installed.

Removing an Installed MIDlet Suite

To remove one or all MIDlet suites installed in your phoneME Feature software environment, use the removeMidlet command. The removeMidlet script is located in the directory $MIDP_OUTPUT_DIR/bin/cpu.

  1. Change to the directory that contains the removeMidlet script.
  2. For example, on a Linux/ARM platform, change to the following directory:

    $ cd $MIDP_OUTPUT_DIR/bin/arm

  3. To run the removeMIDlet command, enter the following in a command line:
  4. $ removeMidlet ( suiteNumber | suiteID | all )

    The removeMidlet command takes the argument suiteNumber | suiteID, which is the number or storage identifier given to the MIDlet suite when it was installed.

    The argument all requests that all MIDlet suites be removed.

first | prev | next-last