Geeks With Blogs
Windows Embedded Annotations

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" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 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).

 


 

Posted on Monday, June 29, 2009 9:52 AM Windows CE | Back to top


Comments on this post: Integrating your project in the 3rdParty folder

# re: Integrating your project in the 3rdParty folder
Requesting Gravatar...
Luca,

thanks for the great post.

Why didn't you place the catalog folder under ROCKT001\Catalog?

That way everything would be bundled nicely together.

Bjoern
Left by Bjoern Feld on Jun 30, 2009 3:53 AM

# re: Integrating your project in the 3rdParty folder
Requesting Gravatar...
Luca,

while testing I found that once I enter the MODULE property in the catalog file, PB returns an error message, stating that rocket001.dll is not referenced in the BSP's bib file.
Regards,
Bjoern
Left by Bjoern Feld on Jun 30, 2009 4:14 AM

Your comment:
 (will show your gravatar)


Copyright © Luca Calligaris | Powered by: GeeksWithBlogs.net