Tech Note 30:
|
Creating a proper installation procedure for Windows CE devices is not a simple task. NS Basic/CE programs need to use the some installation procedures as other applications. In this document, we'll try to make it as easy as possible for you.
It's easiest to use the installers that come with NS Basic, such as Runtime.ppc.exe. If you don't want to do this, you'll have to make your own.
The steps to creating an installer are as follows:
Use of these installer tools is subject to Microsoft's licence agreements. You can read the licence agreement and Microsoft's FAQ on the subject.
Here's a link with some additional explanation, by Ian Ferguson.
The installer files are in a folder named \installer the NS Basic/CE Release CD. After installing them on a device, you can copy them back onto your system into a directory that will be accessed by your installer.
The .inf file contains the information about the files to be installed on your CE device. It contains the pathnames where the files are to be found on your desktop, and where the files should be places on your CE device. Constructing this file properly is the most complex part of creating your installer.
You can look at a sample .inf file here. These can get pretty long and complicated!
Other resources:
The .ini file describes which CAB files are to be included in the installer. Here is a sample .ini file to create an installer for an add on control for NS Basic/CE:
[CEAppManager] Version = 1.0 Component = DialogX [DialogX] Description = DialogX CabFiles =DialogX.HPCPRO_ARM.cab,DialogX.HPCPRO_MIPS.cab,DialogX.HPCPRO_SH3.cab,DialogX.HPCPRO_SH4.cab,DialogX.HPC_MIPS.cab,DialogX.HPC_SH3.cab,DialogX.PPC_MIPS.cab,DialogX.PPC_SH3.cab
Cabwiz.exe is a program supplied by Microsoft. You can download it as part of eMbedded Visual Basic. It reads your .ini file and outputs one or more .CAB files. A CAB file is produced for each platform (HPC, HPC/Pro or PPC) and CPU type that you plan to support.
Here is a sample script to start Cabwiz.exe. Save this as a .bat file so you don't have to type it all in each time.
del *.CAB "D:\Program Files\Microsoft Visual Studio\vb98\vbce\cabwiz.exe" "E:\210\DialogX\DialogX.inf" /err err.log /cpu HPC_SH3 HPC_MIPS HPCPro_ARM HPCPro_SH3 HPCPro_SH4 HPCPro_MIPS PPC_SH3 PPC_MIPS
EZSetup.exe is a handy utility from Scott Ludwig. It uses you .ini file to get the list of .CAB files that Cabwiz.exe produced and makes a single compressed file out of them. EZSetup.exe is in the same folder as CabWiz.exe. EZSetup only works with Windows NT, 2000 at XP.
If you have an older version of Windows, you can do this step using the tools in eVB. Franco Epifani has notes on using this on his website at http://www.efsoft.it.
Here is a sample script to start EZSetup. Save this as a .bat file so you don't have to type it all in each time. You can combine this with the Cabwiz .bat file to build your installer with a single command.
del *.DAT d:\apps\ezsetup -i DialogX.ini -r DialogXReadme.txt -e e:\210\all\license.txt -o DialogX.exe del *.CAB
Your installer is now complete. When you click on a file produced by EZSetup, the CEAppMgr.exe program is invoked to copy the files to your Windows CE device. You will recognise this program: it's the standard application installer.
If you'd like to do this automatically from your .bat file, use this command:
"C:\Program Files\Microsoft ActiveSync\CEAppMgr.exe" "E:\210\DialogX\DialogX.INI"
I first bought WinCE CAB Manager from http://www.ocpsoftware.com/products.php?nm=cecabmgr It cost me $150, but it was cheap for me if considering analyzing the inf file.
It can be useful to get the CAB file itself, either to look at its contents or to put the CAB file onto a card for installation without using ActiveSync. To do this, run the exe file without a device being connected. You will find the CAB file in
C:\Program Files\Microsoft ActiveSync\BASIC\
We'd like to be able to provide the same level of support for installation issues as we for for NS Basic/CE itself, but this is all software that doesn't come from us. We can offer tips based on our own experience and act as a central point for keeping track of good ideas our users have on creating installers.
If you have questions, post them on our web board. If we can't answer them ourselves, perhaps another user can.
We will add to this document with new information and suggestions you submit. Hopefully, we'll develop this into something that is easily usable for all!