I know that this has been asked before, but I don't seem to be able to make
heads or tails of the response, so I'd be grateful if someone could be so
good as to go through the steps necessary in order to make a deployable
project.
I'm in C# and have a solution that makes an application. I want to make this
application available to vic- err ah I mean beta users. Now what?
I've recently had to go through this, and there were a fair number of
gotchas. Here's a brief summary of the steps to follow if you want to
do what I did.
1) Write the CF app.
2) Create an InstallActions project which is a desktop class library
type.
3) Within that, create Build and Etc directories.
4) Within the Build directory, have a buildcab.bat batch file.
I parameterised the version provided automatically by VS.NET so that
it would be more maintainable.
5) Within the Etc directory, add a .ini file and a .inf file for your
project. The .inf file lists which files you need from your main
app. The .ini file really just gives a description and lists which
cab files buildcab.bat will have created for you after running it.
I need SQL Server CE in my project, so I also have a .ini file for
that.
6) Set a Pre-Build Event for the project. Mine is set to:
"$(ProjectDir)\Build\buildcab.bat" (including the quotes)
7) In the same project, add a custom install action to launch the
device installer (more on that in a minute). I also have a
custom uninstall action to remove some registry entries which the
device installer creates.
8) Create a Setup project which includes the cab file generated at
build time, the device installer (coming soon!) and any cab/ini
files you need. (In my case, this is the SQL Server CE cab and
ini file.) In the UI, have a checkbox which, when ticked,
fires the custom action from 7) to launch the device installer
when installation has finished.
9) Write the device installer. In my case, this uses
OpenNETCF.Desktop.Communications.dll to talk to the device - it
does this to check for SQL Server CE's presence, write registry
settings, verify the installation etc. The most important thing
this program does, however, is launch the CeAppMgr to install
your app. In my case, I have a nasty bit of code at the start
so that if I get a certain parameter, I try to find an msiexec
process with the appropriate main window title (the name of the
app as far as the installer is concerned) and wait for that process
to finish before showing the main installation/configuration dialog.
It's all very involved, despite our project having relatively simple
needs (it appears that configuration is a much-neglected part of device
application installation)... Let me know if any of the above sounds
interesting and you need more information. At some stage I may create a
sample application which has all the elements of the above in, but in a
very simple way, as a sort of "Hello world" program for any CF app
which requires configuration.