Technology Brief>
Creating an Application Installation Package |
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.
1999 Microsoft Corporation. All rights reserved.
Microsoft, Win32, Windows, and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. 12412n134m
Other product and company names mentioned herein may be the trademarks of their respective owners.
Application Installation (AppInstall) is used to install a Windows® CE-based application onto a Windows CE-based device. This paper discusses AppInstall and is specifically targeted to creating a setup program that supports multiple devices
Application Installation (AppInstall) is the mechanism used to install Windows CE-based applications onto 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 is comprised of 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® ActiveSync component that provides a desktop-to-device application management tool. It is responsible for adding and removing applications on the Windows CE-based device and deleting the application files from the desktop computer. Application Manager is used by both the application developer and the end user and is included with every installation of ActiveSync.
WCELoad is the Windows CE tool that unpacks a Windows CE .cab file to install an application on a device. WCELoad is used by the end user and is included with most Windows CE-based devices.
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.
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, with each .cab file supporting 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. This information is used by the Application Manager 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 main section that differentiates the platforms is the CEDevice section, which allows for device-specific information, namely, the processor type, the device types-Handheld PC or Palm-size PC-supported, and the Windows CE version supported. These platform labels also need to be specified in the command-line parameters when invoking CabWiz.
Here is an example from a CabWiz .inf file that supports multiple platforms. This example only displays the CEDevice and SourceDisksNames sections.
[CEDevice.HPC_SH3] ; targeted to the H/PC with the SH3 processor
ProcessorType = 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 above 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 directory identifier of 1. The source directory for the device-specific files (the .exe and .dll files) are located in the various platform-specific directories (.\hpc\sh3 for example), and are referenced with a directory identifier of 2.
CabWiz needs to be invoked with the appropriate platform
labels, for example,
Cabwiz.exe "<INF_path>\MyApp.INF" /cpu HPC_SH3 PPC_MIPS HPCPRO_ARM.
This 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. Here is an example of 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, so that the end user can download the application on the next connection.
<path>\CEAppMgr.exe "<INI_path>\MyApp.INI"
For the latest information about Windows CE, see the Windows CE Web site at https://www.microsoft.com/windowsce/.
|