[CABWiz.exe] .inf file for PPC 2000, 2002 and 2003 CAB - all-in-one impossible?

G

Gary

Hi,

I am trying to make up a single CAB setup .inf file for Pocket PC
2000, Pocket PC 2002, and Pocket PC 2003. Unfortunately, I can't
figure out how to make sure that the right (native) version gets
downloaded to the right device.

1. Telling PPC2000 from all other devices is easy:

[CEDevice.pocket.arm]
ProcessorType = 2577
UnsupportedPlatforms = "HPC","Jupiter","PocketPC"
VersionMin = 2.99 ; version 3.0
VersionMax = 3.98

The "PocketPC" in "UnsupportedPlatforms" takes care of things.

2. PPC2002 and PPC2003 both have the platform string: "PocketPC" (not
"Pocket<space>PC" as incorrectly /I think?/ listed in the help file
for EVC), so UnsupportedPlatforms will not help here. Moreover, the
PPC2003 platform seems to ignore VersionMax (as stated in the docs).

Thus, the following CAB setup:

;
; PPC2002 platform
;
[CEDevice.ppc2002.arm]
ProcessorType = 2577
UnsupportedPlatforms = "HPC","Jupiter"
VersionMin = 2.99 ; version 3.0
VersionMax = 3.98 ; Pocket PC 2003 no longer checks VersionMax
;
; PPC2003 platform
;
[CEDevice.ppc2003.armv4]
ProcessorType = 2577
UnsupportedPlatforms = "HPC","Jupiter"
VersionMin = 3.99 ; version 4.2
VersionMax = 4.99 ; Pocket PC 2003 no longer checks VersionMax

does NOT make a distinction between PPC2002 and PPC2003. PPC2003
version will not get loaded onto a PPC2002 device (VersionMin = 3.99),
but PPC2002 version MIGHT get loaded onto a PPC2003 device (VersionMin
= 2.99 matches, of course).

Documentation mentions the new PlatformMin and PlatformMax, but as far
as I tested, those get ignored altogether and make no difference in
the platform identification above. Docs mention a sample with
PlatformMax in the SDK, but, unfortunately, can't find it anywhere
(dumb me?).

Any ideas?

Gabe
 
G

Gary

Hi everyone,

I think I just solved the problem, so I am posting this here in case
others run into it as well. I might be a dumbass ;), but I could not
find any clear explanation of this in any version of Windows
CE/Windows Mobile documentation set.

Problem:

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

I am trying to make up a single CAB setup .inf file for Pocket PC
2000, Pocket PC 2002, and Pocket PC 2003. Unfortunately, I can't
figure out how to make sure that the right (native) version gets
downloaded to the right device.

Since Pocket PC 2003 no longer checks VersionMax, it does NOT make a
distinction between PPC2002 and PPC2003. PPC2003 version will not get
loaded onto a PPC2002 device (VersionMin = 3.99), but PPC2002 version
MIGHT get loaded onto a PPC2003 device (VersionMin = 2.99 matches, of
course).

Documentation mentions the new PlatformMin and PlatformMax, but as far
as I tested, those get ignored altogether and make no difference in
the platform identification above. Docs mention a sample with
PlatformMax in the SDK, but, unfortunately, can't find it anywhere
(dumb me?).

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

Solution:

1. Make sure to use the latest and greatest cabwiz.exe, makecab.exe,
and cabwiz.ddf from the .../Windows CE Tools/wce420/POCKET PC
2003/Tools (Pocket PC 2003 SDK for Embedded Visual C++ 4.0 aka .NET).

2. Execute the new cabwiz.exe, and notice that there is an extra
command line switch, /platform <platform name>. The /cpu <cpu name>
switch is also there to make things more confusing. If you mix
/platform and /cpu in one .inf file, things will not work, or work in
a pretty unexpected way.

3. Make up two independent .inf files. File A for PPC2000 and PPC2002,
and file B for PPC2003 (don't worry, we will combine the results into
one CAB set nevertheless later on).

Example of the A file (relevant sections only):

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

;
; PocketPC in UnsupportedPlatforms differentiates between PPC2000 and
PPC2002, VersionMin is really a redundant safety net ("safety .NET" ?)
;
[CEDevice.pocket.sh3]
ProcessorType = 10003
UnsupportedPlatforms = "HPC","Jupiter","PocketPC"
VersionMin = 2.99 ; version 3.0
VersionMax = 3.98

