Creating an Application Installation Package

Microsoft Corporation

1999

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

Introduction

The Application Installation (AppInstall) mechanism is used to install Windows CE–based applications on a Windows CE–based device. 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:

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]                   ; for H/PC with SH3 processor
ProcessorType = 10003                ; SH3 processor value 
UnsupportedPlatforms = Palm PC,Jupiter
                                     ; will not install on PPC or
                                     ; H/PC with Pro Edition software

[CEDevice.PPC_MIPS]                  ; for PPC with MIPS processor
ProcessorType = 4000                 ; processor value for MIPS R3900
UnsupportedPlatforms = HPC,Jupiter   
                                     ; will not install on H/PC or 
                                     ; H/PC with Pro Edition software 

[CEDevice.HPCPRO_ARM]                ; for H/PC Pro Edition software and 
                                     ; StrongARM processor
ProcessorType   = 2577               ; processor value for ARM
UnsupportedPlatforms = Palm PC,HPC   
                                     ; will not install on PPC 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 PPC 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:

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—the .exe and .dll files—is located in the various platform-specific directories (for example, .\HPC\SH3) and is 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:

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 CeAppMgr .ini version, not 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 PPC on the 2.1 version of Windows CE
;
[CEDevice.PPC_BW_SH3]   ; for PPC black-and-white devices with 
                        ; SH3 processor
ProcessorType   = 10003
UnsupportedPlatforms = HPC,Jupiter
VersionMin = 2.1        ; Windows CE v. 2.1 is for black-and-white PPC VersionMax = 2.1

[CEDevice.PPC_BW_MIPS]   ; for black-and-white PPC devices with MIPS                            ; processor
ProcessorType   = 4000
UnsupportedPlatforms = HPC,Jupiter
VersionMin = 2.1        ; Windows CE v. 2.1 is for black-and-white PPC 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 PPC on the 2.11 version of the Windows CE
;
[CEDevice.PPC_CLR_SH3]   ; for PPC color devices with SH3 processor
ProcessorType   = 10003
UnsupportedPlatforms = HPC,Jupiter
VersionMin = 2.11        ; Windows CE OS v. 2.11 is for PPC color devices 
VersionMax = 2.11

[CEDevice.PPC_CLR_MIPS]  ; for PPC color devices with MIPS processor
ProcessorType   = 4000
UnsupportedPlatforms = HPC,Jupiter
VersionMin = 2.11        ; Windows CE OS v. 2.11 for PPC color devices      
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:

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:

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

For More Information

For the latest information about Windows CE, see the Windows CE Web site at: http://www.microsoft.com/windowsce/.

--------------------------------------------

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.

Microsoft, Win32, Windows, and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

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