java.net: Wiki

The Source for Java Technology Collaboration


 <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (32 - 09 Jan 2009 - Main.dbsears)
Line: 1 to 1
 
META TOPICPARENT name="PhoneMEAdvanced"

Build Recipe: Windows Mobile

Line: 42 to 42
 
Changed:
<
<
The following service packs and SDKs
>
>
The following tools, service packs and SDKs
  are needed for development with the CDC build system on Windows XP:

 <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (31 - 08 Jan 2009 - Main.dbsears)
Line: 1 to 1
 
META TOPICPARENT name="PhoneMEAdvanced"

Build Recipe: Windows Mobile

Line: 25 to 25
 

Build System Setup

Required Developer Tools

Deleted:
<
<
To use the CDC build system on a Windows XP host is a Linux-like environment for Windows. It includes a package management system that allows libraries and applications to be easily downloaded and upgraded. The following Cygwin packages are necessary for development with the CDC build system on Windows XP:
 
Line: 47 to 40
 
    • zip/unzip

Changed:
<
<
Microsoft Windows Visual Studio 2005 Standard Edition is the standard tool suite for Windows development.
>
>
Microsoft Windows Visual Studio is the standard tool suite for Windows software development.
  The following service packs and SDKs are needed for development with the CDC build system on Windows XP:

 <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (30 - 11 Nov 2008 - Main.dbsears)
Line: 1 to 1
 
META TOPICPARENT name="PhoneMEAdvanced"
Changed:
<
<

CDC Build System: Windows Mobile

>
>

Build Recipe: Windows Mobile

 

 <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (29 - 28 Aug 2008 - Main.dbsears)
Line: 1 to 1
 
META TOPICPARENT name="PhoneMEAdvanced"

CDC Build System: Windows Mobile


 <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (28 - 04 Aug 2008 - Main.dbsears)
Line: 1 to 1
 
META TOPICPARENT name="PhoneMEAdvanced"

CDC Build System: Windows Mobile


 <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (27 - 29 Jul 2008 - Main.dbsears)
Line: 1 to 1
 
META TOPICPARENT name="PhoneMEAdvanced"

CDC Build System: Windows Mobile

Line: 16 to 16
 The MIDP implementation is built on top of the functionality of Foundation Profile without exposing the APIs of Foundation Profile to applications. For graphics functionality, the MIDP/LCDUI implementation is based directly on the Windows Mobile graphics layer.
Added:
>
>
Note that the Personal Basis Profile implementation is not yet supported on Windows Mobile and therefore xlet support is also not yet available.
 The platform-dependent layer of the Windows Mobile implementation of phoneME Advanced is based on the Windows Mobile 5.0 Pocket PC SDK. The runtime is compatible with both Windows Mobile 5 and 6.x.
Changed:
<
<

Required Developer Tools

>
>

Build System Setup

Required Developer Tools

 To use the CDC build system on a Windows XP host is a Linux-like environment for Windows. It includes a package management system
Line: 56 to 60
 
Changed:
<
<

Required Project Components

>
>

Required Project Components

 After installing and updating the required developer tools for the CDC build system, you can get the project source code
Line: 125 to 129
 
Changed:
<
<

Building Foundation Profile

>
>

Building phoneME Advanced

Building Foundation Profile

 With the required developer tools and project source code in place, the next step is to create a driver script named build-fp.sh to run the build process.
Line: 190 to 196
 
Changed:
<
<

Building MIDP

>
>

Building MIDP

 And finally here's a build driver script named build-midp.sh for building MIDP:
Line: 222 to 228
 
Changed:
<
<

Using the Windows Mobile Device Emulator to Test the Executable

>
>

Runtime Examples

 After the build process successfully finishes, the CDC Java runtime environment is available as runtime executable located in a few target directories,
