分类: 嵌入式
2010-09-21 11:38:10
Overview of steps to follow:
stickiesNow you need to create a .inf file which contains all the information about which files go where, shortcuts which need creating, and registry entries which need adding to the PPC device. Mine looks like this:
|
+----ARMRel
| L stickies.exe
|
+----MIPSRel
| L stickies.exe
|
+----SH3Rel
| L stickies.exe
|
+----common
L welcome.sti
[Version] |
There are a number of sources on the MS site () which explain how this works. I'm not going to copy and paste them here, but a couple of things of interest are:
Signature = "$Windows NT$" |
at the top, these two lines must stay like this.
welcome.sti,,,0x00000010 |
means don't install this file if it already exists. This is a data file, and if a user is reinstalling the app, it's just possible they created a data file called this, so we don't want to overwrite it!
The following table explains that %CE11% stuff:
%CE1% \Program Files \Program Files |
You can see that I'm using c:\stickies as the top level directory that you can see above.
I get the cab files built with the following command line. It will change for you depending on where your cabwiz.exe is located:
"C:\Windows CE Tools\wce300\MS Pocket PC\support\ActiveSync\windows ce application |
Now I get these files in c:\stickies\output:
06/11/2003 22:26 1,421 errors.log |
The errors.log file contains:
Warning: Section [DestinationDirs] key "Files.Common" is not using the string "%InstallDir%" |
Don't worry, as far as I can tell, each run through for each CPU complains about the other CPUs. I don't have any registry settings to add, which explains that, and the "%InstallDir%" entry is just a warning
Now create a setup.ini file in that directory. Mine looks like:
[CEAppManager] |
At this point, you can test your application by pointing the ceAppMgr.exe straight at it:
C:\Program Files\Microsoft ActiveSync\ceappmgr.exe c:\stickies\output\setup.ini |
This is all that's required, but you might like to make it a little neater for your users. That's where the freeware comes in. Put this somewhere useful and run:
ezsetup -l english -i setup.ini -r readme.txt -e eula.txt -o ppc_stickies.exe |
Run ezsetup /?
to get all the command line options, but it requires two text files
containing a readme and EULA, and will output a self-executing setup program for all the processors
you support to ppc_stickies.exe! Don't be fooled into trying to install the exe you download - it's
just a single exe, and the icon for it looks like a setup file, but it's not, that's the actual
program you've downloaded.
At this point, I had lots of problems when I ran the built installer. The first problem was that in my setup.ini, I'd set a version number "1.00". It would appear that ceappmgr.exe doesn't like this, and kept on and on complaining "Application Manager cannot install this application on your mobile device due to an invalid setup file. Reinstall and try again", until I changed it to "1.0", and it was okay again.
The second error I ran into was that I've not added the:
[CEDevice.ARM] |
lines to the inf file, and so the cab files were not set to run on any specific processor. Okay, the names were evident, but the computer doesn't look at the names when it's deciding whether it can install to the attached PPC. I was being told that "Zhorn Stickies does not support the connected device type. Application Manager will make the application available for installation when a supported device type is connected". I discovered that I wasn't setting the processor type (a simple error once you know what the problem is of course) by using a program "WinCE CAB Manager" from . This allows you to edit cab files built above directly, and if you can afford/justify the cost, then it's really useful.
I'm no expert, and this is the only PPC setup I've ever built, but I could have really done with reading this document before I started, which is why I wrote it. Hope it gets you started okay.