PocketPC CAB File Howto

From ConShell
Jump to navigation Jump to search

CAB files are compressed files that windows uses to install programs and drivers. This document deals with the creating Cab files for Pocket PC files. Its still a work in progress.

Pocket PC Cab File Considerations

The PocketPC platform refers to several operating systems and several different versions of the operating systems. As such a cab file can be designed to hold different binaries for different platforms. I tend to ignore this feature being .NET assemblies run on any given PocketPC if the the appropriate version of the Compact framework installed. It should be noted that not all PocketPC CPU types support the .NET Compact Framework version 2.0. I'm working on

Procedure

This section explains how to write an INF file and use it to create a cab file.

The .inf file

The cab file is created via instructions placed in an inf file.

[Version]
Signature = "$Windows NT$"
Provider = "Microsoft"
CESignature = "$Windows CE$"


[CEStrings]
AppName = "ACME Mobile"
InstallDir = %CE1%\ZippySoft


[CEDevice]
UnsupportedPlatforms = "HPC","Jupiter","Smartphone"


[SourceDisksNames]
1=,,,.\binCFv1\Release


[SourceDisksFiles]
AcmeMobileCFv1.exe=1
App.config=1
CeDba.dll=1



[DestinationDirs]
Files.App=1,%INSTALLDIR%
DefaultDestDir=1,%INSTALLDIR%
Links=0,%CE11%
StartUp=0,%CE4%


[DefaultInstall]
CopyFiles=Files.App
CEShortcuts=Links,Startup


[Files.App]
"AcmeMobileCFv1.exe",AcmeMobileCFv1.exe,,0x20000001
"App.config",App.config,,0x20000001
"CeDba.dll",CeDbNet.dll,,0x20000001


[Links]
"ACME Mobile",0,AccessTrackerMobileCFv1.exe


[StartUp]
"ACME Mobile",0,AccessTrackerMobileCFv1.exe

cabwiz.exe

The tool for making Pocket PC CAB files is cabwiz.exe. It is a command line tool that comes with ["http://www.microsoft.com/downloads/details.aspx?FamilyID=f663bf48-31ee-4cbe-aac5-0affd5fb27dd&DisplayLang=en Microsoft Embedded Visual Tools]. It takes an INF file, gathers all the requested source files, and outputs a cabfile. It probably lives in C:\Program Files\Microsoft eMbedded Tools\EVB. It required sever other files in that directory to be in the working directory so don't bother adding that folder to your path. Just cd to that folder and run cabwiz.exe from there. T

c:
cd \Program Files\Microsoft eMbedded Tools\EVB
cabwiz "c:\src\ACME Data\AcmeMobile.inf"

External Links

Information on the Windows CE CAB format
  • <a
  • An example CAB file for .NET