Tech Note 30:
|
If you cannot use NS Basic's built in ability to create installers, creating proper installation procedures 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.
The steps to creating an installer are as follows:
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.
Here is a sample .inf file:
Other resources:
The .ini file describes which CAB files are to be included in the installer. Here is a sample .ini file to create the runtime installer for Runtime.ppc.exe.
[CEAppManager] Version = 1.0 Component = App [App] Description = App CabFiles = App.WM.cab
Cabwiz.exe is a program supplied by Microsoft. You can download it as part of any of the current Windows Mobile SDKs. It reads your .ini file and outputs one or more .CAB files. A CAB file is produced for each platform (WM, 2577, 4000 etc) 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 cabwiz App.inf /err err.log /cpu WM /compress
EZSetup.exe is a handy utility from Scott Ludwig. It uses your .ini file to get the list of .CAB files that Cabwiz.exe produced and makes a single compressed file out of them. EZSetup.exe should be in the current folder.
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.
ezsetup -i App.ini -r ReadMe.txt -e EULA.txt -o Project1.Installer.exe
del /Q App.Installer.exe App.WM.cab cabwiz App.inf /err err.log /cpu WM /compress copy "C:\Program Files\NSBasic\CE\ezsetup.exe" . ezsetup -i App.ini -r ReadMe.txt -e EULA.txt -o Project1.Installer.exe del /Q *.tmp *.DAT ezsetup.exe move /Y App.WM.CAB Project1.Installer.cab
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.
Put the files on a card: If the system has a memory card, put the .cab file into an \AutoRun directory on the card. It will be executed on startup.
Put the cab file in the \Application folder. Then, place a RUN file in \Application\Startup containing the following 2 lines:
\windows\wceload.exe \application\nsb.cab
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 not all the sofware comes 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!