Integrating your project in the 3rdParty folder


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:

  • rocket001.bib
  • rocket001.dat
  • rocket001.db
  • rocket001.def
  • rocket001.pbpxml
  • rocket001.reg
  • makefile
  • postlink.bat
  • prelink.bat
  • ProjSysgen.bat
  • ReadMe.txt
  • sources    

Remove the prelink.bat, ProjSysgen.bat and ReadMe.txt which are not useful for the example then:

Modify the sources file content as following:

TARGETNAME=ROCKT001

SOURCES= \

TARGETTYPE=NOTARGET
POSTLINK_PASS_CMD=postlink.bat

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&#8221; xmlns:xsd=”http://www.w3.org/2001/XMLSchema&#8221; RequiredVersion=”6.00″ xsi:schemaLocation=”urn:Microsoft.PlatformBuilder/Catalog PbcXml600.xsd” xmlns=”urn:Microsoft.PlatformBuilder/Catalog”>
  <FileInformation Id=”FileInformation:ACME:Rocket001″>
    <Title>ACME Rocket</Title>
    <Description>Anti-road-runner weapon</Description>
    <Vendor>ACME</Vendor>
    <OSVersion>6.00</OSVersion>
    <FileVersion>1.00</FileVersion>
  </FileInformation>
  <Item Id=”ROCKET001″>
    <Title>ACME Rocket v 001</Title>
    <Variable>BSP_ACME_ROCKET001</Variable>
    <Module>rockt001.dll</Module>
    <Project>$(_WINCEROOT)\3RDPARTY\ACME\ROCKT001\ROCKT001.PBPXML</Project>
    <Location>Device Drivers</Location>
  </Item>
</CatalogFile>

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).


 

Advertisements
This entry was posted in Windows Embedded CE and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s