D
den
Help. Is there a list somewhere that matches which cab to install on a
device by processor type?
Thanks.
Dennis
device by processor type?
Thanks.
Dennis
{iDevOSMajorVersion2))
Neville Lang said:Glyn,
I chose to distribute my Pocket PC apps only on CD (at this stage at
least)
since the image size is nearly 50Mb. This figure includes not only my app
itself but also the redists. for the Compact Framework v1.0 SP2, the Full
Framework 1.1 and ActiveSync v3.7.1.
My apps are targeted at the general public and so I need to be able to
install on any Windows desktop computer that has Win98 or later. Some
Win98
and Win ME computers do not have the full framework nor do some of the
older
Pocket PCs have the Compact Framework installed. Hence, the need to check
for these and install them if needed. I chose to supply them on my CD
since
we have some customers that are still not connected to the Internet and
would therefore have trouble accessing these items. I have also found in
practice that some earlier Pocket PCs were shipping with ActiveSync v3.7
and
we had some problems with comms. with the PPC right from the start. So, I
ship the ActiveSync v3.7.1 and check for that as well. I have tried to be
as
comprehensice as possible during installation, to cover all bases for our
customers.
The installation of my apps. is based on the Windows Installer technology
and I have setup VS .NET 2003 to generate the MSI file that ships. I do
not
use InstallShield or Wise, just control the generation of the final MSI
file
from VS .NET 2003 with some VBS scripting changes. It is the Custom
Installer that controls the virtually whole installation for both the
desktop programs and the Pocket PC programs, all from the CD and desktop
computer. I check if the full Framework is installed on the desktop
computer
and if not, I use the redist from my CD. I do the same for the Compact
Framework and the ActiveSync version. If any of these need installing then
my installer does it form my CD.
Finally, when all this preliminary work is out of the way, I then check
the
operating system on the Pocket PC from the Custom Installer program on the
desktop computer to decide if I should install the ARM or ARMV4 cab from
my
CD.
Here is a code snippet:
//=== DEVICE SIDE INSTALLATION ==========================
//--- Get the Operating System Version ------------------
RAPI.CEOSVERSIONINFO DeviceOS = new RAPI.CEOSVERSIONINFO();
int iRet = RAPI.CeGetVersionEx(out DeviceOS);
if (iRet == 0)
{
HandleErrors(2);
return false;
}
// Check if the Device's operating system is within OS range i.e. Pocket
PC
2002 (WinCE 3.0) or
// Windows Mobile 2003 (WinCE 4.2) or later
if ((DeviceOS.dwMajorVersion == iDevOSMajorVersion2 &&
DeviceOS.dwMinorVersion >= iDevOSMinorVersion2) ||
(DeviceOS.dwMajorVersion{iDevOSMajorVersion2))
iOS = 2; // Set OS flag
}
else if (DeviceOS.dwMajorVersion == iDevOSMajorVersion1)
{
iOS = 1; // Set OS flag
}
else
{
HandleErrors(3);
return false;
}
...
...
...
The RAPI.CEOSVERSIONINFO is a structure in my RAPI Class, as follows:
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
public struct CEOSVERSIONINFO
{
public uint dwOSVersionInfoSize;
public uint dwMajorVersion;
public uint dwMinorVersion;
public uint dwBuildNumber;
public uint dwPlatformId;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=128)]
public string szCSDVersion;
}
and here is the call for CeGetVersionEx() in my RAPI Class.
[DllImport("rapi.dll", CharSet=CharSet.Unicode)]
public static extern int CeGetVersionEx([MarshalAs(UnmanagedType.Struct)]
out CEOSVERSIONINFO lpVersionInformation);
I hope this helps you.
Regards,
Neville Lang
Glyn Meek said:GREAT answer Neville, but it now begs the next one which is
..."How do you detect which OS is running during an installation, and how
can you differentiate between which CAB to load"? either you have a much
more sophisticated install routine/tools than we have access to, or (which
is probably much more likely!!) we are way too dumb to figure this one out!!
Glyn