Windows CE 2.1 Technical Articles  

Creating an Application Installation Package in Microsoft Windows CE 2.1

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Microsoft Corporation

June 2000

Summary:Application Installation (AppInstall) is used to install a Microsoft Windows CE–based application onto a Windows CE–based device. AppInstall is specifically targeted to creating a setup program that supports multiple devices. (8 printed pages)

Contents

Overview
Supporting Multiple Devices
Supporting Different Windows CE Versions for Palm-size PCs
Supported Processors and Devices

Overview

AppInstall supports multiple installation methods, such as desktop-to-device, web-to-device, storage card-to-device, and device-to-device.

AppInstall contains three components:

  • CAB Wizard (CabWiz) is the desktop tool that packages application binaries into a single Windows CE .cab file, which is the file format for distributing multiple files. CabWiz is used by the application developer and is part of the Windows CE software development kit (SDK).
  • Application Manager (CeAppMgr) is the desktop Microsoft Windows CE Services component that provides a desktop-to-device application management tool. Application Manager is responsible for adding and removing applications on the Windows CE–based device, and for deleting the application files from the desktop computer. Application Manager is used by both the application developer and the end user. It is included with every installation of Windows CE Services.
  • WCELoad is the Windows CE tool that unpacks a Windows CE .cab file to install an application on a device, and is included with most Windows CE–based devices. WCELoad is used by the end user.

    The Application Installation documentation is part of the Windows CE SDK Programmer's Guide. This documentation includes samples of the input file to CabWiz (the CabWiz .inf file) and the input file to CeAppMgr (the CeAppMgr .ini file).

    The CabWiz .inf file is a modified version of the Win32 .inf file format. For more information on the Win32 .inf file format, see the Win32 Platform SDK.

    This paper describes how to create a setup program that supports multiple devices and assumes knowledge of the Windows CE CabWiz .inf file format.

    Supporting Multiple Devices

    The CabWiz .inf file is the setup script file that specifies the files to copy and the registry settings to make. CabWiz uses the application developer's .inf file and the application binaries to create one or more .cab files.

    If the application is device-independent, for example, a set of help files, then a single .cab file that is device-independent can be created. If the application contains device-specific files, for example, .exe or .dll files, then multiple .cab files can be created with a single CabWiz .inf setup file. Each .cab file supports a specific device. The method to create multiple platform-specific .cab files from a single CabWiz .inf file is to use platform labels and the CEDevice key in the CabWiz .inf file.

    The platform labels tell CabWiz how many .cab files to generate, where to get the CPU-specific binary files, and the platform information to incorporate into the .cab file. The Application Manager uses this information to determine the appropriate .cab file to install on the end user's device.

    Platform labels are unique labels that are appended to specific sections in the CabWiz .inf file, for example, HPC_SH3, PPC_MIPS, or HPCPRO_ARM. The CEDevice section differentiates the platforms, which allows for device-specific information, the processor type, the device types, Handheld PC or Palm-size PC support, and the Windows CE version support. These platform labels also need to be specified in the command-line parameters when invoking CabWiz.

    The following example from a CabWiz.inf file supports multiple platforms. This example only displays the CEDevice and SourceDisksNames sections.

    [CEDevice.HPC_SH3] ; targeted to the H/PC with
    the SH3 processorProcessorType = 10003 ; processor value for SH3
    UnsupportedPlatforms = Palm PC,Jupiter ; this .cab will not install
    on Palm-size PC or H/PC with Pro Edition software
    [CEDevice.PPC_MIPS] ; targeted to Palm-size PC with the MIPS
    processor ProcessorType = 4000 ; processor value for MIPS R3900
    UnsupportedPlatforms = HPC,Jupiter ; this .cab will not install on
    H/PC or H/PC with Pro Edition software [CEDevice.HPCPRO_ARM] ;
    targeted to H/PC with Pro Edition software and the StrongARM
    processor ProcessorType = 2577 ; processor value for ARM
    UnsupportedPlatforms = Palm PC,HPC ; this .cab will not install on
    Palm-size PC or H/PC [SourceDisksNames] ; source dir for
    CPU-independent files for all created .cab files 1 = ,"common
    files",,common [SourceDisksNames.HPC_SH3] ; source dir for H/PC SH3
    files 2 = ,"HPC SH3 files",,hpc\sh3 [SourceDisksNames.PPC_MIPS] ;
    source dir for Palm-size PC MIPS files 2 = ,"PPC MIPS
    files",,ppc\mips [SourceDisksNames.HPCPRO_ARM] ; source dir for
    H/PC with Pro Edition software ARM files 2 = ,"HPCPro ARM
    files",,hpcpro\arm [SourceDisksFiles] ; help and readme MyApp.HTM =
    1 MyApp.TXT = 1 ; application binary MyApp.EXE = 2 MyApp.DLL =
    2

    In the CEDevice section, the preceding example creates three .cab files:

    • HPC_SH3.cab, for the Handheld PC using the SH3 processor.
    • PPC_MIPS.cab, for the Palm-size PC using the MIPS processor.
    • HPCPRO_ARM.cab, for the Handheld PC running Pro Edition software using the ARM processor.

      In the SourceDisksNames and SourceDisksFiles sections, the source directory for device-independent common files (such as readme or help files) is in the .\common directory and is referenced with a file identifier of 1. The source directory for the device-specific files— .exe and .dll files— located in the various platform-specific directories (for example, .\hpc\sh3) and are referenced with a directory identifier of 2.

      CabWiz must be invoked with the appropriate platform labels, for example:

      Cabwiz.exe "<INF_path>\MyApp.INF" /cpu HPC_SH3 PPC_MIPS HPCPRO_ARM.

      CabWiz creates three device-specific .cab files:

      • MyApp.HPC_SH3.cab
      • MyApp.PPC_MIPS.cab
      • MyApp.HPCPRO_ARM.cab

        With a single CabWiz .inf file, the application developer can create multiple device-specific .cab files. These .cab files can be directly downloaded to the device. For example, an end user can use Pocket Internet Explorer on a Windows CE–based device to download the appropriate .cab file and run the file on the device to install the application.

        To support a desktop installation, the application developer can use the Application Manager to automatically download the appropriate .cab file to the end user's device. The application developer can write a single desktop setup program that registers the application with AppManager by specifying all the .cab files in the CeAppMgr .ini file.

        The following example shows the CeAppMgr .ini file MyApp.ini:

        [CEAppManager] Version = 1.0 ; this is the
        CeAppMgr .ini version, not the app version Component =
        MyApplication [MyApplication] Description = Sample Windows CE
        application CabFiles =
        MyApp.HPC_SH3.cab,MyApp.PPC_SH3.cab,MyApp.HPCPRO_ARM.cab ; note
        that there are no extra spaces between the list of .cab files

        Invoking CeAppMgr with the .ini file registers the application and its associated .cab files. The end user can download the application on the next connection.

        <path>\CEAppMgr.exe
        "<INI_path>\MyApp.INI"

        Supporting Different Windows CE Versions for Palm-size PCs

        Currently, two types of Palm-size PCs are available: the black-and-white version running Windows CE version 2.1 and the color version running Windows CE version 2.11. Both devices use "Palm PC" in the code as the device type name.

        The application developer needs to write two CabWiz .inf files with different application names and create two CeAppMgr .ini files, which will appear as separate applications in the CeAppMgr user interface. However, a single desktop setup program can be used to install the two sets of applications.

        The following code, MyApp_BW.inf, is for the black-and-white Palm-size PC:

        [CEStrings] AppName = "My Sample App (b&w)" ;
        other values omitted... ; ; Black-and-white Palm-size PC on the 2.1
        version of Windows CE ; [CEDevice.PPC_BW_SH3] ; targeted to
        Palm-size PC black-and-white devices with the SH3 processor
        ProcessorType = 10003 UnsupportedPlatforms = HPC,Jupiter VersionMin
        = 2.1 ; Windows CE version for black-and-white Palm-size PC is 2.1
        VersionMax = 2.1 [CEDevice.PPC_BW_MIPS] ; targeted to
        black-and-white Palm-size PC devices with the MIPS processor
        ProcessorType = 4000 UnsupportedPlatforms = HPC,Jupiter VersionMin
        = 2.1 ; Windows CE version for black-and-white Palm-size PC is 2.1
        VersionMax = 2.1

        The following code, MyApp_CLR.inf, is for the color Palm-size PC:

        [CEStrings] AppName = "My Sample App (color)" ;
        other values omitted... ; ; Color Palm-size PC on the 2.11 version
        of the Windows CE ; [CEDevice.PPC_CLR_SH3] ; targeted to Palm-size
        PC color devices with the SH3 processor ProcessorType = 10003
        UnsupportedPlatforms = HPC,Jupiter VersionMin = 2.11 ; Windows CE
        OS version for Palm-size PC color devices is 2.11 VersionMax = 2.11
        [CEDevice.PPC_CLR_MIPS] ; targeted to Palm-size PC color devices
        with the MIPS processor ProcessorType = 4000 UnsupportedPlatforms =
        HPC,Jupiter VersionMin = 2.11 ; Windows CE OS version for Palm-size
        PC color devices is 2.11 VersionMax = 2.11

        The following code, MyApp_CLR.inf, is for the color Palm-size PC:

        [CEStrings] AppName = "My Sample App (color)" ;
        other values omitted... ; ; Color Palm-size PC on the 2.11 version
        of the Windows CE ; [CEDevice.PPC_CLR_SH3] ; targeted to Palm-size
        PC color devices with the SH3 processor ProcessorType = 10003
        UnsupportedPlatforms = HPC,Jupiter VersionMin = 2.11 ; Windows CE
        OS version for Palm-size PC color devices is 2.11 VersionMax = 2.11
        [CEDevice.PPC_CLR_MIPS] ; targeted to Palm-size PC color devices
        with the MIPS processor ProcessorType = 4000 UnsupportedPlatforms =
        HPC,Jupiter VersionMin = 2.11 ; Windows CE OS version for Palm-size
        PC color devices is 2.11 VersionMax = 2.11

        CabWiz needs to be invoked with the appropriate platform labels, for example:

        Cabwiz.exe "<INF_path>\MyApp_BW.INF" /cpu PPC_BW_SH3 PPC_BW_MIPS.

        This creates two .cab files:

        • MyApp_BW.PPC_BW_SH3.cab
        • MyApp_BW.PPC_BW_MIPS.cab

          Invoking CabWiz with the appropriate platform labels for the other .inf file:

          Cabwiz.exe "<INF_path>\MyApp_CLR.INF" /cpu PPC_CLR_SH3 PPC_CLR_MIPS creates two .cab files:
          • MyApp_CLR.PPC_CLR_SH3.cab
          • MyApp_CLR.PPC_CLR_MIPS.cab

            Each set of files requires its own CeAppMgr .ini file, as follows:

            MyApp_BW.ini:

            [CEAppManager] Version = 1.0 Component =
            MyApplication [MyApplication] Description = Sample Windows CE
            application (black and white) CabFiles =
            MyApp_BW.PPC_BW_SH3.cab,MyApp_BW.PPC_BW_MIPS.cab

            MyApp_CLR.ini:

            [CEAppManager] Version = 1.0 Component =
            MyApplication [MyApplication] Description = Sample Windows CE
            application (color) CabFiles =
            MyApp_CLR.PPC_CLR_SH3.cab,MyApp_CLR.PPC_CLR_MIPS.cab

            The application developer can then write a single desktop setup program to register both the black-and-white and color versions with a single CeAppMgr call.

            <path>\CEAppMgr.exe
            "<INI_path>\MyApp_BW.ini"
            "<INI_path>\MyApp_CLR.ini"

            Supported Processors and Devices

            The following processors are currently available in Windows CE devices:

            Processor name Processor type value (to use in the CabWiz .inf file)
            SH3 10003
            MIPS 4000
            ARM 2577
            Note    For MIPS processors, use the R3900 binaries, which can run on all MIPS R3xxx and R4xxx processors, in the .cab file.

            The following platform names and Windows CE version numbers are currently used in Windows CE–based devices.

            Device Name Platform Name (used in CabWiz .inf file) Windows CE Version (used in CabWiz .inf file)
            Handheld PC running Windows CE 1.0 Not supported by AppInstall. Use PPCLoad version 1.
            Handheld PC running Windows CE 2.0 "HPC" 2.0
            Handheld PC running Microsoft Windows CE, Handheld PC Professional Edition, version 3.0 "Jupiter" 2.11
            Palm-size PC - Black & White "Palm PC" 2.1
            Palm-size PC - Color "Palm PC" 2.11

            The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication. This document is for informational purposes only.

            This White Paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT.

            Java is a trademark of Sun Microsystems, Inc.

            Other product and company names mentioned herein may be the trademarks of their respective owners.