A recent feedback by Bjoern Feld on my post about ‘Integrating your project in the PUBLIC tree’ leads me to write this new one. Once you have created your driver/application you want probably to distribute it to your customer; maybe you want to
install your product in the %_WINCEROOT%\3rdParty folder. In this example I will assume that ACME wants to distribute a device driver for a new rocket -which will hopefully help Wile E. Coyote to terminate the Road Runner.
Open a Platform Builder workspace you have on hand and, from Project menu choose ‘Add new subproject…’. Select ‘WCE Dynamic-Link library’ name it ‘ROCKET001’ then choose to create an empty subproject.
In the folder you’ll end up with the following files:
Remove the prelink.bat, ProjSysgen.bat and ReadMe.txt which are not useful for the example then:
Modify the sources file content as following:
Fill the postlink.bat file with this:
copy Target\%_TGTCPU%\%WINCEDEBUG%\ROCKT001.* %_FLATRELEASEDIR%
This will copy the binary files to %_FLATRELEASEDIR%: I’m supposing that you will place a binary file for the rocket driver for several CPU architecures and for both the release and the debug build (just in case that Wile E. Coyote wanted to debug why the rocket blew up).
Create an ACME folder under %_WINCEROOT%\3rdParty and copy the ROCKT001 folder into it.
Create a catalog file rockt001.pbcxml for your project in %_WINCEROOT%\PUBLIC\COMMON\CATALOG; the content of the file will be the following
<?xml version=”1.0″ encoding=”utf-8″?>
<CatalogFile xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” RequiredVersion=”6.00″ xsi:schemaLocation=”urn:Microsoft.PlatformBuilder/Catalog PbcXml600.xsd” xmlns=”urn:Microsoft.PlatformBuilder/Catalog”>
<Title>ACME Rocket v 001</Title>
Ok, now you have all you need to distribute your binaries: the last but not least thing you have to do is create an .msi file to distribute your rocket driver: I will not consider here how to do it, but you can take a look here.
You can download the sample folder for the rocket driver here. It includes the catalog file that you have to copy under %_WINCEROOT%\PUBLIC\COMMON\CATALOG. I put only the ARMV4I retail binaries (which are actually related to a sample DLL).