Wednesday, November 30, 2005

CFBuild: Building your own deployment module

To create your own deployment method in CFBH all you need to do is create an application that accepts the following parameters and react to each to aid with your deployment method.

Param 1 -> Device to use
This parameter is currently hardcoded for the Device Connectivity deployment method to "Pocket PC 2003 Emulator". For the ActiveSync deployment method an empty string is passed.

Param 2 -> Deployment type
-cr for Copy and Run
-c for Copy

Param3 -> Application to copy
Full path to the application being deployed. Currently this is only an exe file (but this will change in an update and it could then be a DLL).

Param4 -> Remote destination to copy to
Currently this defaults to "//". Attempts to create folders on the devices proved to be fruitess in my tests unfortunately and require revisiting at some stage.

Param5 -> Run Arguments for application being copied
Currently an empty string is sent for both Deployment methods

Parameters 1, 3, 4 and 5 are quoted as they might contain spaces


Async Deployment Method
\DeployAS.exe "" -cr "c:\someapp.exe" "\\" ""

Device Connectivity Method
\Deploy.exe "Pocket PC Emulator" -cr "c:\someapp.exe" "\\" ""

Q) Steps to adding your new Deployment Method.
A) In the Smart Device Options dialog select the Deployment page. There are 2 methods of deployment that require a file to launch. Replace one of these methods (given the information above for best parameter fit) with the path to your Deployment executable.

Note: An update currently being worked on will be introducing a new parameter. This new parameter will be in the following form...

"file1,file2,file3" or "@filename" where filename is a file that contains a list of filenames in the following format:


This parameter is being introduced to allow you the ability to deploy additional files with your application file. While you can already deploy an Assembly file (right click on the Assembly in the Project Manager and select the Deploy Reference menu item) if deploying to an emulator this doesn't currently work for the other 2 deployment methods (ActiveSync and Device Connectivity).

Any questions either leave a comment or email me.


Post a Comment

<< Home