[CEDevice.pocket.mips]
ProcessorType = 4000
UnsupportedPlatforms = "HPC","Jupiter","PocketPC"
VersionMin = 2.99 ; version 3.0
VersionMax = 3.98

[CEDevice.pocket.arm]
ProcessorType = 2577
UnsupportedPlatforms = "HPC","Jupiter","PocketPC"
VersionMin = 2.99 ; version 3.0
VersionMax = 3.98
;
; this platform supports PocketPC (taken out from
UnsupportedPlatforms), so PPC2002 will evaluate this one
;
[CEDevice.ppc2002.arm]
ProcessorType = 2577
UnsupportedPlatforms = "HPC","Jupiter"
VersionMin = 2.99 ; version 3.0
VersionMax = 3.98

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

NOTE: due to some bugs with Windows CE Application Manager reported on
the newsgroups, this sample is using 2.99 cut-off instead of 3.0.

Example of the B file (relevant sections only):

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

[Platform.MS.PocketPC]
PlatformString=PocketPC
PlatformMin=3.0
PlatformMax=4.0

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

The PocketPC tag identifies PPC2003 platform. I have no clue why
PlatformMin MUST be 3.0 and PlatformMax MUST be 4.0 (since PPC2003
Windows Mobile version is 4.20). If you change this to, say, 4.0 and
5.0 (as Windows CE version would suggest) THINGS WILL STOP WORKING.
Moreover, theoretically, the criteria above should be accepted by a
PPC2002 device (since it is a PocketPC platform with a version number
between 3.0 and 4.0), but it is NOT. /cpu-type CAB file will work on
PPC2002, /platform-type CAB file will NOT work on PPC2002.

4. Process file A with the following: "cabwiz.exe A.inf /cpu
ppc2002.arm pocket.sh3 pocket.mips pocket.arm". Four CAB files will
result (three for PPC2000 and one for PPC2002).

5. Process file B with the following: "cabwiz.exe B.inf /platform
MS.PocketPC". One CAB file will result.

6. Make up a setup .ini file for Windows CE Application Manager,
called, say, deviceinstall.ini with all those CABs together, and run
it though the CE App Manager.

Example of the deviceinstall.ini file (relevant sections only):

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

[CEAppManager]
Version = 1.0
Component = SomeAppName

[SomeAppName]
Description = My App That Will One Day Buy Me All Bill's Cars
Uninstall = SomeAppName
IconFile = SomeAppName.ico
IconIndex = 0
DeviceFile = SomeAppName.exe
CabFiles = someappname.ppc2002.arm.cab,someappname.pocket.mips.cab,someappname.pocket.sh3.cab,someappname.pocket.arm.cab,someappname.MS.PocketPC.cab
;

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

I tested this with "real" multiple PPC2000, PPC2002, and PPC2003
devices, each build version having a different version tag to make
sure the right thing got loaded onto the right device. It seems to
work fine. If someone knows a better way to do this, please let me
know.

No warranty expressed, implied, or telepathically induced.

Good luck!

Gabe
 
R

r_z_aret

On 23 Jul 2003 14:08:40 -0700, (e-mail address removed) (Gary) wrote:


snip
Example of the B file (relevant sections only):

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

[Platform.MS.PocketPC]
PlatformString=PocketPC
PlatformMin=3.0
PlatformMax=4.0

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

The PocketPC tag identifies PPC2003 platform. I have no clue why
PlatformMin MUST be 3.0 and PlatformMax MUST be 4.0 (since PPC2003
Windows Mobile version is 4.20). If you change this to, say, 4.0 and
5.0 (as Windows CE version would suggest) THINGS WILL STOP WORKING.
Moreover, theoretically, the criteria above should be accepted by a
PPC2002 device (since it is a PocketPC platform with a version number
between 3.0 and 4.0), but it is NOT. /cpu-type CAB file will work on
PPC2002, /platform-type CAB file will NOT work on PPC2002.

Perhaps Palm PC covers Pocket PC (as well as Palm PC) in the
Unsupported Platform line? I just read the following, and _think_ it
supports this idea:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnce30/html/appinstall30.asp

-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

Robert E. Zaret
PenFact, Inc.
46 Beach Street
Boston, MA 02111
www.penfact.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top