Line: 273 to 279
 

  • Changed:
    <
    <
    Two files are needed in addition to the CDC Java runtime environment executable files.
    >
    >
    (Optional). Set the Device Emulator RAM size to 256 MB.
     

    Deleted:
    <
    <
       
    • Changed:
      <
      <
      A .lnk file launches the CDC Java runtime environment. Note that paths used in the .lnk file must be relative to the Storage Card root.

      >
      >
      On the Device Emulator, navigate to the File Explorer application and select the Storage Card.

      Foundation Profile Example

         
      1. Changed:
        <
        <
        An args.txt to contain the arguments for cvm.exe.

        >
        >
        Create a .lnk file for launching the CDC Java runtime environment. Note that paths used in the .lnk file are relative to the Storage Card root.
         For example, here is a basic test-fp.lnk file to launch cvm and run the HelloWorld application:
        Changed:
        <
        <
        01#"\Storage Card\bin\cvm.exe" -f "\Storage Card\args.txt"
        >
        >
        01#"\Storage Card\bin\cvm.exe" -f "\Storage Card\fp-args.txt"
         

        Changed:
        <
        <
        The fpargs.txt file should contain the following:
        >
        >
      2. Create an args.txt file to contain the arguments for cvm.exe. For example, the fp-args.txt file contains the following:
      3.  
        Changed:
        <
        <
        -Xmx2m -Djava.class.path="\Storage Card\testclasses.zip" HelloWorld?
        >
        >
        "-Xopt:stdioPrefix=\Storage Card" -Xmx2m "-Djava.class.path=\Storage Card\testclasses.zip" HelloWorld?
         

      4. Deleted:
        <
        <
        Navigate to the File Explorer application and select the Storage Card.

      5.  Launch the HelloWorld application by double-clicking on the test-fp list item.
        Deleted:
        <
        <
         

        Changed:
        <
        <
        Since HelloWorld displays text on the standard output, the results of this application are not immediately apparent. Running a midlet is probably a more visually useful experiment and this will be described next.
        >
        >
        HelloWorld displays text on the standard output, so the results of this application are not immediately apparent. To see the standard output of the HelloWorld application, look at the OUT.txt file in the Storage Card directory.

        MIDP Example

        The example below is based on running a MIDlet locally.

         

        Changed:
        <
        <
        Create a .jar file containing a manifest file and a sample midlet.
        >
        >
        Create a .jar file containing a manifest file and a sample MIDlet .
         

      6. Copy the .jar file to the shared folder.

      7. Changed:
        <
        <
        Create a .lnk file for the midlet.
        >
        >
        Create a .lnk file for the MIDlet.
         It should be very similar to the .lnk file described in the previous example.

      8. Changed:
        <
        <
        Create an args.txt file for the midlet:
        >
        >
        Create an args.txt file for the MIDlet:
         

        -Xmx2m -Dmicroedition.profiles=MIDP-2.1 -Dsun.midp.library.name=midp "-Dsun.midp.home.path=\Storage Card\midp\midp_wince" -Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMIDletSuiteLoader sun.misc.MIDPLauncher -midppath "\Storage Card\midp\midp_wince\classes" -suitepath "\Storage Card\HelloWorld.jar" -1 HelloWorld
        Line: 330 to 341
         
      9. Launch the .lnk file as in the previous example.
      10. Deleted:
        <
        <

        Using a Windows Mobile Device to Test the Executable

        After testing with the Windows Mobile Device Emulator, testing with a Windows Mobile device is very straightforward. Perform the same procedures as in the previous section and use the device to mount the shared directory instead of the device emulator.


         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (26 - 29 Jul 2008 - Main.dbsears)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 65 to 65
         These procedures are described in Getting the Project Source Code.
        Changed:
        <
        <
        The required phoneME Advanced project components are:
        >
        >
        The required phoneME Advanced project components for building Foundation Profile are:
         
        • cdc
        Changed:
        <
        <
        • javacall
        • jpeg
        >
        >
        • tools

        The additional required phoneME Advanced project components for building MIDP are:

         
        • midp
        • pcsl
        Changed:
        <
        <
        • tools
        >
        >
        • javacall
        • jpeg

        The additional required phoneME Advanced project components for building an optional package are:

         
        Changed:
        <
        <
        It is best to keep each of these component directories in the same top-level directory (e.g. C:/phoneme).
        >
        >
        • abstractions
        • jsr[nnn]

        It's best to keep each of these component directories in the same top-level directory (e.g. C:/phoneme).

         
        Added:
        >
        >
         Note: The CDC build system has some dependencies on the way pathnames are used in a UNIX environment. To make this work more smoothly in the Cygwin environment
        Line: 91 to 100
         $ mkdir /pmea $ mount C:/pmea /pmea
        Added:
        >
        >

        Note: The following patches must be applied to the javacall directory:
        • Copy javacall/configuration/phoneMEAdvanced/linux_x86/properties.xml to javacall/configuration/phoneMEAdvanced/wince_arm.

        • Append the following lines to javacall/configuration/phoneMEAdvanced/wince_arm/environment.gmk:
          ifneq ($(USE_STATIC_PROPERTIES),true)
          SPECIFIC_DEFINITIONS += -DUSE_PROPERTIES_FROM_FS
          endif
          CONFIGURATION_PROPERTIES_FILE = properties.xml
          
         
        Changed:
        <
        <

        Build System Setup

        >
        >

        Building Foundation Profile

         With the required developer tools and project source code in place, the next step is to create a driver script named build-fp.sh to run the build process.
        Line: 115 to 147
         

        Added:
        >
        >
         Note: The Microsoft Visual Studio setup script
        Line: 126 to 159
         
        $ export LIBPATH=
        
        Added:
        >
        >
         

        Added:
        >
        >
         Note: The tools should be placed in the tools directory at the same level as the $TOP_DIR/cdc directory. If the build script can't find the tools the you must set the TOOLS_DIR variable.
        TOOLS_DIR=<location>/tools
        
        Added:
        >
        >
         

        Added:
        >
        >
         Note: Running the build-fp.sh script should be done from the cdc/build/win32-arm-wm5 directory. Adding
        Line: 150 to 187
         $ make -C $TOP_DIR/cdc/build/win32-arm-wm5 ... (rest of make command line) instead.
        Added:
        >
        >
         
        Changed:
        <
        <
        Note: The following patches must be applied to the javacall directory:
        • Copy javacall/configuration/phoneMEAdvanced/linux_x86/properties.xml to javacall/configuration/phoneMEAdvanced/wince_arm.

        • Append the following lines to javacall/configuration/phoneMEAdvanced/wince_arm/environment.gmk:
          ifneq ($(USE_STATIC_PROPERTIES),true)
          SPECIFIC_DEFINITIONS += -DUSE_PROPERTIES_FROM_FS
          endif
          CONFIGURATION_PROPERTIES_FILE = properties.xml
          
        >
        >

        Building MIDP

         And finally here's a build driver script named build-midp.sh for building MIDP:
        Line: 193 to 214
         

        Added:
        >
        >
         Note: If you have problems with the build and need to start over, it's best to run make clean before relaunching a failed build. Some of the project components retain build state that needs to be cleaned out.
        Added:
        >
        >
         

        Using the Windows Mobile Device Emulator to Test the Executable


         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (25 - 28 Jul 2008 - Main.dbsears)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 101 to 101
         
        #!/bin/sh
        
        Deleted:
        <
        <
        export TOP_DIR="C:/pmea"
         make JDK_HOME=C:/j2sdk1.4.2_18 J2ME_CLASSLIB=foundation
        Line: 154 to 152
         instead.
        Added:
        >
        >
        Note: The following patches must be applied to the javacall directory:
        • Copy javacall/configuration/phoneMEAdvanced/linux_x86/properties.xml to javacall/configuration/phoneMEAdvanced/wince_arm.

        • Append the following lines to javacall/configuration/phoneMEAdvanced/wince_arm/environment.gmk:
          ifneq ($(USE_STATIC_PROPERTIES),true)
          SPECIFIC_DEFINITIONS += -DUSE_PROPERTIES_FROM_FS
          endif
          CONFIGURATION_PROPERTIES_FILE = properties.xml
          
         And finally here's a build driver script named build-midp.sh for building MIDP:

        #!/bin/sh
        
        Deleted:
        <
        <
        export TOP_DIR="C:/pmea"
         make JDK_HOME=C:/j2sdk1.4.2_18
        Added:
        >
        >
        J2ME_CLASSLIB=foundation
          CVM_JIT=true CVM_PRELOAD_LIB=true
        Changed:
        <
        <
        CVM_INCLUDE_JAVACALL=true USE_JPEG=TRUE USE_MIDP=TRUE
        >
        >
        CVM_BUILD_SUBDIR_NAME=cdc-midp USE_JPEG=true USE_MIDP=true
         

        After modifying this script it can be invoked as follows:


         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (24 - 24 Jul 2008 - Main.dbsears)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 56 to 56
         
        Changed:
        <
        <

        Getting the Project Source Code

        >
        >

        Required Project Components

         After installing and updating the required developer tools for the CDC build system, you can get the project source code
        Line: 65 to 65
         These procedures are described in Getting the Project Source Code.
        Added:
        >
        >
        The required phoneME Advanced project components are:

        • cdc
        • javacall
        • jpeg
        • midp
        • pcsl
        • tools

        It is best to keep each of these component directories in the same top-level directory (e.g. C:/phoneme).

        Note:
         The CDC build system has some dependencies on the way pathnames are used in a UNIX environment. To make this work more smoothly in the Cygwin environment you must mount the installation directory onto a top-level Cygwin directory.
        Line: 78 to 91
         $ mkdir /pmea $ mount C:/pmea /pmea
        Added:
        >
        >
         

        Build System Setup

        Line: 90 to 104
         export TOP_DIR="C:/pmea"

        make

        Deleted:
        <
        <
        CVM_DEBUG=true USE_VERBOSE_MAKE=true
          JDK_HOME=C:/j2sdk1.4.2_18 J2ME_CLASSLIB=foundation CVM_JIT=true
        Line: 150 to 162
         export TOP_DIR="C:/pmea"

        make

        Deleted:
        <
        <
        CVM_DEBUG=true USE_VERBOSE_MAKE=true
          JDK_HOME=C:/j2sdk1.4.2_18
        Deleted:
        <
        <
        J2ME_CLASSLIB=foundation
          CVM_JIT=true CVM_PRELOAD_LIB=true
        Added:
        >
        >
        CVM_INCLUDE_JAVACALL=true
          USE_JPEG=TRUE USE_MIDP=TRUE
        Line: 182 to 192
         The first task with using the device emulator is to install the Java runtime environment within the emulator environment.
        Deleted:
        <
        <
        While it is possible to use ActiveSync? to do this, it is easier to use a shared folder.
         
        Changed:
        <
        <
        Create a Windows directory named "Storage Card" and copy the CDC Java runtime environment executable files from the target build directory to the shared directory.
        >
        >
        Create a Windows directory named "Storage Card".
        $ mkdir C:/Documents\ and\ Settings/User/Desktop/Storage\ Card
        

      11. Copy the CDC Java runtime environment executable files from the target build directory to the shared directory.
      12.  This should include the bin and lib directories and the testclasses.zip archive file.

        Line: 195 to 208
         $ cp -r bin lib midp testclasses.zip /cygdrive/c/Documents\ and\ Settings/User/Desktop/Storage\ Card/

        Added:
        >
        >
      13. Launch the Microsoft Device Emulator.

        $ C:/Program Files/Microsoft Device Emulator/1.0/dvcemumanager.exe
        
      14.  

      15. Changed:
        <
        <
        Launch dvcemumanager.exe, the Microsoft Device Emulator. By default, it is located in C:/Program Files/Microsoft Device Emulator/1.0.
        >
        >
        Select the shared folder.
         


         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (23 - 24 Jul 2008 - Main.dbsears)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 108 to 108
         Note: The Microsoft Visual Studio setup script
        Changed:
        <
        <
        /Program Files/Microsoft Visual Studio 8/Common7/Tools/vsvars32.bat
        >
        >
        C:/Program Files/Microsoft Visual Studio 8/Common7/Tools/vsvars32.bat
          defines the variable LIBPATH. This may cause the build to fail because it tries search that path which is interpreted incorrectly since it is a Windows

         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (22 - 24 Jul 2008 - Main.dbsears)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 12 to 12
         and then build different versions of the CDC Java runtime environment that will also run on a Windows Mobile/Pocket PC device or emulator.
        Changed:
        <
        <
        Note that the MIDP implementation is built on top of the functionality of Foundation Profile without exposing the APIs of Foundation Profile to applications.
        >
        >

        Platform Notes

        The MIDP implementation is built on top of the functionality of Foundation Profile without exposing the APIs of Foundation Profile to applications.

         For graphics functionality, the MIDP/LCDUI implementation is based directly on the Windows Mobile graphics layer.
        Added:
        >
        >
        The platform-dependent layer of the Windows Mobile implementation of phoneME Advanced is based on the Windows Mobile 5.0 Pocket PC SDK. The runtime is compatible with both Windows Mobile 5 and 6.x.
         

        Required Developer Tools

        To use the CDC build system on a Windows XP host is a Linux-like environment for Windows.

         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (21 - 23 Jul 2008 - Main.dbsears)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 12 to 12
         and then build different versions of the CDC Java runtime environment that will also run on a Windows Mobile/Pocket PC device or emulator.
        Added:
        >
        >
        Note that the MIDP implementation is built on top of the functionality of Foundation Profile without exposing the APIs of Foundation Profile to applications. For graphics functionality, the MIDP/LCDUI implementation is based directly on the Windows Mobile graphics layer.
         

        Required Developer Tools

        To use the CDC build system on a Windows XP host is a Linux-like environment for Windows.
        Line: 31 to 34
         
          • gcc-g++
          • make
          • perl
        Deleted:
        <
        <
          • zip/unzip
         
          • subversion
        Added:
        >
        >
          • zip/unzip
         
        Line: 40 to 44
          are needed for development with the CDC build system on Windows XP:
        Changed:
        <
        <
        >
        >
         
        Deleted:
        <
        <
         

        Getting the Project Source Code

        Line: 55 to 57
         you can get the project source code by either downloading the project source code bundle (appropriate for evaluation purposes) or checking out the project source code from the repository.
        Deleted:
        <
        <
         These procedures are described in Getting the Project Source Code.
        Deleted:
        <
        <
        Both the svn and wget are available through the Cygwin package management system.
         The CDC build system has some dependencies on the way pathnames are used in a UNIX environment. To make this work more smoothly in the Cygwin environment you must mount the installation directory onto a top-level Cygwin directory.
        Changed:
        <
        <
        For example, if the installation directory is C:/phoneme_advanced_mr2,
        >
        >
        For example, if the installation directory is C:/pmea,
         then the following commands will mount the installation directory
        Changed:
        <
        <
        onto the top-level /phoneme_advanced_mr2 directory.
        >
        >
        onto the top-level /pmea directory.
         It is important that the directory and the mount point have the same name.
        Changed:
        <
        <
        $ mkdir -p /phoneme_advanced_mr2 $ mount C:/phoneme_advanced_mr2 /phoneme_advanced_mr2
        >
        >
        $ mkdir C:/pmea $ mkdir /pmea $ mount C:/pmea /pmea
         

        Build System Setup

        With the required developer tools and project source code in place,

        Changed:
        <
        <
        the next step is to define a set of environment variables that describe the location of the various developer tools.

        Here is a template for an environment setup script named win-setup.sh based on the default installation for the various developer tools. It's best to keep this setup script in the target build directory for Windows Mobile: cdc/build/win32-arm-wm5. It may be necessary to change the definitions of some of these locations.

        >
        >
        the next step is to create a driver script named build-fp.sh to run the build process. The following script builds a basic Foundation Profile target:
         
        Changed:
        <
        <
        #!/bin/bash
        >
        >
        #!/bin/sh
         
        Changed:
        <
        <
        # # set this paths for the Java SDK # export JDK_HOME=c:/j2sdk1.4.2_15
        >
        >
        export TOP_DIR="C:/pmea"
         
        Changed:
        <
        <
        # # set these paths for MS Visual Studio # export VSROOT="/cygdrive/c/Program\ Files/Microsoft\ Visual\ Studio\ 8" export VSROOT2="/cygdrive/c/Program Files/Microsoft Visual Studio 8"

        export PATH=$VSROOT2/vc/ce/bin/x86_arm:$VSROOT2/Common7/IDE:$VSROOT2/VC/BIN:$VSROOT2/Common7/Tools:$VSROOT2/Common7/Tools/bin:$VSROOT2/VC/PlatformSDK/bin:$VSROOT2/SDK/v2.0/bin:$VSROOT2/VC/VCPackages:$PATH

        >
        >
        make CVM_DEBUG=true USE_VERBOSE_MAKE=true JDK_HOME=C:/j2sdk1.4.2_18 J2ME_CLASSLIB=foundation CVM_JIT=true CVM_PRELOAD_LIB=true
         
        Changed:
        <
        <
        After modifying this script it can be executed in the current shell:
        >
        >
        After modifying this script it can be invoked as follows:
         
        Changed:
        <
        <
        $ source win-setup.sh
        >
        >
        $ sh < build-fp.sh >& err &
         
        Added:
        >
        >
         Note: The Microsoft Visual Studio setup script
        Line: 123 to 111
         
        $ export LIBPATH=
        
        Added:
        >
        >
         
        Changed:
        <
        <
        Next, we'll need a driver script named build-fp.sh to run the build process. The following script builds a basic Foundation Profile target:
        #!/bin/bash
        
        export TOP_DIR="/phoneme_advanced_mr2"
        make \
          J2ME_CLASSLIB=foundation \
          CVM_JIT=true \
          CVM_DEBUG=true \
          CVM_PRELOAD_LIB=true
        

        After modifying this script it can be invoked as follows:

        $ sh < build-fp.sh >& err &
        
        >
        >
         Note: The tools should be placed in the tools directory at the same level as the $TOP_DIR/cdc directory. If the build script can't find the tools the you must set the TOOLS_DIR variable.
        TOOLS_DIR=<location>/tools
        
        Added:
        >
        >
         
        Changed:
        <
        <
        >
        >
         Note: Running the build-fp.sh script should be done from the cdc/build/win32-arm-wm5 directory. Adding
        Changed:
        <
        <
        cd cdc/build/win32-arm-wm5
        >
        >
        $ cd cdc/build/win32-arm-wm5
          to the beginning of the build script to change to the directory automatically may fail. If you want to cd to the build directory in the script use
        Changed:
        <
        <
        make -C $TOP_DIR/cdc/build/win32-arm-wm5 ... (rest of make command line)
        >
        >
        $ make -C $TOP_DIR/cdc/build/win32-arm-wm5 ... (rest of make command line)
          instead.
        Added:
        >
        >
         And finally here's a build driver script named build-midp.sh for building MIDP:
        Changed:
        <
        <
        #!/bin/bash
        >
        >
        #!/bin/sh

        export TOP_DIR="C:/pmea"

         
        Deleted:
        <
        <
        export TOP_DIR="/phoneme_advanced_mr2"
         make
        Added:
        >
        >
        CVM_DEBUG=true USE_VERBOSE_MAKE=true JDK_HOME=C:/j2sdk1.4.2_18
          J2ME_CLASSLIB=foundation CVM_JIT=true
        Deleted:
        <
        <
        CVM_DEBUG=true
          CVM_PRELOAD_LIB=true
        Changed:
        <
        <
        PCSL_DIR=$TOP_DIR/pcsl USE_JPEG=true JPEG_DIR=$TOP_DIR/jpeg USE_MIDP=true MIDP_DIR=$TOP_DIR/midp
        >
        >
        USE_JPEG=TRUE USE_MIDP=TRUE
         

        After modifying this script it can be invoked as follows:

        Line: 188 to 161
         $ sh < build-midp.sh >& err &
        Changed:
        <
        <
        Note that MIDP is built on top of the functionality of Foundation Profile. For graphics functionality, the LCDUI implementation is based directly on the Windows Mobile graphics layer.
        >
        >
         Note: If you have problems with the build and need to start over, it's best to run make clean before relaunching a failed build. Some of the project components retain build state that needs to be cleaned out.
        Added:
        >
        >
         

        Using the Windows Mobile Device Emulator to Test the Executable


         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (20 - 21 Apr 2008 - Main.terrencebarr)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 101 to 101
         export VSROOT="/cygdrive/c/Program\ Files/Microsoft\ Visual\ Studio\ 8" export VSROOT2="/cygdrive/c/Program Files/Microsoft Visual Studio 8"
        Deleted:
        <
        <
        # # Set these paths for MS Windows CE tools # export VS2005_CE_ARM_LIB="C:/Program\ Files/Windows\ CE\ Tools/WCE500/WINDOW~1.0PO/LIB/ARMV4I" export VS2005_CE_ARM_INCLUDE="C:/Program Files/Windows CE Tools/wce500/Windows Mobile 5.0 Pocket PC SDK/Include/Armv4i" export VS2005_CE_ARM_PATH="C:/Program\ Files/Microsoft\ Visual\ Studio\ 8/vc/ce/bin/x86_arm" export VS2005_COMMON_PATH="C:/Program\ Files/Microsoft\ Visual\ Studio\ 8/vc/bin"

        export VSINSTALLDIR=$VSROOT export VCINSTALLDIR=$VSROOT/VC export VS2005_ROOT=$VSINSTALLDIR export VS8_DIR=$VSROOT2 export VS8_PATH=$VSROOT2 export VC_DIR=$VS8_DIR/VC export VC_PATH=$VS8_PATH/VC

         export PATH=$VSROOT2/vc/ce/bin/x86_arm:$VSROOT2/Common7/IDE:$VSROOT2/VC/BIN:$VSROOT2/Common7/Tools:$VSROOT2/Common7/Tools/bin:$VSROOT2/VC/PlatformSDK/bin:$VSROOT2/SDK/v2.0/bin:$VSROOT2/VC/VCPackages:$PATH

         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (19 - 21 Apr 2008 - Main.terrencebarr)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 41 to 41
         
        Changed:
        <
        <
        ActiveSync? 4.5
        >
        >
        ActiveSync 4.5
         

         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (18 - 02 Dec 2007 - Main.terrencebarr)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 305 to 305
         Create an args.txt file for the midlet:

        Changed:
        <
        <
        -Xmx2m -Dmicroedition.profiles=MIDP-2.1 -Dsun.midp.library.name=midp -Dsun.midp.home.path="\Storage Card\midp\midp_wince" -Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMIDletSuiteLoader sun.misc.MIDPLauncher -midppath "\Storage Card\midp\midp_wince\classes" -suitepath "\Storage Card\HelloWorld.jar" -1 HelloWorld?
        >
        >
        -Xmx2m -Dmicroedition.profiles=MIDP-2.1 -Dsun.midp.library.name=midp "-Dsun.midp.home.path=\Storage Card\midp\midp_wince" -Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMIDletSuiteLoader sun.misc.MIDPLauncher -midppath "\Storage Card\midp\midp_wince\classes" -suitepath "\Storage Card\HelloWorld.jar" -1 HelloWorld?
         
        Added:
        >
        >
        If you have problems launching the MIDlet you can add "-Xopt:stdioPrefix=/Storage Card" to args.txt to have output and errors written to the root of the storage card.
         

      16. Launch the .lnk file as in the previous example.

      17.  <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (17 - 30 Nov 2007 - Main.terrencebarr)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 128 to 128
         $ source win-setup.sh
        Added:
        >
        >
        Note: The Microsoft Visual Studio setup script
        /Program Files/Microsoft Visual Studio 8/Common7/Tools/vsvars32.bat
        
        defines the variable LIBPATH. This may cause the build to fail because it tries search that path which is interpreted incorrectly since it is a Windows path with backslash characters. In that case simply set the variable to an empty string:
        $ export LIBPATH=
        
         Next, we'll need a driver script named build-fp.sh to run the build process. The following script builds a basic Foundation Profile target:
        Line: 136 to 148
         export TOP_DIR="/phoneme_advanced_mr2" make J2ME_CLASSLIB=foundation
        Deleted:
        <
        <
        USE_VS2005=true CVM_COMPILER_INCOMPATIBLE=false
          CVM_JIT=true CVM_DEBUG=true CVM_PRELOAD_LIB=true
        Line: 149 to 159
         $ sh < build-fp.sh >& err &
        Added:
        >
        >
        Note: The tools should be placed in the tools directory at the same level as the $TOP_DIR/cdc directory. If the build script can't find the tools the you must set the TOOLS_DIR variable.
        TOOLS_DIR=<location>/tools
        

        Note: Running the build-fp.sh script should be done from the cdc/build/win32-arm-wm5 directory. Adding

        cd cdc/build/win32-arm-wm5
        
        to the beginning of the build script to change to the directory automatically may fail. If you want to cd to the build directory in the script use
        make -C $TOP_DIR/cdc/build/win32-arm-wm5 ... (rest of make command line)
        
        instead.
         And finally here's a build driver script named build-midp.sh for building MIDP:
        Line: 157 to 188
         export TOP_DIR="/phoneme_advanced_mr2" make J2ME_CLASSLIB=foundation
        Deleted:
        <
        <
        USE_VS2005=true CVM_COMPILER_INCOMPATIBLE=false
          CVM_JIT=true CVM_DEBUG=true CVM_PRELOAD_LIB=true

         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (16 - 05 Sep 2007 - Main.dbsears)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 122 to 122
         $VSROOT2/SDK/v2.0/bin:$VSROOT2/VC/VCPackages:$PATH
        Changed:
        <
        <
        After modifying this script it can be invoked as follows:
        >
        >
        After modifying this script it can be executed in the current shell:
         
        Changed:
        <
        <
        $ . win-setup.sh
        >
        >
        $ source win-setup.sh
         

        Next, we'll need a driver script named build-fp.sh to run the build process. The following script builds a basic Foundation Profile target:

        Changed:
        <
        <
        #!/bin/sh
        >
        >
        #!/bin/bash
         
        Changed:
        <
        <
        export TOP_DIR=`cygpath "/phoneme_advanced_mr2"`
        >
        >
        export TOP_DIR="/phoneme_advanced_mr2"
         make J2ME_CLASSLIB=foundation USE_VS2005=true
        Line: 151 to 152
         And finally here's a build driver script named build-midp.sh for building MIDP:
        Changed:
        <
        <
        #!/bin/sh
        >
        >
        #!/bin/bash
         
        Changed:
        <
        <
        export TOP_DIR=`cygpath "/phoneme_advanced_mr2"`
        >
        >
        export TOP_DIR="/phoneme_advanced_mr2"
         make J2ME_CLASSLIB=foundation USE_VS2005=true

         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (15 - 30 Aug 2007 - Main.dbsears)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 26 to 26
         
        • Cygwin is a Linux-like environment for Windows with a package management system that allows libraries and applications to be easily downloaded and upgraded. The following Cygwin packages are necessary for development with the CDC build system on Windows XP:
          • binutils
          • bison
        Added:
        >
        >
          • diffutils
         
          • flex
          • gcc-g++
          • make
          • perl
        Changed:
        <
        <
          • zip
        >
        >
          • zip/unzip
         
        Line: 127 to 128
         $ . win-setup.sh
        Changed:
        <
        <
        Next, we'll need a driver script to run the build process.
        >
        >
        Next, we'll need a driver script named build-fp.sh to run the build process.
         The following script builds a basic Foundation Profile target:
        #!/bin/sh
        
        Line: 147 to 148
         $ sh < build-fp.sh >& err &
        Changed:
        <
        <
        And here's a build driver script for building MIDP:
        >
        >
        And finally here's a build driver script named build-midp.sh for building MIDP:
         
        #!/bin/sh
        Line: 167 to 168
          MIDP_DIR=$TOP_DIR/midp
        Added:
        >
        >
        After modifying this script it can be invoked as follows:

        $ sh < build-midp.sh >& err &
        
         Note that MIDP is built on top of the functionality of Foundation Profile. For graphics functionality, the LCDUI implementation is based directly on the Windows Mobile graphics layer.

        Note: If you have problems with the build and need to start over, it's best to run make clean before relaunching a failed build.

        Changed:
        <
        <
        Some of the project components retain build state that needs to cleaned out.
        >
        >
        Some of the project components retain build state that needs to be cleaned out.
         

        Using the Windows Mobile Device Emulator to Test the Executable


         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (14 - 29 Aug 2007 - Main.dbsears)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 131 to 131
         The following script builds a basic Foundation Profile target:
        #!/bin/sh
        
        Changed:
        <
        <
        export TOP_DIR=`cygpath "/mr2"`
        >
        >
        export TOP_DIR=`cygpath "/phoneme_advanced_mr2"`
         make J2ME_CLASSLIB=foundation USE_VS2005=true
        Line: 152 to 152
         
        #!/bin/sh
        
        Changed:
        <
        <
        export TOP_DIR=`cygpath "/mr2"`
        >
        >
        export TOP_DIR=`cygpath "/phoneme_advanced_mr2"`
         make J2ME_CLASSLIB=foundation USE_VS2005=true

         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (13 - 21 Aug 2007 - Main.dbsears)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 63 to 63
         The CDC build system has some dependencies on the way pathnames are used in a UNIX environment. To make this work more smoothly in the Cygwin environment you must mount the installation directory onto a top-level Cygwin directory.
        Changed:
        <
        <
        For example, if the installation directory is C:/mr2,
        >
        >
        For example, if the installation directory is C:/phoneme_advanced_mr2,
         then the following commands will mount the installation directory
        Changed:
        <
        <
        onto the top-level /mr2 directory.
        >
        >
        onto the top-level /phoneme_advanced_mr2 directory. It is important that the directory and the mount point have the same name.
         
        Changed:
        <
        <
        $ mkdir -p /mr2 $ mount C:/mr2 /mr2
        >
        >
        $ mkdir -p /phoneme_advanced_mr2 $ mount C:/phoneme_advanced_mr2 /phoneme_advanced_mr2
         

        Build System Setup

        Line: 174 to 175
         before relaunching a failed build. Some of the project components retain build state that needs to cleaned out.
        Changed:
        <
        <

        Using the Windows Mobile Emulator to Test the Executable

        >
        >

        Using the Windows Mobile Device Emulator to Test the Executable

         After the build process successfully finishes, the CDC Java runtime environment is available as runtime executable located in a few target directories,
        Line: 236 to 237
         

        The fpargs.txt file should contain the following:

        Changed:
        <
        <
        -Djava.class.path="\Storage Card\testclasses.zip" HelloWorld?
        >
        >
        -Xmx2m -Djava.class.path="\Storage Card\testclasses.zip" HelloWorld?
         

      18. Line: 267 to 268
         Create an args.txt file for the midlet:

        Changed:
        <
        <
        -Xmx2m -Dmicroedition.profiles=MIDP-2.0 -Dsun.midp.library.name=midp -Dsun.midp.home.path="\Storage Card\midp\midp_wince" -Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMIDletSuiteLoader sun.misc.MIDPLauncher -midppath "\Storage Card\midp\midp_wince\classes" -suitepath "\Storage Card\HelloWorld.jar" -1 HelloWorld?
        >
        >
        -Xmx2m -Dmicroedition.profiles=MIDP-2.1 -Dsun.midp.library.name=midp -Dsun.midp.home.path="\Storage Card\midp\midp_wince" -Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMIDletSuiteLoader sun.misc.MIDPLauncher -midppath "\Storage Card\midp\midp_wince\classes" -suitepath "\Storage Card\HelloWorld.jar" -1 HelloWorld?
         

      19. Launch the .lnk file as in the previous example. \ No newline at end of file
      20. Added:
        >
        >

        Using a Windows Mobile Device to Test the Executable

        After testing with the Windows Mobile Device Emulator, testing with a Windows Mobile device is very straightforward. Perform the same procedures as in the previous section and use the device to mount the shared directory instead of the device emulator.

         \ No newline at end of file

         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (12 - 16 Aug 2007 - Main.dbsears)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 169 to 169
         Note that MIDP is built on top of the functionality of Foundation Profile. For graphics functionality, the LCDUI implementation is based directly on the Windows Mobile graphics layer.
        Added:
        >
        >
        Note: If you have problems with the build and need to start over, it's best to run make clean before relaunching a failed build. Some of the project components retain build state that needs to cleaned out.
         

        Using the Windows Mobile Emulator to Test the Executable

        After the build process successfully finishes, the CDC Java runtime environment


         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (11 - 15 Aug 2007 - Main.dbsears)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 189 to 188
         and the testclasses.zip archive file.

        Changed:
        <
        <
        $ cp -r bin lib testclasses.zip /cygdrive/c/Documents\ and\ Settings/User/Desktop/Storage\ Card/
        >
        >
        $ cp -r bin lib midp testclasses.zip /cygdrive/c/Documents\ and\ Settings/User/Desktop/Storage\ Card/
         

        Line: 247 to 246
         the results of this application are not immediately apparent. Running a midlet is probably a more visually useful experiment and this will be described next.
        Added:
        >
        >

        1. Create a .jar file containing a manifest file and a sample midlet.

        2. Copy the .jar file to the shared folder.

        3. Create a .lnk file for the midlet. It should be very similar to the .lnk file described in the previous example.

        4. Create an args.txt file for the midlet:

          -Xmx2m -Dmicroedition.profiles=MIDP-2.0 -Dsun.midp.library.name=midp -Dsun.midp.home.path="\Storage Card\midp\midp_wince" -Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMIDletSuiteLoader sun.misc.MIDPLauncher -midppath "\Storage Card\midp\midp_wince\classes" -suitepath "\Storage Card\HelloWorld.jar" -1 HelloWorld
          

        5. Launch the .lnk file as in the previous example.

         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (10 - 15 Aug 2007 - Main.dbsears)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 183 to 183
         it is easier to use a shared folder.
        Changed:
        <
        <
        Create a Windows directory named "Storage Card" and copy the appropriate CDC files into that directory.
        >
        >
        Create a Windows directory named "Storage Card" and copy the CDC Java runtime environment executable files from the target build directory to the shared directory.
         This should include the bin and lib directories and the testclasses.zip archive file.

        Added:
        >
        >
        $ cp -r bin lib testclasses.zip /cygdrive/c/Documents\ and\ Settings/User/Desktop/Storage\ Card/
        

         
      21. Launch dvcemumanager.exe, the Microsoft Device Emulator. By default, it is located in C:/Program Files/Microsoft Device Emulator/1.0.

      22. Changed:
        <
        <
        Select the Windows Mobile 5.0 Pocket PC device emulator.
        >
        >
        Connect to the Windows Mobile 5.0 Pocket PC device emulator.
         

      23. On the emulator screen choose File->Configure.
      24. Changed:
        <
        <
        The Emulator Properties dialog displays.
        >
        >
        The Emulator Properties dialog will display.
         

      25. Changed:
        <
        <
        Under the Shared folder: edit box, select the 'Storage Card' directory you created.
        >
        >
        Under the Shared folder: edit box, select the newly created Storage Card directory.
         

      26. Changed:
        <
        <
        Click on the 'OK' button. The folder is now shared.
        >
        >
        Click on the 'OK' button to share the directory.
         

      27. Line: 225 to 230
         01#"\Storage Card\bin\cvm.exe" -f "\Storage Card\args.txt"

        Changed:
        <
        <
        The args.txt file should contain the following:
        >
        >
        The fpargs.txt file should contain the following:
         
        -Djava.class.path="\Storage Card\testclasses.zip" HelloWorld
        
        Deleted:
        <
        <
        Since HelloWorld displays text on the standard output, the results of this application are not immediately apparent. So running a midlet is probably a more visually useful experiment.
         

      28. Navigate to the File Explorer application and select the Storage Card.

      29. Changed:
        <
        <
        Launch the HelloWorld application by starting test-fp.
        >
        >
        Launch the HelloWorld application by double-clicking on the test-fp list item.
          \ No newline at end of file
        Added:
        >
        >

        Since HelloWorld displays text on the standard output, the results of this application are not immediately apparent. Running a midlet is probably a more visually useful experiment and this will be described next.


         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (9 - 15 Aug 2007 - Main.dbsears)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 238 to 238
         application and select the Storage Card.

      30. Changed:
        <
        <
        Launch the Test application.
        >
        >
        Launch the HelloWorld application by starting test-fp.
          \ No newline at end of file

         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (8 - 15 Aug 2007 - Main.dbsears)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 220 to 220
         An args.txt to contain the arguments for cvm.exe.

        Changed:
        <
        <
        For example, here is a basic test-fp.lnk file to launch cvm:
        >
        >
        For example, here is a basic test-fp.lnk file to launch cvm and run the HelloWorld application:
         
        01#"\Storage Card\bin\cvm.exe" -f "\Storage Card\args.txt"
        
        Line: 229 to 229
         
        -Djava.class.path="\Storage Card\testclasses.zip" HelloWorld
        
        Added:
        >
        >
        Since HelloWorld displays text on the standard output, the results of this application are not immediately apparent. So running a midlet is probably a more visually useful experiment.
         

      31. Navigate to the File Explorer

      32.  <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (7 - 14 Aug 2007 - Main.dbsears)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 15 to 15
         

        Required Developer Tools

        To use the CDC build system on a Windows XP host
        Deleted:
        <
        <
        requires three sets of developer tools:

          is a Linux-like environment for Windows. It includes a package management system that allows libraries and applications to be easily downloaded and upgraded. The following Cygwin packages are necessary for development with the CDC build system on Windows XP:
        Added:
        >
        >

        • J2SE v 1.4.2 SDK
        • Cygwin is a Linux-like environment for Windows with a package management system that allows libraries and applications to be easily downloaded and upgraded. The following Cygwin packages are necessary for development with the CDC build system on Windows XP:
         
          • binutils
          • bison
          • flex
          • gcc-g++
          • make
        Changed:
        <
        <
          • subversion
        >
        >
          • perl
         
          • zip
        Added:
        >
        >
          • subversion
         
        Line: 60 to 61
         Both the svn and wget are available through the Cygwin package management system.
        Added:
        >
        >
        The CDC build system has some dependencies on the way pathnames are used in a UNIX environment. To make this work more smoothly in the Cygwin environment you must mount the installation directory onto a top-level Cygwin directory. For example, if the installation directory is C:/mr2, then the following commands will mount the installation directory onto the top-level /mr2 directory.

        $ mkdir -p /mr2
        $ mount C:/mr2 /mr2
        
         

        Build System Setup

        With the required developer tools and project source code in place,

        Line: 77 to 90
         #!/bin/bash

        #

        Changed:
        <
        <
        # Set this path for Visual Studio
        >
        >
        # set this paths for the Java SDK
         #
        Changed:
        <
        <
        VSROOT="C:/Program Files/Microsoft Visual Studio 8"
        >
        >
        export JDK_HOME=c:/j2sdk1.4.2_15
         #
        Changed:
        <
        <
        # Set this path for Windows Mobile 5.0 Pocket PC SDK
        >
        >
        # set these paths for MS Visual Studio
         #
        Changed:
        <
        <
        WMROOT="C:/Program Files/Windows CE Tools/wce500/Windows Mobile 5.0 Pocket PC SDK"
        >
        >
        export VSROOT="/cygdrive/c/Program\ Files/Microsoft\ Visual\ Studio\ 8" export VSROOT2="/cygdrive/c/Program Files/Microsoft Visual Studio 8"
         
        Changed:
        <
        <
        export VS2005_CE_ARM_LIB="$WMROOT/Lib/ARMV4I" export VS2005_CE_ARM_INCLUDE="$WMROOT/Include/Armv4i" export VS2005_CE_ARM_PATH="$VSROOT/VC/ce/bin/x86_arm" export VS2005_COMMON_PATH="$VSROOT/VC/bin"

        VSROOT2=`cygpath "$VSROOT"` export VS8_DIR="$VSROOT2"

        export PATH=$VSROOT2/VC/ce/bin/x86_arm:$VSROOT2/VC/bin:$VSROOT2/Common7/Tools/Bin:$VSROOT2/Common7/IDE:$VSROOT2/Common7/Tools:$PATH

        >
        >
        # # Set these paths for MS Windows CE tools # export VS2005_CE_ARM_LIB="C:/Program\ Files/Windows\ CE\ Tools/WCE500/WINDOW~1.0PO/LIB/ARMV4I" export VS2005_CE_ARM_INCLUDE="C:/Program Files/Windows CE Tools/wce500/Windows Mobile 5.0 Pocket PC SDK/Include/Armv4i" export VS2005_CE_ARM_PATH="C:/Program\ Files/Microsoft\ Visual\ Studio\ 8/vc/ce/bin/x86_arm" export VS2005_COMMON_PATH="C:/Program\ Files/Microsoft\ Visual\ Studio\ 8/vc/bin"

        export VSINSTALLDIR=$VSROOT export VCINSTALLDIR=$VSROOT/VC export VS2005_ROOT=$VSINSTALLDIR export VS8_DIR=$VSROOT2 export VS8_PATH=$VSROOT2 export VC_DIR=$VS8_DIR/VC export VC_PATH=$VS8_PATH/VC

        export PATH=$VSROOT2/vc/ce/bin/x86_arm:$VSROOT2/Common7/IDE:$VSROOT2/VC/BIN:$VSROOT2/Common7/Tools:$VSROOT2/Common7/Tools/bin:$VSROOT2/VC/PlatformSDK/bin:$VSROOT2/SDK/v2.0/bin:$VSROOT2/VC/VCPackages:$PATH

         After modifying this script it can be invoked as follows:
        Line: 105 to 129
         Next, we'll need a driver script to run the build process. The following script builds a basic Foundation Profile target:
        Changed:
        <
        <
        #!/bin/sh
        
        export TOP_DIR=`cygpath "C:/mr2/windows/source"`
        >
        >
        #!/bin/sh
         
        Added:
        >
        >
        export TOP_DIR=`cygpath "/mr2"`
         make
        Deleted:
        <
        <
        CVM_HOST_TOOLS_PREFIX=/usr/bin/ CVM_JAVA_TOOLS_PREFIX=`cygpath "C:/j2sdk1.4.2_15/bin/"` JDK_HOME=`cygpath "C:/j2sdk1.4.2_15"`
          J2ME_CLASSLIB=foundation
        Deleted:
        <
        <
        USE_VERBOSE_MAKE=true
          USE_VS2005=true CVM_COMPILER_INCOMPATIBLE=false
        Deleted:
        <
        <
        CVM_BUILD_SUBDIR=true CVM_BUILD_SUBDIR_NAME=phoneme-advanced
          CVM_JIT=true
        Changed:
        <
        <
        CVM_OPTIMIZED=true CVM_PRELOAD_LIB=true CVM_SYMBOLS=true TOOLS_DIR="$TOP_DIR"/tools
        >
        >
        CVM_DEBUG=true CVM_PRELOAD_LIB=true
         

        After modifying this script it can be invoked as follows:

        Line: 138 to 152
         
        #!/bin/sh
        
        Changed:
        <
        <
        export TOP_DIR=`cygpath "C:/mr2/windows/source"`
        >
        >
        export TOP_DIR=`cygpath "/mr2"`
         make
        Deleted:
        <
        <
        CVM_HOST_TOOLS_PREFIX=/usr/bin/ CVM_JAVA_TOOLS_PREFIX=`cygpath "C:/j2sdk1.4.2_15/bin/"` JDK_HOME=`cygpath "C:/j2sdk1.4.2_15"`
          J2ME_CLASSLIB=foundation
        Deleted:
        <
        <
        USE_VERBOSE_MAKE=true
          USE_VS2005=true CVM_COMPILER_INCOMPATIBLE=false
        Deleted:
        <
        <
        CVM_BUILD_SUBDIR=true CVM_BUILD_SUBDIR_NAME=phoneme-advanced
          CVM_JIT=true
        Changed:
        <
        <
        CVM_OPTIMIZED=true
        >
        >
        CVM_DEBUG=true
          CVM_PRELOAD_LIB=true
        Changed:
        <
        <
        CVM_SYMBOLS=true TOOLS_DIR="$TOP_DIR"/tools ABSTRACTIONS_DIR="$TOP_DIR"/abstractions PCSL_DIR="$TOP_DIR"/pcsl
        >
        >
        PCSL_DIR=$TOP_DIR/pcsl
          USE_JPEG=true
        Changed:
        <
        <
        JPEG_DIR="$TOP_DIR"/jpeg
        >
        >
        JPEG_DIR=$TOP_DIR/jpeg
          USE_MIDP=true
        Changed:
        <
        <
        MIDP_DIR="$TOP_DIR"/midp CVM_INCLUDE_JAVACALL=false
        >
        >
        MIDP_DIR=$TOP_DIR/midp
         

        Note that MIDP is built on top of the functionality of Foundation Profile.

        Line: 217 to 220
         An args.txt to contain the arguments for cvm.exe.

        Changed:
        <
        <
        For example, here is the basic test.lnk file to launch cvm:
        >
        >
        For example, here is a basic test-fp.lnk file to launch cvm:
         
        01#"\Storage Card\bin\cvm.exe" -f "\Storage Card\args.txt"
        

        Changed:
        <
        <
        The args.txt file contains the following:
        >
        >
        The args.txt file should contain the following:
         
        Changed:
        <
        <
        -Djava.class.path="\Storage Card\testclasses.zip" Test
        >
        >
        -Djava.class.path="\Storage Card\testclasses.zip" HelloWorld?
         


      33.  <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (6 - 10 Aug 2007 - Main.dbsears)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 136 to 136
         And here's a build driver script for building MIDP:
        Changed:
        <
        <
        add stuff here
        >
        >
        #!/bin/sh

        export TOP_DIR=`cygpath "C:/mr2/windows/source"`

        make CVM_HOST_TOOLS_PREFIX=/usr/bin/ CVM_JAVA_TOOLS_PREFIX=`cygpath "C:/j2sdk1.4.2_15/bin/"` JDK_HOME=`cygpath "C:/j2sdk1.4.2_15"` J2ME_CLASSLIB=foundation USE_VERBOSE_MAKE=true USE_VS2005=true CVM_COMPILER_INCOMPATIBLE=false CVM_BUILD_SUBDIR=true CVM_BUILD_SUBDIR_NAME=phoneme-advanced CVM_JIT=true CVM_OPTIMIZED=true CVM_PRELOAD_LIB=true CVM_SYMBOLS=true TOOLS_DIR="$TOP_DIR"/tools ABSTRACTIONS_DIR="$TOP_DIR"/abstractions PCSL_DIR="$TOP_DIR"/pcsl USE_JPEG=true JPEG_DIR="$TOP_DIR"/jpeg USE_MIDP=true MIDP_DIR="$TOP_DIR"/midp CVM_INCLUDE_JAVACALL=false

         
        Added:
        >
        >
        Note that MIDP is built on top of the functionality of Foundation Profile. For graphics functionality, the LCDUI implementation is based directly on the Windows Mobile graphics layer.
         

        Using the Windows Mobile Emulator to Test the Executable

        After the build process successfully finishes, the CDC Java runtime environment


         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (5 - 09 Aug 2007 - Main.dbsears)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 150 to 150
         is to install the Java runtime environment within the emulator environment. While it is possible to use ActiveSync? to do this, it is easier to use a shared folder.
        Changed:
        <
        <
        1. Create a Windows directory named "Storage Card" and copy the appropriate CDC files into that directory.

        1. Launch dvcemumanager.exe, the device emulator.
        >
        >
        1. Create a Windows directory named "Storage Card" and copy the appropriate CDC files into that directory. This should include the bin and lib directories and the testclasses.zip archive file.

        2. Launch dvcemumanager.exe, the Microsoft Device Emulator.
          By default, it is located in C:/Program Files/Microsoft Device Emulator/1.0.
        Changed:
        <
        <
        >
        >

        1. Select the Windows Mobile 5.0 Pocket PC device emulator.

         On the emulator screen choose File->Configure. The Emulator Properties dialog displays.
        Added:
        >
        >

      34.  Under the Shared folder: edit box, select the 'Storage Card' directory you created.
        Added:
        >
        >

      35.  Click on the 'OK' button.
        Deleted:
        <
        <
         The folder is now shared.
        Changed:
        <
        <
        Next in Windows, create a .lnk file in the Storage Card directory you just shared with the emulator to launch the CDC Java runtime environment. The paths in the .lnk file need to be relative to the Storage Card root. For example, to launch cvm:
        >
        >

      36. Two files are needed in addition to the CDC Java runtime environment executable files.

        • A .lnk file launches the CDC Java runtime environment. Note that paths used in the .lnk file must be relative to the Storage Card root.

        • An args.txt to contain the arguments for cvm.exe.

        For example, here is the basic test.lnk file to launch cvm:

      37.  
        Deleted:
        <
        <
        01#"\Storage Card\bin\cvm.exe" -Djava.class.path="\Storage Card" FontTest?

        (NOTE:Make sure you do NOT use a drive letter prefix such as "C:\..." for the pathname of cvm.exe. There are NO drive letters on Windows Mobile, only a leading back slash "\" to indicate starting from the toplevel of the Windows Mobile Device )

        In the emulator, mount the build directory as a shared folder, use the File Explorer to navigate to the storage card, and click on the .lnk file.

        * 255 character limit for .lnk files

        NOTE: The limit for command line length in a .lnk file is 255 characters. If you need more than this, use the following in your link file:

         01#"\Storage Card\bin\cvm.exe" -f "\Storage Card\args.txt"
        Changed:
        <
        <
        (NOTE:Make sure you do NOT use a drive letter prefix such as "C:\..." for the pathname of cvm.exe. There are NO drive letters on Windows Mobile, only a leading back slash "\" to indicate starting from the toplevel of the Windows Mobile Device )

        and create a file called args.txt. Put your command line arguments in this file. Here is an example of the formatting. Note that arguments with spaces need to be enclosed in double quotes.

        -Xmx2m "-Dsun.midp.home.path=/Storage Card/midp/midp_wince" "-Dcom.sun.midp.main Class.name=com.sun.midp.main.CdcMIDletSuiteLoader" "-Xopt:stdioPrefix=\\My Documents" sun.misc.MIDPLauncher -suitepath "/Storage Card/HelloWorld.jar" "-1" "HelloWorld"

        * Using option to add prefix to stdio:

        "-Xopt:stdioPrefix=\\" Ex. "-Xopt:stdioPrefix=\\My Documents"

        * You will also need to apply the following delta (this gets rid of the Could not read entire "-f" file error)

        cdc/src/win32/bin/java_md.c on line 65, change

        * fd = fopen(filename, "r"); to * fd = fopen(filename, "rb");

        * Create the following files in the root "\" or "\Storage Card" directory:

        OUT.txt ERR.txt IN.txt

        * Using the console

        Use ccregedt.exe (in the CE Remote Tools directory, usually installed under Program Files) change the initial windows mobile registry settings. Change the HKEY_LOCAL_MACHINE/Drivers/Console/OutputTo to 0 to allow cvm to write to OUT/ERR files. This registry setting defaults to a non zero value which means "disallow" - the cvm won't be able to write any console output to the ERR/OUT files.

        If you want to open a console (to see console output on the fly), from the emulator, choose File->configure. In the peripherals tab, you'll see a checkbox for "Create text console window for serial port 1". Check this. It will open a console window and you'll be able to see the vm output (and other output as well). Note that this only works with version 2 of the wm5 emulator (downloaded with the link earlier on this page) - this checkbox will not be enabled with the version of the emulator that comes with the sdk download.

        * Possible crash

        If you see a crash like this:

        OEMIoControl?: Unsupported Code 0x1010058 - device 0x0101 func 22 OEMIoControl?: Unsupported Code 0x1010058 - device 0x0101 func 22 CertVerify?: \Storage Card\bin\cvm.exe trust = 2 OEMIoControl?: Unsupported Code 0x1010058 - device 0x0101 func 22 CertVerify?: \Storage Card\bin\cvmi.dll trust = 2 OEMIoControl?: Unsupported Code 0x1010058 - device 0x0101 func 22 CertVerify?: \Storage Card\bin\cvm.exe trust = 2 Data Abort: Thread=96b7674c Proc=814c7100 'cvm.exe' AKY=00010001 PC=00f33504(cvmi.dll+0x00013504) RA=00f419a8(cvmi.dll+0x000219a8) B VA=220001fc FSR=00000407

        Do a soft-reset of the emulator.

        * COMMAND LINE (In MS Visual Studio 2005, enter this line to the project setting [shortcut: Alt-F9] and then run the project)

        -Xmx1m -Dsun.midp.home.path=/"Storage Card/midp/midp_wince" \ -Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMIDletSuiteLoader \ sun.misc.MIDPLauncher -suitepath /"Storage Card/JBenchmark2.jar" -1 \ JBenchmark2.JBenchmark2

        >
        >

        The args.txt file contains the following:

        -Djava.class.path="\Storage Card\testclasses.zip" Test
        

      38. Navigate to the File Explorer application and select the Storage Card.

      39. Launch the Test application.
      40.  \ No newline at end of file

         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (4 - 09 Aug 2007 - Main.dbsears)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 140 to 139
         add stuff here
        Changed:
        <
        <

        Testing the Executable

        >
        >

        Using the Windows Mobile Emulator to Test the Executable

        After the build process successfully finishes, the CDC Java runtime environment is available as runtime executable located in a few target directories, most importantly the bin and lib directories. The Microsoft Device Emulator can be used to test the CDC Java runtime environment.

        The first task with using the device emulator is to install the Java runtime environment within the emulator environment. While it is possible to use ActiveSync? to do this, it is easier to use a shared folder.

        1. Create a Windows directory named "Storage Card" and copy the appropriate CDC files into that directory.

        1. Launch dvcemumanager.exe, the device emulator. By default, it is located in C:/Program Files/Microsoft Device Emulator/1.0.

        On the emulator screen choose File->Configure. The Emulator Properties dialog displays. Under the Shared folder: edit box, select the 'Storage Card' directory you created. Click on the 'OK' button.

        The folder is now shared.

        Next in Windows, create a .lnk file in the Storage Card directory you just shared with the emulator to launch the CDC Java runtime environment. The paths in the .lnk file need to be relative to the Storage Card root. For example, to launch cvm:

        01#"\Storage Card\bin\cvm.exe" -Djava.class.path="\Storage Card" FontTest
        

        (NOTE:Make sure you do NOT use a drive letter prefix such as "C:\..." for the pathname of cvm.exe. There are NO drive letters on Windows Mobile, only a leading back slash "\" to indicate starting from the toplevel of the Windows Mobile Device )

        In the emulator, mount the build directory as a shared folder, use the File Explorer to navigate to the storage card, and click on the .lnk file.

        * 255 character limit for .lnk files

        NOTE: The limit for command line length in a .lnk file is 255 characters. If you need more than this, use the following in your link file:

        01#"\Storage Card\bin\cvm.exe" -f "\Storage Card\args.txt" (NOTE:Make sure you do NOT use a drive letter prefix such as "C:\..." for the pathname of cvm.exe. There are NO drive letters on Windows Mobile, only a leading back slash "\" to indicate starting from the toplevel of the Windows Mobile Device )

        and create a file called args.txt. Put your command line arguments in this file. Here is an example of the formatting. Note that arguments with spaces need to be enclosed in double quotes.

        -Xmx2m "-Dsun.midp.home.path=/Storage Card/midp/midp_wince" "-Dcom.sun.midp.main Class.name=com.sun.midp.main.CdcMIDletSuiteLoader" "-Xopt:stdioPrefix=\\My Documents" sun.misc.MIDPLauncher -suitepath "/Storage Card/HelloWorld.jar" "-1" "HelloWorld"

        * Using option to add prefix to stdio:

        "-Xopt:stdioPrefix=\\" Ex. "-Xopt:stdioPrefix=\\My Documents"

        * You will also need to apply the following delta (this gets rid of the Could not read entire "-f" file error)

        cdc/src/win32/bin/java_md.c on line 65, change

        * fd = fopen(filename, "r"); to * fd = fopen(filename, "rb");

        * Create the following files in the root "\" or "\Storage Card" directory:

        OUT.txt ERR.txt IN.txt

        * Using the console

        Use ccregedt.exe (in the CE Remote Tools directory, usually installed under Program Files) change the initial windows mobile registry settings. Change the HKEY_LOCAL_MACHINE/Drivers/Console/OutputTo to 0 to allow cvm to write to OUT/ERR files. This registry setting defaults to a non zero value which means "disallow" - the cvm won't be able to write any console output to the ERR/OUT files.

        If you want to open a console (to see console output on the fly), from the emulator, choose File->configure. In the peripherals tab, you'll see a checkbox for "Create text console window for serial port 1". Check this. It will open a console window and you'll be able to see the vm output (and other output as well). Note that this only works with version 2 of the wm5 emulator (downloaded with the link earlier on this page) - this checkbox will not be enabled with the version of the emulator that comes with the sdk download.

        * Possible crash

        If you see a crash like this:

        OEMIoControl?: Unsupported Code 0x1010058 - device 0x0101 func 22 OEMIoControl?: Unsupported Code 0x1010058 - device 0x0101 func 22 CertVerify?: \Storage Card\bin\cvm.exe trust = 2 OEMIoControl?: Unsupported Code 0x1010058 - device 0x0101 func 22 CertVerify?: \Storage Card\bin\cvmi.dll trust = 2 OEMIoControl?: Unsupported Code 0x1010058 - device 0x0101 func 22 CertVerify?: \Storage Card\bin\cvm.exe trust = 2 Data Abort: Thread=96b7674c Proc=814c7100 'cvm.exe' AKY=00010001 PC=00f33504(cvmi.dll+0x00013504) RA=00f419a8(cvmi.dll+0x000219a8) B VA=220001fc FSR=00000407

        Do a soft-reset of the emulator.

        * COMMAND LINE (In MS Visual Studio 2005, enter this line to the project setting [shortcut: Alt-F9] and then run the project)

         
        Changed:
        <
        <
        After the build process successfully finishes, the Java runtime environment is available as runtime executable located in a few directories.
        >
        >
        -Xmx1m -Dsun.midp.home.path=/"Storage Card/midp/midp_wince" \ -Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMIDletSuiteLoader \ sun.misc.MIDPLauncher -suitepath /"Storage Card/JBenchmark2.jar" -1 \ JBenchmark2.JBenchmark2

         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (3 - 08 Aug 2007 - Main.dbsears)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"

        CDC Build System: Windows Mobile

        Line: 42 to 42
          Visual Studio 2005 SP1
        Added:
        >
        >
         
        Line: 73 to 75
         It may be necessary to change the definitions of some of these locations.
        Changed:
        <
        <
        add stuff here
        >
        >
        #!/bin/bash

        # # Set this path for Visual Studio # VSROOT="C:/Program Files/Microsoft Visual Studio 8"

        # # Set this path for Windows Mobile 5.0 Pocket PC SDK # WMROOT="C:/Program Files/Windows CE Tools/wce500/Windows Mobile 5.0 Pocket PC SDK"

        export VS2005_CE_ARM_LIB="$WMROOT/Lib/ARMV4I" export VS2005_CE_ARM_INCLUDE="$WMROOT/Include/Armv4i" export VS2005_CE_ARM_PATH="$VSROOT/VC/ce/bin/x86_arm" export VS2005_COMMON_PATH="$VSROOT/VC/bin"

        VSROOT2=`cygpath "$VSROOT"` export VS8_DIR="$VSROOT2"

        export PATH=$VSROOT2/VC/ce/bin/x86_arm:$VSROOT2/VC/bin:$VSROOT2/Common7/Tools/Bin:$VSROOT2/Common7/IDE:$VSROOT2/Common7/Tools:$PATH

         After modifying this script it can be invoked as follows:
        Line: 85 to 107
         Next, we'll need a driver script to run the build process. The following script builds a basic Foundation Profile target:
        Changed:
        <
        <
        add stuff here
        >
        >
        #!/bin/sh

        export TOP_DIR=`cygpath "C:/mr2/windows/source"`

        make CVM_HOST_TOOLS_PREFIX=/usr/bin/ CVM_JAVA_TOOLS_PREFIX=`cygpath "C:/j2sdk1.4.2_15/bin/"` JDK_HOME=`cygpath "C:/j2sdk1.4.2_15"` J2ME_CLASSLIB=foundation USE_VERBOSE_MAKE=true USE_VS2005=true CVM_COMPILER_INCOMPATIBLE=false CVM_BUILD_SUBDIR=true CVM_BUILD_SUBDIR_NAME=phoneme-advanced CVM_JIT=true CVM_OPTIMIZED=true CVM_PRELOAD_LIB=true CVM_SYMBOLS=true TOOLS_DIR="$TOP_DIR"/tools

         

        After modifying this script it can be invoked as follows:

        Line: 94 to 134
         $ sh < build-fp.sh >& err &
        Changed:
        <
        <
        Here's a build driver script for building MIDP:
        >
        >
        And here's a build driver script for building MIDP:
         
        add stuff here
        
        Added:
        >
        >

        Testing the Executable

        After the build process successfully finishes, the Java runtime environment is available as runtime executable located in a few directories.


         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (2 - 08 Aug 2007 - Main.dbsears)
        Line: 1 to 1
         
        META TOPICPARENT name="PhoneMEAdvanced"
        Deleted:
        <
        <
        Windows Mobile
         \ No newline at end of file
        Added:
        >
        >

        CDC Build System: Windows Mobile

        Building a CDC Java runtime environment for Windows Mobile requires integration of the CDC build system with conventional Windows Visual Studio developer tools.

        The following sections show how to setup the CDC build system on a Windows XP host platform, and then build different versions of the CDC Java runtime environment that will also run on a Windows Mobile/Pocket PC device or emulator.

        Required Developer Tools

        To use the CDC build system on a Windows XP host requires three sets of developer tools:

        Getting the Project Source Code

        After installing and updating the required developer tools for the CDC build system, you can get the project source code by either downloading the project source code bundle (appropriate for evaluation purposes) or checking out the project source code from the repository.

        These procedures are described in Getting the Project Source Code. Both the svn and wget are available through the Cygwin package management system.

        Build System Setup

        With the required developer tools and project source code in place, the next step is to define a set of environment variables that describe the location of the various developer tools.

        Here is a template for an environment setup script named win-setup.sh based on the default installation for the various developer tools. It's best to keep this setup script in the target build directory for Windows Mobile: cdc/build/win32-arm-wm5. It may be necessary to change the definitions of some of these locations.

        add stuff here
        

        After modifying this script it can be invoked as follows:

        $ . win-setup.sh
        

        Next, we'll need a driver script to run the build process. The following script builds a basic Foundation Profile target:

        add stuff here
        

        After modifying this script it can be invoked as follows:

        $ sh < build-fp.sh >& err &
        

        Here's a build driver script for building MIDP:

        add stuff here
        

         <<O>>  Difference Topic PhoneMEAdvancedGSGWinMobile (1 - 08 Aug 2007 - Main.dbsears)
        Line: 1 to 1
        Added:
        >
        >
        META TOPICPARENT name="PhoneMEAdvanced"
        Windows Mobile

        Topic PhoneMEAdvancedGSGWinMobile . { View | Diffs r32 < r31 < r30 < r29 | More }
         XML java.net RSS