Building and Modifying Template Files
Introduction
The supplied build template files, app.inf, app.ini and make.bat are configured to build the sample DAN application. You will need to modify these files as specified below. Note that you may change the name of app.inf, but not the name of app.ini.
make.bat
The make.bat file is a script file that should be run in a DOS Command window to create the .zip file (e.g. myapp.zip) that contains your distributable application.
The make.bat file for the sample DAN application is shown below. The items you will need to change are highlighted.
cabwiz app.inf /cpu arm
pkzip dan.zip setup.exe app.ini app.arm.cab
The first line of make.bat runs the Microsoft .CAB wizard, specifying the name of the .inf file (app.inf) as input with the /cpu flag set to arm. The CAB wizard produces a single output file named app.arm.cab . Note that the name of the .CAB file is constructed from the name of the input file (app.inf) and the cpu flag (arm).This name is also referenced by app.ini.
The second line of the script uses pkzip.exe to compress setup.exe, app.ini, and the .CAB output file into a single .zip for distribution. Alternatively, you may use Winzip.
app.ini
The app.ini file is used by the setup program setup.exe when it installs your application on the PDA.
The app.ini file for the sample DAN application is shown below. The items you will need to change are highlighted.
[CEAppManager]
Version = 1.0
Component = DAN Navigator
[ Dan Navigator ]
Description = Navigator for Your PDA
Uninstall = DAN Navigator
CabFiles = app.arm.cab
Note that the value of the Component parameter identifies the name of the next section. These textual items must therefore be the same.
If you change the name of app.inf, you will also need to change the name of the .CAB file app.arm.cab referenced by the CabFiles parameter.
app.inf
The app.inf file specifies which application files on the desktop computer are to be copied onto the PDA, and into which directories they should be installed. In addition, app.inf contains directives to create shortcuts on the PDA menu (i.e. in the Windows Start Menu).
The contents of the sample app.inf file that was used to create the Dyalog APL Navigator (DAN) application, are shown below.
The items that you will need to change are highlighted in the listing and summarised in the table below it.
Note that The DAN application requires only two files, namely dan.exe and dan.dcf which are to be installed (on the PDA) into a single destination directory \Program Files\DAN Navigator. If you have a more complex directory structure on the PDA you will need to define separate groups of files.
The Sample app.inf file
;Directory IDs
; %CE1% \Program Files
; %CE2% \Windows
; %CE4% \Windows\StartUp
; %CE5% \My Documents
; %CE11% \Windows\Start Menu\Programs
; %CE14% \Windows\Programs\Games
; %CE15% \Windows\Fonts
; %CE17% \Windows\Start Menu
| [Version] |
; Required section |
| Signature = "$Windows NT$" |
; Required entry |
| Provider = Dyalog |
; the name of your company |
| CESignature = "$Windows CE$" |
; Required entry |
| |
|
| [CEDevice.ARM] |
; Required Section |
| ProcessorType = 2577 |
; StrongArm microprocessor |
| |
|
| [DefaultInstall] |
; Required section |
| CEShortcuts = Shortcuts.All |
; install shortcuts listed in |
| |
; [Shortcuts.All] |
| |
|
| [DefaultInstall.ARM] |
; which files to install |
| CopyFiles = Files.ARM |
; we want to install the files |
| |
; specified in [Files.ARM] |
| |
|
| [DestinationDirs] |
; Required section |
| DefaultDestDir=0,%InstallDir% |
; all files in same install directory |
| Files.ARM = 0,%InstallDir% |
; ditto |
| |
|
| [CEStrings] |
; Required section |
| AppName = DAN Navigator |
; this is used in various dialog boxes |
| |
;during installation |
| InstallDir = %CE1%\%AppName% |
; the default install directory |
| |
; \Program Files\DAN Navigator |
| [SourceDisksNames.ARM] |
; location of files on desktop PC |
| 1=,"DAN files",,"..\data" |
; we may gather files from a number |
| 2=,"DAN files",,"..\arm" |
; of locations |
| |
| [SourceDisksFiles.ARM] |
|
| dan.dcf=1 |
; dan.dcf is found in entry 1 above |
| dan.exe=2 |
; dan.exe is found in entry 2 above |
| |
| [Files.ARM] |
; these are the files we want to copy |
| dan.dcf,,,0 |
; copy dan.dcf. 0 means overwrite |
| dan.exe,,,0 |
; copy dan.exe. 0 means overwrite |
| |
| [Shortcuts.All] |
; create a shortcut to dan.exe |
| Dan Navigator ,0, dan.exe ,%CE17% |
; in \Windows\Start Menu |
| |
app.inf: items to change

Entry |
Description |
Provider = Dyalog
|
change Dyalog to the name of your company |
| AppName = DAN Navigator |
change DAN Navigator to the name of your application |
| 1=,"DAN files",,"..\data" 2=,"DAN files",,"..\arm" |
This section must specify the directory or directories on your desktop computer that contain your application files. These are referenced by number in the next section. |
| dan.dcf=1 dan.exe=2 |
This section specifies the directories in which your application files are located. For example, dan.dcf is to be found in directory 1 which is ..\data. |
| dan.dcf,,,0 dan.exe,,,0 |
This section specifies the names of your application files and the operation to be performed when they are installed on the PDA. "0" (zero) means overwrite. |
| Dan Navigator ,0, dan.exe ,%CE17% |
This specifies the shortcut to be added to the Windows Start Menu (%CE17%). |
|