Setting Up Your Build Environment (MR3)

first | prev | next | last

This section describes how to prepare your Windows x86 build environment for building the JavaCall porting layer, PCSL, CLDC, and phoneME Feature client software.

This document contains the following sections:

To properly use this document, two kinds of variables are set:

Both kinds of variables are described in the following sections.


Setting Up the Windows x86 Build Environment

To set up your Windows x86 platform, you must take the following general steps:

Installing Cyg4Me

Before you build phoneME Feature on a Windows x86 platform, download and install Cyg4Me, version 1.1. Cyg4Me is a standardized version of Cygwin for building Java ME platform products on Windows. It provides the necessary UNIX® system tools, such as sh and gnumake.

  1. Download the Cyg4Me zip file cyg4me1_1_full.zip.

    This file contains all the executables and libraries needed to build on the Windows x86 platform.

  2. Unzip the file.

    For example, you could unzip the file into C:\cyg4me.

Setting Up Your Windows Work Environment

To properly set up your Windows work environment, you must run the Windows batch file, VCVARS32.BAT, as shown here:

The VCVARS32.BAT file sets several Windows variables, including LIB, INCLUDE, and others.

Due to variations in Windows system configuration, the directory path to the VCVARS32.BAT file might differ from that shown here. If so, use the Windows Explorer to search for VCVARS32.BAT.

Note: If using a Windows path with spaces, as shown above, doesn't work, try entering a substitute path using Windows short names.

To find the short names for your directory path, change to each directory that has spaces and type:

You can use also the cygpath utility (from Cyg4me) to get the Windows short name. For example:

delivers the short name

If your compiler is Microsoft Visual Studio 2003, you might better set up your Windows work environment using the file vsvars32.bat. Run this Windows batch file as shown here:

Note: Building phoneME Feature using Microsoft Visual Studio .NET 2003 may work, but it is not fully supported. For best results, use Microsoft Visual C++ Professional Version 6.0, as described in Requirements for Building on a Windows x86 Platform.

Setting Build Platform Environment Variables

To set up the Windows x86 build environment to build phoneME Feature software for the JavaCall porting layer on Windows x86 target platform, set the optional build variables shown in Table1-1 and the required build variables as shown Table1-2.

TABLE 1-1Optional Windows x86 Build Platform Variables

Name

Description

COMPONENTS_DIR

The location where you install the phoneME Feature software. For example, COMPONENTS_DIR=C:/home/chocolate/phoneME_feature.

Note: The sample directory /home/chocolate can also be referred to by the convention InstallDir. For example, InstallDir/phoneME_feature.

BUILD_OUTPUT_DIR

The location where executables and other build output for phoneME Feature components are stored. For example, BUILD_OUTPUT_DIR=%COMPONENTS_DIR%/build_output.

TABLE 1-2Required Windows x86 Build Platform Variables

Name

Description

JDK_DIR

Directory that contains the JDK software release. For example, JDK_DIR=C:/java/j2sdk1.4.2.

CYG4ME

Location where you download and unzip Cyg4Me. For example, CYG4ME=C:\cyg4me.

PATH

Must be set to include Cyg4Me and other tools used in the Windows x86 build process.

Setting Build Variables

  • Set your COMPONENTS_DIR environment variable to the location where you install the phoneME_feature directory.

    $ set COMPONENTS_DIR=C:/InstallDir/phoneME_feature

  • Create the directory build_output as a folder and set the BUILD_OUTPUT_DIR variable.

    $ set BUILD_OUTPUT_DIR=%COMPONENTS_DIR%/build_output

  • Set the JDK_DIR variable.

    $ set JDK_DIR=C:/java/j2sdk1.4.2

    Note: As shown in this command line, the JDK_DIR path must be set using Linux (forward) slashes.

  • Set the CYG4ME variable, as shown here:

    $ set CYG4ME=C:\cyg4me

  • Add Cyg4Me and JDK_DIR to your PATH environment variable. Make the bin directory of your Cyg4Me installation the first element of your PATH, as shown here.

    $ set PATH=%CYG4ME%\bin;%JDK_DIR%/bin;%PATH%

    Note: If you previously installed Cygwin on your Windows x86 platform, remove all PATH elements that point to those previous versions.

    
    
    
    first | prev | next | last