<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Building Windows CE</title>
        <link>http://geekswithblogs.net/BruceEitman/category/8117.aspx</link>
        <description>A collection of posts about controlling the build process for Windows CE using Platform Builder</description>
        <language>en-US</language>
        <copyright>Bruce Eitman</copyright>
        <managingEditor>Bruce.Eitman@EuroTech.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>Platform Builder: Sources.cmn</title>
            <link>http://geekswithblogs.net/BruceEitman/archive/2008/08/23/platform-builder-sources.cmn.aspx</link>
            <description>&lt;div style="MARGIN: 0in 0in 10pt"&gt;Sources.cmn is a build configuration system file that allows you to set common variables. This can be useful if more than one directory in the build tree need the a variable set to the same value because it can reduce your maintenance efforts. &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Each build tree can use one sources.cmn file.  When build.exe runs, it will determine the root of the build tree by looking for the top most folder with a Dirs file. Build.exe then sets BUILDROOT to the top most folder with a Dirs files.  Makefile.def in Public\Common\OAK\Misc will include $(BUILDROOT)\sources.cmn if it exists.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Some of the variables that are commonly set in sources.cmn include CDEFINES, ADEFINES and INCLUDES.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;CDEFINES and ADEFINES are used to set macros that are common to multiple build folders. These might include RAM and ROM sizes, but might also include OEM and CPU specific macros.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;The include path, INCLUDES, can be set in sources.cmn which is very helpful, especially if and when you change the directory structure.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt; The Platform directory tree should have WINCEOEM set to 1, so sources.cmn is a good place to do this rather than setting it in each sources file.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;&lt;strong&gt;Note:&lt;/strong&gt; Starting with Windows CE 5.0, sources.cmn is no longer really an option. It is required because sources.cmn needs to at least set _COMMONPUBROOT, _ISVINCPATH, and _OEMINCPATH. These were set by build.exe in prior versions.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;For more on sources files take a look at: &lt;a href="http://geekswithblogs.net/BruceEitman/archive/2008/08/04/platform-builder--sources-files.aspx"&gt;&lt;u&gt;&lt;strong&gt;Platform Builder: Sources Files&lt;/strong&gt;&lt;/u&gt;&lt;/a&gt; and &lt;a href="http://geekswithblogs.net/BruceEitman/archive/2008/08/22/platform-builder-sources-files-2.aspx"&gt;&lt;u&gt;&lt;strong&gt;Platform Builder: Sources Files 2&lt;/strong&gt;&lt;/u&gt;&lt;/a&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;a href="http://geekswithblogs.net/BruceEitman/archive/2008/06/06/platform-builder-summary-of-building-windows-ce.aspx"&gt;&lt;u&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 14pt; LINE-HEIGHT: 115%"&gt;Go to Summary of Building Windows CE&lt;/span&gt;&lt;/strong&gt;&lt;/u&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;Tags: &lt;/span&gt;&lt;a rel="tag" href="http://technorati.com/tags/Build.exe"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;Build.exe&lt;/span&gt;&lt;/a&gt;, &lt;a rel="tag" href="http://technorati.com/tags/Sources"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;Sources&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal" align="center"&gt;&lt;span style="FONT-SIZE: 9pt"&gt;Copyright © 2008 – Bruce Eitman&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal" align="center"&gt;&lt;span style="FONT-SIZE: 9pt"&gt;All Rights Reserved&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=124651"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=124651" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/BruceEitman/aggbug/124651.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Bruce Eitman</dc:creator>
            <guid>http://geekswithblogs.net/BruceEitman/archive/2008/08/23/platform-builder-sources.cmn.aspx</guid>
            <pubDate>Sun, 24 Aug 2008 02:56:33 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/BruceEitman/comments/124651.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/BruceEitman/archive/2008/08/23/platform-builder-sources.cmn.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/BruceEitman/comments/commentRss/124651.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Platform Builder: Sources Files 2</title>
            <link>http://geekswithblogs.net/BruceEitman/archive/2008/08/22/platform-builder-sources-files-2.aspx</link>
            <description>&lt;div style="MARGIN: 0in 0in 10pt"&gt;I was looking over my original post about sources files (&lt;a href="http://geekswithblogs.net/BruceEitman/archive/2008/08/04/platform-builder--sources-files.aspx"&gt;&lt;u&gt;&lt;strong&gt;Platform Builder: Sources Files&lt;/strong&gt;&lt;/u&gt;&lt;/a&gt;) today and it occurred to me that there is room to improve. That post provided basic information to create a sources file that will build a driver.  The following are other things that you can do within a sources file:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;&lt;strong&gt;Set CFLAGS and AFLAGS&lt;/strong&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;CFLAGS and AFLAGS cannot be set in a sources file. Instead, you will need to set CDEFINES and ADEFINES to set compiler and assembler command line flags.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;&lt;strong&gt;Set CDEFINES, LDEFINES and ADEFINES&lt;/strong&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;These variables are used to change the command line parameters to the compiler (CDEFINES), assembler (ADEFINES) and linker (LDEFINES). &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;As with all variables in a sources file the way to set the variable is &amp;lt;VAR NAME&amp;gt;=&amp;lt;DATA&amp;gt;. So, using CDEFINES for an example:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;CDEFINES=-DMY_MACRO –DOTHER_MACRO=5&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Which causes the compiler command line to define MY_MACRO and to define OTHER_MACRO=5. The –D is the compiler command line flag to define a macro. But wait, setting CDEFINES this way will cause any previous settings to be lost. This is exactly why we cannot use CFLAGS and AFLAGS, it is set this way in makefile.def. So a better way to set a variable is:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;CDEFINES=$(CDEFINES) -DMY_MACRO –DOTHER_MACRO=5&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;By doing so, we are setting CDEFINES equal to the current value in CDEFINES plus defining MY_MACRO and OTHER_MACRO=5.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;&lt;strong&gt;Skip Building&lt;/strong&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;You can skip building a directory in the build tree by checking the component environment variable and setting SKIPBUILD. SKIPBUILD tells build to skip building the directory.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;!if "$(BSP_NOTHISDRIVER)" == "1"&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;SKIPBUILD=1&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;!endif&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;This checks to see if the environment variable BSP_NOTHISDRIVER is set to “1”. If it is then sets SKIPBUILD=1. For those of us that don’t like variable with “NO” in them, you can use:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;!if "$( BSP_THISDRIVER)" == ""&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;SKIPBUILD=1&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;!endif&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;This checks to see if BSP_THISDRIVER is not set. If it is not then sets SKIPBUILD=1.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;&lt;strong&gt;Build Something Before or After Building the Directory&lt;/strong&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;WINCETARGETFILE0 can be used to tell the build system to build a target before building the current directory. WINCETARGFILES tells the build system to build a target after building the current directory.    I have given an example of using WINCETARGETFILES in &lt;a href="http://geekswithblogs.net/BruceEitman/archive/2008/05/08/windows-ce-platform-builder--automatically-putting-files-in-the.aspx"&gt;&lt;u&gt;&lt;strong&gt;Windows CE Platform Builder: Automatically putting files in the SDK during build&lt;/strong&gt;&lt;/u&gt;&lt;/a&gt; so let’s look at WINCETARGETFILE0.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;In this example, I have a DLL that is built in a different directory tree and want to extend the DLL by adding some new functions. The original DLL is built in two directories, one that creates a LIB file and the other that links the LIB to create a DLL.  In this directory there is source code that adds some functions and a def file that exports the functions. For maintainability, I want to use the def file from the original DLL folder, but extend it to add new definitions. To do this, use WINCETARGETFILE0 set equal to DEFFILE:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;WINCETARGETFILE0=$(DEFFILE)&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Create or edit makefile.inc in the same folder as the sources file. Add a target to makefile.inc and build instructions. In this case the target is $(DEFFILE) and the instructions will copy the original def file to this directory and append the contents of Custome.def to it:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;$(DEFFILE): Custom.def                                &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;xcopy ..\Original\BuildDll\Original.def .&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;                type Custom.def &amp;gt;&amp;gt; Original.def&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;So the new def file will be created before building this directory and the def file will be available when the DLL is linked.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;&lt;strong&gt;Tell the Solution Explorer about files to Display&lt;/strong&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;The Solutions Explorer window uses sources files to determine which files to display and how to display them.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;SOURCES not only tells build.exe which files should be built in the directory, but tells the Solutions Explorer which files to list in the “Source files” folder. The following will cause serial.cpp to display in the Source Files folder:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt; TEXT-INDENT: 0.5in"&gt;SOURCES=serial.cpp &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;FILE_VIEW_ROOT_FOLDER tells the Solutions Explorer window to which files to show in the root folder of the directory. The following will cause sources and makefile to display in the root folder:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt; TEXT-INDENT: 0.5in"&gt;FILE_VIEW_ROOT_FOLDER=Sources Makefile&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;FILE_VIEW_RESOURCE_FOLDER tells the Solutions Explorer window which files to display in the “Resource files” folder.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt; TEXT-INDENT: 0.5in"&gt;FILE_VIEW_RESOURCE_FOLDER=serial.rc&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;FILE_VIEW_INCLUDES_FOLDER tells the Solutions Explorer windows which files to display in the “Include files” folder. &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt; TEXT-INDENT: 0.5in"&gt;FILE_VIEW_INCLUDES_FOLDER=serial.h&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;FILE_VIEW_PARAMETER_FOLDER tells the Solutions Explorer window which files to display in the “Paramter files” folder.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt; TEXT-INDENT: 0.5in"&gt;FILE_VIEW_PARAMETER_FOLDER=serial.bib serial.reg&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt;&lt;span style="FONT-SIZE: 9pt"&gt;&lt;a href="http://geekswithblogs.net/BruceEitman/archive/2008/06/06/platform-builder-summary-of-building-windows-ce.aspx"&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 14pt"&gt;Go to Summary of Building Windows CE&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal"&gt;&lt;span style="FONT-SIZE: 9pt"&gt;Tags: &lt;a rel="tag" href="http://technorati.com/tags/Build.exe"&gt;Build.exe&lt;/a&gt;, &lt;a rel="tag" href="http://technorati.com/tags/Sources"&gt;Sources&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal" align="center"&gt;&lt;span style="FONT-SIZE: 9pt"&gt;Copyright © 2008 – Bruce Eitman&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal" align="center"&gt;&lt;span style="FONT-SIZE: 9pt"&gt;All Rights Reserved&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt; &lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=124634"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=124634" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/BruceEitman/aggbug/124634.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Bruce Eitman</dc:creator>
            <guid>http://geekswithblogs.net/BruceEitman/archive/2008/08/22/platform-builder-sources-files-2.aspx</guid>
            <pubDate>Fri, 22 Aug 2008 22:22:36 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/BruceEitman/comments/124634.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/BruceEitman/archive/2008/08/22/platform-builder-sources-files-2.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/BruceEitman/comments/commentRss/124634.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Platform Builder:  Cloning an MDD Lib</title>
            <link>http://geekswithblogs.net/BruceEitman/archive/2008/08/21/platform-builder--cloning-an-mdd-lib.aspx</link>
            <description>&lt;div style="MARGIN: 0in 0in 10pt"&gt;I have written about cloning code from the Public tree to a platform in the past, but someone recently asked about cloning an MDD lib build directory. More specifically the question was about cloning ufnmdd.lib in Windows CE 5.0, which is actually created by linking three separate libs together. In this article, I will walk through the process by cloning one of those libs.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Ufnmdd.lib is created by linking ufnmddbase.lib, ceosutil.lib and defbuslib.lib. I suspect that most people don’t really need to clone ceosutils.lib and defbuslib.lib, but instead really need to just clone ufnmddbase.lib for debugging purposes. So I will clone ufnmddbase.lib and show two different ways to then link the new lib with a USB function driver.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;&lt;strong&gt;Cloning UFNMDDDBase.LIB&lt;/strong&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Because this is a statically linked library, the easiest way to clone it is to simply copy the folder to the platform and then make some changes to the sources file. For this example, I will clone ufnmddbase.lib into the MainstoneII platform. I point this out because you can refer to the MainstoneII platform in the WINCE500 build tree. The USB function driver in MainstoneII is a single directory that builds some source code and links with ufnmdd.lib among other libs.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;The steps to add ufnmddbase.lib to the MainstoneII:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;1.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;Move the current code down a folder from Drivers\USBFN to Drivers\USBFN\DLL (or any name you choose.) This makes way for us to add a new folder under USBFN for ufnmddbase.lib to build in.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;2.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;Create a Dirs file in Drivers\USBFN and add the following to it:&lt;br /&gt;
       DIRS =DLL&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;3.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;Test building the driver just to be sure that this didn’t break it already&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;4.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;Copy PUBLIC\COMMON\OAK\DRIVERS\USBFN\CONTROLLER\MDD to Drivers\USBFN\MDD&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;5.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;Add MDD to the Drivers\USBFN\Dirs before DLL:&lt;br /&gt;
    DIRS=MDD DLL&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;6.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;Add RELEASETYPE=PLATFORM to the Drivers\USBFN\MDD\sources file&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;7.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;Test build again and check that ufnmddbase.lib is in MainstoneII\Lib sub folders&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Now that ufnmddbase.lib has been cloned to the platform, there are two choices for using it within the USB function driver; link directly with the three libs in ufnmdd.lib or create a new folder to link the libs and create a new ufnmdd.lib.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;&lt;strong&gt;Link Directly with UFNMDDBase.lib&lt;/strong&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;For this option, edit Drivers\USBFN\DLL\sources to change the from linking with ufnmdd.lib to linking with the three separate libraries. Change the SOURCELIBS from:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;SOURCELIBS= \&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;        $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\pxa27x_usbfn.lib \&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;        $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\ufnmdd.lib&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;To:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;SOURCELIBS= \&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;        $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\pxa27x_usbfn.lib \&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;        $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\ceosutil.lib \&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;        $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\defbuslib.lib \&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;        $(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\ufnmddbase.lib &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Then rebuild the driver.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;&lt;strong&gt;Create a New UFNMDD.LIB&lt;/strong&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;For this option, create a new folder to link the three libraries to create a new ufnmdd.lib. The steps are:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;1.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;Create a new folder: Drivers\USBFN\UFNMDD&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;2.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;Create a sources file in the new folder and include:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;TARGETNAME=UFNMDD &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;TARGETTYPE=LIBRARY &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;RELEASETYPE=PLATFORM &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;SOURCELIBS= \&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;                $(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\ufnmddbase.lib \&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;                $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\ceosutil.lib \&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;                $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\defbuslib.lib&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;SOURCES=&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;3.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;Change the SOURCELIBS from:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;SOURCELIBS= \&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;        $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\pxa27x_usbfn.lib \&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;        $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\ufnmdd.lib&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;To:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;SOURCELIBS= \&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;        $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\pxa27x_usbfn.lib \&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;        $(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\ufnmdd.lib&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;4.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt; Add UFNMDD to Drivers\USBFN\Dirs after MDD and before DLL:&lt;br /&gt;
DIRS=MDD UFNMDD DLL&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;This should give the bases for cloning an MDD lib file for a driver. If you wanted to also clone the other libraries, the technique is the same.&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;Tags: &lt;/span&gt;&lt;a href="http://technorati.com/tags/Build.exe"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;Build.exe&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal" align="center"&gt;&lt;span style="FONT-SIZE: 9pt"&gt;Copyright © 2008 – Bruce Eitman&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal" align="center"&gt;&lt;span style="FONT-SIZE: 9pt"&gt;All Rights Reserved&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=124599"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=124599" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/BruceEitman/aggbug/124599.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Bruce Eitman</dc:creator>
            <guid>http://geekswithblogs.net/BruceEitman/archive/2008/08/21/platform-builder--cloning-an-mdd-lib.aspx</guid>
            <pubDate>Thu, 21 Aug 2008 04:10:04 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/BruceEitman/comments/124599.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/BruceEitman/archive/2008/08/21/platform-builder--cloning-an-mdd-lib.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/BruceEitman/comments/commentRss/124599.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Platform Builder:  Sources Files</title>
            <link>http://geekswithblogs.net/BruceEitman/archive/2008/08/04/platform-builder--sources-files.aspx</link>
            <description>&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;Earlier I posted about dirs files and stated that dirs files are the direction signs for build.exe. Sources files are the destinations. When build.exe finds a sources file, it stops and runs nmake to build the source code in the directory. Sources files set environment variables that are then used by nmake when interpreting the makefile. Of course if you have looked at the makefiles, you see that they typically only include the makefile.def in Public\Common\Oak\Misc.&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;Setting variables in a sources file is simple, it is just variable equals value; example TARGETNAME=DrivverShell. You can also dereference variables using the same syntax as in the bib files and reg files, wrap the variable in $(); example $(&lt;/span&gt; &lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;_COMMONSDKROOT).&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;Sources files use the same syntax as makefiles, so a # starts a comment which extends to the end of the line.&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;Let’s examine the simple sources file in my Driver Shell post:&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 4pt; PADDING-BOTTOM: 1pt; BORDER-LEFT: windowtext 1pt solid; PADDING-TOP: 1pt; BORDER-BOTTOM: windowtext 1pt solid"&gt;#This is a sources comment
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;TARGETNAME=DriverShell&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;RELEASETYPE=PLATFORM&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;TARGETTYPE=DYNLINK&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt; &lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;TARGETLIBS= \&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;    $(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt; &lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;DEFFILE=DriverShell.def&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;DLLENTRY=DllEntry&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt; &lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 10pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;SOURCES=DriverShell.c&lt;/div&gt;
&lt;/div&gt;
&lt;p style="MARGIN: 0in 0in 10pt"&gt; &lt;/p&gt;
&lt;table cellspacing="0" cellpadding="0" width="100%"&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td style="BORDER-LEFT-COLOR: #d4d0c8; BORDER-BOTTOM-COLOR: #d4d0c8; BORDER-TOP-COLOR: #d4d0c8; BACKGROUND-COLOR: transparent; BORDER-RIGHT-COLOR: #d4d0c8"&gt;
            &lt;div&gt;
            &lt;div style="MARGIN: 0in 0in 10pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #4f81bd; LINE-HEIGHT: 115%"&gt;&lt;strong&gt;&lt;font color="#330099"&gt;Hint: To fully understand what the variables in a sources file do, refer to Makefile.def in Public\Common\Oak\Misc&lt;/font&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
            &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
This sources file tells nmake to build in Platform\&amp;lt;BSP&amp;gt;\Target\&amp;lt;CPU Independent Path&amp;gt;\DriverShell.dll, link with coredll.lib, use DriverShell.def to define the exported symbols, that the entry point of the dll is DllEntry and that the source code to compile is DriverShell.c.
&lt;div style="MARGIN: 0in 0in 10pt"&gt;That was a lot, so let’s take it one step at a time:&lt;/div&gt;
&lt;ul&gt;
    &lt;li&gt;
    &lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;TARTGETNAME defines the base name of the output file, this is defined by the developer of the sources file&lt;/div&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;RELEASETYPE defines where to put the output file, the choices are: DEFAULT, SDK, OAK, DDK, MANAGED, PLATFORM, LOCAL, CETK, CUSTOM. I could easily tell you where the output file ends up in each case, but it would be better for you to go look yourself. The output file in each case is defined in Public\Common\Oak\Misc\sources.Releasetype_%RELEASETYPE% or in makefile.def itself for versions prior to CE 5.0.&lt;/div&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;TARGETTYPE defines the type of output file that is being build. The options are:&lt;/div&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;div style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in"&gt;DYNLINK – creates a dynamically linked library, MUI or control panel applet. If MUI is set to 1, the file extension is changed from dll to mui.  If CPL is set to 1, the file extension is changed from dll to cpl.&lt;/div&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;div style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in"&gt;PROGRAM – creates an native exe&lt;/div&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;div style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in"&gt;LIBRARY – creates a static linked library&lt;/div&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;div style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in"&gt;MANAGED_EXE – creates a managed exe from &lt;/div&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;div style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in"&gt;MANAGED_WINEXE – creates a managed exe of target winexe, quite frankly, I don’t know what this means.&lt;/div&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;div style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in"&gt;MANAGED_MODULE – and again, I don’t know what this means&lt;/div&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;div style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in"&gt;MANAGED_DLL – creates a managed dll&lt;/div&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;div style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in"&gt;EXPLIB – creates an exp file&lt;/div&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;div style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in"&gt;NOTARGET - cause nmake to skip over linking a target&lt;/div&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;TARGETLIBS lists the .lib files to link with.&lt;/div&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;SOURCELIBS (not shown) lists .lib files to link with.&lt;/div&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;DEFFILE sets the name of the DEF file to link with. If this is not defined, $(TARGENAME).def will be used&lt;/div&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;DLLENTRY sets the entry point function name&lt;/div&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;div style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in"&gt;SOURCE sets the source code files to build, which also sets that the obj files are linked&lt;/div&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;NOTES on TARGETLIBS and SOURCELIBS:&lt;/div&gt;
&lt;ul&gt;
    &lt;li&gt;
    &lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;If TARGETTYPE is LIBRARY TARGETLIBS is ignored&lt;/div&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;If TARGETTYPE is PROGRAM TARGETLIBS is linked before SOURCELIBS&lt;/div&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;If TARGETTYPE is DYNLINK, SOURCLIBS is linked before TARGETLIBS&lt;/div&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Those are the basic variables set in a sources file. There are many more available, some documented and some not. The best documentation is the makefile.def file, but to read and understand it well you will need to understand makefiles. Makefile.def is a very sophisticated makefile, so be prepared that you may not fully understand it on the first pass. You may need to refer to makefile documentation, over and over until all of the details of makefile.def become clear.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Build.exe does not support conditional expressions in sources files. You may find examples of conditional expressions in sources files, but officially they are not supported, which means that if you use them they could break in the future. A known problem with conditional expressions is that since build.exe doesn’t use them, and build.exe processes dependencies, conditional expressions cause problems for the dependency checking.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;For more on sources files take a look at: &lt;a href="http://geekswithblogs.net/BruceEitman/archive/2008/08/22/platform-builder-sources-files-2.aspx"&gt;&lt;u&gt;&lt;strong&gt;Platform Builder: Sources Files 2&lt;/strong&gt;&lt;/u&gt;&lt;/a&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;a href="http://geekswithblogs.net/BruceEitman/archive/2008/06/06/platform-builder-summary-of-building-windows-ce.aspx"&gt;&lt;u&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 14pt; LINE-HEIGHT: 115%"&gt;Go to Summary of Building Windows CE&lt;/span&gt;&lt;/strong&gt;&lt;/u&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;Tags: &lt;/span&gt;&lt;a rel="tag" href="http://technorati.com/tags/Build.exe"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;Build.exe&lt;/span&gt;&lt;/a&gt;, &lt;a rel="tag" href="http://technorati.com/tags/Sources"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;Sources&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal" align="center"&gt;&lt;span style="FONT-SIZE: 9pt"&gt;Copyright © 2008 – Bruce Eitman&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal" align="center"&gt;&lt;span style="FONT-SIZE: 9pt"&gt;All Rights Reserved&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=124236"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=124236" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/BruceEitman/aggbug/124236.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Bruce Eitman</dc:creator>
            <guid>http://geekswithblogs.net/BruceEitman/archive/2008/08/04/platform-builder--sources-files.aspx</guid>
            <pubDate>Tue, 05 Aug 2008 00:48:02 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/BruceEitman/comments/124236.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/BruceEitman/archive/2008/08/04/platform-builder--sources-files.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/BruceEitman/comments/commentRss/124236.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Platform Builder: IXP46x, 128 MB RAM, CEBaseCESysgen.bat - System Fails to Boot</title>
            <link>http://geekswithblogs.net/BruceEitman/archive/2008/07/22/platform-builder-ixp46x-128-mb-ram-cebasecesysgen.bat---system-fails.aspx</link>
            <description>&lt;div style="MARGIN: 0in 0in 10pt"&gt;It has been another one of those days. Several months ago we discovered that one of our systems wouldn’t boot if we did a clean build, but if we built the kernel separately and then ran makeimg the system would boot. What a mystery, that just didn’t make any sense. &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;So, the engineer on the project modified PreMakeimg.bat to rebuild the kernel when we run makeimg.   All was good, but this increases build time. If you have followed this blog, you know that I don’t like long build times but we all tolerated this because there were more important issues for us to address.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Then a second platform had the same problem. I made it a priority to figure out what was wrong this time though because now we were losing time in trouble shooting and in building.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Since the first build is a full build of the system, there is a build.log file in %_WINCEROOT% that I could look at for clues. And the second build was just in the kernel folder, so there was a build.log there as well. I diffed the two files.  At first didn’t seem too interesting. That is until I scrolled to the right and could see the command line calls to compile and assemble. At that point it became clear that during the full build of the system that the RAM size was being defined twice, once setting the RAM size to 64MB and the other to 128MB. Our boards have 128MB of RAM so clearly the setting of 64MB was wrong, and of course having both sizes set was a problem.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Now to figure out why this was happening only when we did the full build. I will leave out the details of my search other than that I ruled out sources.cmn, sources, platform.bat and the project’s PBXML file as the cause. Then I noticed that in the root of the platform there was a CEBaseCESysgen.bat file. I had previously ignored it, but now it was beginning to make me curious.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;When I opened CEBaseCESysgen.bat, what I found was that it set the RAM size to 64 MB if it is not set to 16, 64 or 256MB, but these platforms are 128MB. Apparently, someone had added support for 128MB, but not noticed this file.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;So, what is happening with this CEBaseCESysgen.bat? During the sysgen of the project the platform is built with CEBuild.bat, which runs CESysgen.bat during the build of the platform. CESysgen.bat in turn runs CEBaseCESysgen.bat during the different phases of the build process. But, when we build the kernel separately we just run build.exe which doesn’t run CEBaseCESysgen.bat.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt; &lt;strong&gt;&lt;u&gt;&lt;span style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%"&gt;&lt;a title="Title of this entry." href="http://geekswithblogs.net/BruceEitman/archive/2008/07/08/summary-of-when-things-go-wrong.aspx"&gt;&lt;span style="COLOR: navy"&gt;Summary of When Things Go Wrong&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;Tags: &lt;/span&gt;&lt;a rel="tag" href="http://technorati.com/tags/Build.exe"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;Build.exe&lt;/span&gt;&lt;/a&gt;, &lt;a rel="tag" href="http://technorati.com/tags/CEbuild.bat"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;CEBuild.bat&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal" align="center"&gt;&lt;span style="FONT-SIZE: 9pt"&gt;Copyright © 2008 – Bruce Eitman&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal" align="center"&gt;&lt;span style="FONT-SIZE: 9pt"&gt;All Rights Reserved&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=123959"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=123959" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/BruceEitman/aggbug/123959.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Bruce Eitman</dc:creator>
            <guid>http://geekswithblogs.net/BruceEitman/archive/2008/07/22/platform-builder-ixp46x-128-mb-ram-cebasecesysgen.bat---system-fails.aspx</guid>
            <pubDate>Wed, 23 Jul 2008 01:02:07 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/BruceEitman/comments/123959.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/BruceEitman/archive/2008/07/22/platform-builder-ixp46x-128-mb-ram-cebasecesysgen.bat---system-fails.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/BruceEitman/comments/commentRss/123959.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Platform Builder:  Dirs Files</title>
            <link>http://geekswithblogs.net/BruceEitman/archive/2008/07/16/platform-builder--dirs-files.aspx</link>
            <description>&lt;div style="MARGIN: 0in 0in 10pt"&gt;Dirs files are the direction signs for building your platform. They show the way for build.exe to find your code to build it. Dirs files are probably the best named files in the build system because what they do is tell build.exe which sub directories to descend into to build.   If you have looked around at the files in your platform, then you probably are familiar with the basic form of a dirs file, here is an example:&lt;/div&gt;
&lt;div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 4pt; PADDING-BOTTOM: 1pt; BORDER-LEFT: windowtext 1pt solid; PADDING-TOP: 1pt; BORDER-BOTTOM: windowtext 1pt solid"&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;DIRS=\&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;                Serial \&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;                USB \&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 10pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;                Wave&lt;/div&gt;
&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;This dirs file tells build to descend into three folders; Serial, USB and Wave.  Notice that like macro definition (#define) the dirs file uses line continuation using ‘\’ followed by a newline. So build.exe sees this as “DIRS=Serial USB Wave” and you could just as easily write it in the dirs file that way. I prefer separate lines because it makes it easier to edit the file later.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;
&lt;div style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal"&gt;&lt;span style="FONT-SIZE: 9pt"&gt;DIRS can also be set to build all sub directories using ‘*’; example&lt;/span&gt;&lt;/div&gt;
&lt;div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 4pt; PADDING-BOTTOM: 1pt; BORDER-LEFT: windowtext 1pt solid; PADDING-TOP: 1pt; BORDER-BOTTOM: windowtext 1pt solid"&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;DIRS=*&lt;/div&gt;
&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;I could stop here, but there is another powerful feature of dirs files, the OPTIONAL_DIRS setting. OPTIONAL_DIRS lets you have directories that are built sometimes and other times they are not built. The OPTIONAL_DIRS are list in the dirs files similar to the DIRS setting:&lt;/div&gt;
&lt;/div&gt;
&lt;div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 4pt; PADDING-BOTTOM: 1pt; BORDER-LEFT: windowtext 1pt solid; PADDING-TOP: 1pt; BORDER-BOTTOM: windowtext 1pt solid"&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;OPTIONAL_DIRS=\&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;                PXA \&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 10pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;                SMI&lt;/div&gt;
&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;This tells build.exe that it may need to build the directories PXA and/or SMI. Build.exe will then build the folders if it has one of them listed in the environment variable BUILD_OPTIONS. So if we want to build SMI, we can add the following to &amp;lt;platform&amp;gt;.bat:&lt;/div&gt;
&lt;div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 4pt; PADDING-BOTTOM: 1pt; BORDER-LEFT: windowtext 1pt solid; PADDING-TOP: 1pt; BORDER-BOTTOM: windowtext 1pt solid"&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 10pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;Set BUILD_OPTIONS=%BUILD_OPTIONS SMI&lt;/div&gt;
&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;One key rule for Dirs files is that they cannot coexist in a directory that contains a sources files.&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;&lt;a href="http://geekswithblogs.net/BruceEitman/archive/2008/06/06/platform-builder-summary-of-building-windows-ce.aspx"&gt;&lt;u&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 14pt; LINE-HEIGHT: 115%"&gt;Go to Summary of Building Windows CE&lt;/span&gt;&lt;/strong&gt;&lt;/u&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;Tags: &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;&lt;a rel="tag" href="http://technorati.com/tags/Build.exe"&gt;Build.exe&lt;/a&gt;, &lt;a rel="tag" href="http://technorati.com/tags/DIRS%20File"&gt;DIRS File&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal" align="center"&gt;&lt;span style="FONT-SIZE: 9pt"&gt;Copyright © 2008 – Bruce Eitman&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal" align="center"&gt;&lt;span style="FONT-SIZE: 9pt"&gt;All Rights Reserved&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=123838"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=123838" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/BruceEitman/aggbug/123838.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Bruce Eitman</dc:creator>
            <guid>http://geekswithblogs.net/BruceEitman/archive/2008/07/16/platform-builder--dirs-files.aspx</guid>
            <pubDate>Thu, 17 Jul 2008 01:31:56 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/BruceEitman/comments/123838.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/BruceEitman/archive/2008/07/16/platform-builder--dirs-files.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/BruceEitman/comments/commentRss/123838.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Platform Builder: Using STR Files</title>
            <link>http://geekswithblogs.net/BruceEitman/archive/2008/07/08/platform-builder-using-str-files.aspx</link>
            <description>&lt;div style="MARGIN: 0in 0in 10pt"&gt;One way to customize your project configuration files is to use string replacement with STR files. Technically, the STR files are for language localization, but that doesn’t exclude using them for customization. In fact, when you create a new project using Platform Builder for Windows CE 6.0, your project will contain a cebase.str for you to set your device name in.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;STR files are plain text files stored in your FILES\INTLTRNS\&amp;lt;Local&amp;gt; folder. If you aren’t sure which folder you are using, open a build window and check the setting for LOCALE:&lt;/div&gt;
&lt;div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 4pt; PADDING-BOTTOM: 1pt; BORDER-LEFT: windowtext 1pt solid; PADDING-TOP: 1pt; BORDER-BOTTOM: windowtext 1pt solid"&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;_FLATRELEASEDIR&amp;gt;set LOCAL&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 10pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;LOCALE=0409&lt;/div&gt;
&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;STR files contain #define statements similar to C/C++ macro definitions, but different. The syntax is:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;#define &amp;lt;String to replace&amp;gt; “&amp;lt;String to insert&amp;gt;”&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt 0.5in"&gt;String to replace is a string that will be replaced in the configuration files.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt 0.5in"&gt;String to insert is a string to insert into the configuration files. This must be in quotes. NOTE: The string to replace will be replaced with the quotes and everything on the line up to the carriage return.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;The STR files are read in by makeimg using FindFirstFile() and FindNextFile() so the name of your STR file is important. If you want to replace defines in other files, then you need to name your file so it read in after the other file(s). For example, platform.str will be read in after common.str, but before wceshellfe.str.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;To create an example, let’s create a file named ZProject.str. I want to override some of the strings in common.str and create a string for my customer’s company name to use in HKEY_LOCAL_MACHINE\Software. Here is my file:&lt;/div&gt;
&lt;div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 4pt; PADDING-BOTTOM: 1pt; BORDER-LEFT: windowtext 1pt solid; PADDING-TOP: 1pt; BORDER-BOTTOM: windowtext 1pt solid"&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;// Paths for SHGetSpecialFolderPath&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;#define LOC_PATH_WINDOWS                     "\\Windows"&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;#define LOC_PATH_DESKTOP                        "\\Windows\\Desktop"&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;#define LOC_PATH_STARTUP                        "\\Windows\\StartUp"&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;#define LOC_PATH_RECENT                           "\\Windows\\Recent Documents"&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;#define LOC_PATH_PROGRAMS                  "\\Windows\\Program Files"&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;#define LOC_PATH_FAVORITES                    "\\Windows\\Favorites Files"&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;#define LOC_PATH_FONTS                             "\\Windows\\Fonts"&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;#define LOC_PATH_MYDOCUMENTS         "\\Documents"&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;#define LOC_PATH_PROGRAMFILES          "\\Program Files"&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;#define LOC_PATH_APPDATA                       "\\Application Data"&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt; &lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 10pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;#define LOC_CUSTOMER_NAME                 "Company A"&lt;/div&gt;
&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Note that I copied the LOC_PATH defines from common.str and modified some of them, then added LOC_CUSTOMER_NAME.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;In Common.reg and wceappsfe.dat files, the LOC_PATH variables are used:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Common.reg:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;; The path lookups for SHGetSpecialFolderPath&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;; @CESYSGEN IF COREDLL_FILEINFO&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;[HKEY_LOCAL_MACHINE\SYSTEM\Explorer\Shell Folders]&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;                "Application Data"=LOC_PATH_APPDATA&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;                "Desktop"=LOC_PATH_DESKTOP&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;                "Favorites"=LOC_PATH_FAVORITES&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;                "Fonts"=LOC_PATH_FONTS&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;                "My Documents"=LOC_PATH_MYDOCUMENTS&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;                "Program Files"=LOC_PATH_PROGRAMFILES&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;                "Programs"=LOC_PATH_PROGRAMS&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;                "Recent"=LOC_PATH_RECENT&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;                "StartUp"=LOC_PATH_STARTUP&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;                "Windows"=LOC_PATH_WINDOWS&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;; @CESYSGEN ENDIF&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Which after processing can be found in reginit.ini:&lt;/div&gt;
&lt;div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 4pt; PADDING-BOTTOM: 1pt; BORDER-LEFT: windowtext 1pt solid; PADDING-TOP: 1pt; BORDER-BOTTOM: windowtext 1pt solid"&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;; The path lookups for SHGetSpecialFolderPath&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;; @CESYSGEN IF COREDLL_FILEINFO&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;[HKEY_LOCAL_MACHINE\SYSTEM\Explorer\Shell Folders]&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;                "Application Data"="\\Application Data"&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;                "Desktop"="\\Windows\\Desktop"&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;                "Favorites"="\\Windows\\Favorites Files"&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;                "Fonts"="\\Windows\\Fonts"&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;                "My Documents"="\\Documents"&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;                "Program Files"="\\Program Files"&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;                "Programs"="\\Windows\\Program Files"&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;                "Recent"="\\Windows\\Recent Documents"&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;                "StartUp"="\\Windows\\StartUp"&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;                "Windows"="\\Windows"&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 10pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;; @CESYSGEN ENDIF&lt;/div&gt;
&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Note that the strings were replace by the strings in ZProject.str instead of the strings in common.str. Looking at the makeimg output we can see why:&lt;/div&gt;
&lt;div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 4pt; PADDING-BOTTOM: 1pt; BORDER-LEFT: windowtext 1pt solid; PADDING-TOP: 1pt; BORDER-BOTTOM: windowtext 1pt solid"&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;makeimg: Moving files from usasnap to release...&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;makeimg: Read string substitutions from C:\WINCE500\PBWorkspaces\AUTOMARKIA\RelDir\AUTOMARK_ARMV4I_Release\intltrns\0409\&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;makeimg: Read string substitutions from C:\WINCE500\PBWorkspaces\AUTOMARKIA\RelDir\AUTOMARK_ARMV4I_Release\intltrns\0409\cebase.str&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;makeimg: Read string substitutions from C:\WINCE500\PBWorkspaces\AUTOMARKIA\RelDir\AUTOMARK_ARMV4I_Release\intltrns\0409\common.str&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;makeimg: Read string substitutions from C:\WINCE500\PBWorkspaces\AUTOMARKIA\RelDir\AUTOMARK_ARMV4I_Release\intltrns\0409\datasync.str&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;makeimg: Read string substitutions from C:\WINCE500\PBWorkspaces\AUTOMARKIA\RelDir\AUTOMARK_ARMV4I_Release\intltrns\0409\directx.str&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;makeimg: Read string substitutions from C:\WINCE500\PBWorkspaces\AUTOMARKIA\RelDir\AUTOMARK_ARMV4I_Release\intltrns\0409\ie.str&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;makeimg: Read string substitutions from C:\WINCE500\PBWorkspaces\AUTOMARKIA\RelDir\AUTOMARK_ARMV4I_Release\intltrns\0409\odo.str&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;makeimg: Read string substitutions from C:\WINCE500\PBWorkspaces\AUTOMARKIA\RelDir\AUTOMARK_ARMV4I_Release\intltrns\0409\shell.str&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;makeimg: Read string substitutions from C:\WINCE500\PBWorkspaces\AUTOMARKIA\RelDir\AUTOMARK_ARMV4I_Release\intltrns\0409\viewers.str&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;makeimg: Read string substitutions from C:\WINCE500\PBWorkspaces\AUTOMARKIA\RelDir\AUTOMARK_ARMV4I_Release\intltrns\0409\wceappsfe.str&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;makeimg: Read string substitutions from C:\WINCE500\PBWorkspaces\AUTOMARKIA\RelDir\AUTOMARK_ARMV4I_Release\intltrns\0409\wceshellfe.str&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;makeimg: Read string substitutions from C:\WINCE500\PBWorkspaces\AUTOMARKIA\RelDir\AUTOMARK_ARMV4I_Release\intltrns\0409\ZProject.str&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 10pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;makeimg: Copy files from C:\WINCE500\PBWorkspaces\AUTOMARKIA\RelDir\AUTOMARK_ARMV4I_Release\intlfile\0409\ to release directory.&lt;/div&gt;
&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;You can use a different file name and see where it ends up in the makeimg output.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;In my Project.reg, I added:&lt;/div&gt;
&lt;div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 4pt; PADDING-BOTTOM: 1pt; BORDER-LEFT: windowtext 1pt solid; PADDING-TOP: 1pt; BORDER-BOTTOM: windowtext 1pt solid"&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;[HKEY_LOCAL_MACHINE\Software\LOC_CUSTOMER_NAME]&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 10pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;                "SomeData"=dword:1&lt;/div&gt;
&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Which ends up as:&lt;/div&gt;
&lt;div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 4pt; PADDING-BOTTOM: 1pt; BORDER-LEFT: windowtext 1pt solid; PADDING-TOP: 1pt; BORDER-BOTTOM: windowtext 1pt solid"&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;[HKEY_LOCAL_MACHINE\Software\"Company A"]&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 10pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;                "SomeData"=dword:1&lt;/div&gt;
&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;The same works for wceappsfe.dat:&lt;/div&gt;
&lt;div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 4pt; PADDING-BOTTOM: 1pt; BORDER-LEFT: windowtext 1pt solid; PADDING-TOP: 1pt; BORDER-BOTTOM: windowtext 1pt solid"&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;root:-Directory("LOC_PROGRAMFILES_DIR")&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;root:-Directory("LOC_MYDOCUMENTS_DIR")&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;Directory("\Windows"):-Directory("LOC_DESKTOP_DIR")&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;Directory("\Windows"):-Directory("LOC_PROGRAMS_DIR")&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 10pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;Directory("\Windows"):-Directory("LOC_RECENT_DIR")&lt;/div&gt;
&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Which ends up in InitObj.dat as:&lt;/div&gt;
&lt;div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 4pt; PADDING-BOTTOM: 1pt; BORDER-LEFT: windowtext 1pt solid; PADDING-TOP: 1pt; BORDER-BOTTOM: windowtext 1pt solid"&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;root:-Directory("Program Files")&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;root:-Directory("My Documents")&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;Directory("\Windows"):-Directory("Desktop")&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;Directory("\Windows"):-Directory("Programs")&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 10pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;Directory("\Windows"):-Directory("Recent")&lt;/div&gt;
&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;So you can see that STR files can be used by you to make changes to both your configuration files as well as the Public configuration files.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt; 
&lt;div style="MARGIN: 0in 0in 10pt"&gt;&lt;a href="http://geekswithblogs.net/BruceEitman/archive/2008/06/06/platform-builder-summary-of-building-windows-ce.aspx"&gt;&lt;u&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 14pt; LINE-HEIGHT: 115%"&gt;Go to Summary of Building Windows CE&lt;/span&gt;&lt;/strong&gt;&lt;/u&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;Tags: &lt;a rel="tag" href="http://technorati.com/tags/Makeimg"&gt;Makeimg&lt;/a&gt;, &lt;a rel="tag" href="http://technorati.com/tags/BIB%20File"&gt;BIB File&lt;/a&gt;, &lt;a rel="tag" href="http://technorati.com/tags/REG%20File"&gt;REG File&lt;/a&gt;, &lt;a rel="tag" href="http://technorati.com/tags/STR%20File"&gt;STR File&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt" align="center"&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt" align="center"&gt;
&lt;div style="MARGIN: 0in 0in 0pt; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal" align="center"&gt;&lt;span style="FONT-SIZE: 9pt"&gt;Copyright © 2008 – Bruce Eitman&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal" align="center"&gt;&lt;span style="FONT-SIZE: 9pt"&gt;All Rights Reserved&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=123664"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=123664" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/BruceEitman/aggbug/123664.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Bruce Eitman</dc:creator>
            <guid>http://geekswithblogs.net/BruceEitman/archive/2008/07/08/platform-builder-using-str-files.aspx</guid>
            <pubDate>Wed, 09 Jul 2008 00:22:45 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/BruceEitman/comments/123664.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/BruceEitman/archive/2008/07/08/platform-builder-using-str-files.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/BruceEitman/comments/commentRss/123664.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Platform Builder: Your Changes aren’t in the OS Image</title>
            <link>http://geekswithblogs.net/BruceEitman/archive/2008/07/02/platform-builder-your-changes-arent-in-the-os-image.aspx</link>
            <description>&lt;div style="MARGIN: 0in 0in 10pt"&gt;Another engineer just called me for help to figure out why her changes to a dll were not reflected in the nk.bin. I have always found this to a user error problem and started to list the causes that I could think of, but in the end she found a new one.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Causes that we came up with are listed below. You may know of others, if you do please share those with us in a comment.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;You didn’t build your code before running makeimg&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;The build failed, but you didn’t notice and ran makeimg anyway&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;You didn’t copy the file(s) to the _FLATRELEASEDIR prior to running makeimg&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;You didn’t run makeimg&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;Makeimg failed&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;You didn’t download the new image to the device (and there are lots of variations of this depending on how you download images to you device)&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;You have an old copy of the dll in the same folder as the exe that calls LoadLibrary(), this is the new&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in"&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;&lt;strong&gt;&lt;u&gt;&lt;span style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%"&gt;&lt;a title="Title of this entry." href="http://geekswithblogs.net/BruceEitman/archive/2008/07/08/summary-of-when-things-go-wrong.aspx"&gt;&lt;span style="COLOR: navy"&gt;Summary of When Things Go Wrong&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal" align="center"&gt;&lt;span style="FONT-SIZE: 9pt"&gt;Copyright © 2008 – Bruce Eitman&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal" align="center"&gt;&lt;span style="FONT-SIZE: 9pt"&gt;All Rights Reserved&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=123532"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=123532" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/BruceEitman/aggbug/123532.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Bruce Eitman</dc:creator>
            <guid>http://geekswithblogs.net/BruceEitman/archive/2008/07/02/platform-builder-your-changes-arent-in-the-os-image.aspx</guid>
            <pubDate>Wed, 02 Jul 2008 18:33:26 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/BruceEitman/comments/123532.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/BruceEitman/archive/2008/07/02/platform-builder-your-changes-arent-in-the-os-image.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/BruceEitman/comments/commentRss/123532.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Platform Builder: Clone Public Code</title>
            <link>http://geekswithblogs.net/BruceEitman/archive/2008/07/02/platform-builder-clone-public-code.aspx</link>
            <description>&lt;div style="MARGIN: 0in 0in 10pt"&gt;I recently wrote an article about modifying the behavior of KernelIoControl when called by User Mode code. In that article, I stated that you need to clone the Public oemioctl code to your platform. Sounds so simple doesn’t it, and really it isn’t that difficult if you know what you are doing, but for the rest of you I thought that I would walk through the process of cloning code.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Many of us use the term “clone code” but what does it really mean? Cloning code means to copy the code to another build tree and modify the build environment to build the code under the new tree. In the old days of Windows CE development, that meant reverse engineering how Microsoft builds the code to apply your knowledge of the build system to it. Today we have sysgen_capture.bat to do most of the hard work for us.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Here is how I would clone oemioctl:&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;1.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;Create a new folder in my platform to build oemoctl.dll, I will call mine OALIoctlDir. This folder will be a holding place for two new folders; one will build the lib that is built in Public\Common\OAK\oalioctl, and the other will link the lib to create the dll. You certainly can create the dll with one folder, but that is more involved that the discussion here.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;2.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;Copy the %_WINCEROOT%\Public\Common\OAK\OEMICTL folder and paste it as a new subfolder of OALIoctlDir. This is the folder that creates OALIoctl.lib.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;3.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;Create an new folder in OALIoctlDir named BuildDll; this is the folder that will do the linking to create OALIoctl.dll.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;4.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;Create a dirs file OALIoctlDir that contains&lt;br /&gt;
&lt;br /&gt;
&lt;span style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0in; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: windowtext 1pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: windowtext 1pt solid"&gt;DIRS=oalicotl BuildDll&lt;br /&gt;
&lt;/span&gt;This tells build to go into OALIoctl first to build the lib, then go to BuildDll to link the dll.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;5.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;Add OEMIocltDir to its parent folder’s dirs file, which tells build to build our clone of OALIoctl.dll.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;6.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;Modify OALIoctlDir\OALIoctl\sources to add RELEASETYPE=PLATFORM, this tells build to put the lib in the platform build tree&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;7.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;Open a build window and change directories to OALIocltDir\BuildDll&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;8.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;Run “sysgen_capture OALIoctl” which will create a file named sources.OALIoctl. This new file contains the information that Microsoft uses to link OALIoctl.lib to create OALIoctl.dll, we need that information to build.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;9.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;Rename souces.OALIoctl to sources, so that build.exe can use it.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;10.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;   &lt;/span&gt;&lt;/span&gt;Modify OALIoctlDir\BuildDll\sources to &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;a.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;change    $(_PUBLICROOT)\common\oak\lib\$(_CPUINDPATH)\OALIoctl.lib to    $(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\OALIoctl.lib&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;b.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;      &lt;/span&gt;&lt;/span&gt;Change the DEFFILE to DEFFILE=OALIoctl.def&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;11.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;   &lt;/span&gt;&lt;/span&gt;Copy OALIoctl.def from OALIoctlDir\oalioclt to OALIoctlDir\BuildDll, this is necessary so that when BuildDll is built it can find the def file. There are alternative solutions for this, but this one is easy.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;12.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;   &lt;/span&gt;&lt;/span&gt;Copy a makefile from one another folder to BuildDll, this is necessary because build.exe needs the makefile when it calls nmake.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;13.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;   &lt;/span&gt;&lt;/span&gt;Change directories to OALIocltDir and run build&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in"&gt;&lt;span&gt;14.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;   &lt;/span&gt;&lt;/span&gt;Now you have an OALIoctl.dll in your Platform’s Target folder. When you run buildrel, this OALIoctl.dll will overwrite the one created in the Public folder.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Now you have a clone of OALIoctl that you can modify to suit the needs of your platform.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;&lt;span style="FONT-SIZE: 9pt; LINE-HEIGHT: 115%"&gt;
&lt;p&gt;Tags: &lt;a rel="tag" href="http://technorati.com/tags/Sysgen_Capture"&gt;Sysgen_Capture&lt;/a&gt;, &lt;a rel="tag" href="http://technorati.com/tags/Clone"&gt;Clone&lt;/a&gt;&lt;/p&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal" align="center"&gt;&lt;span style="FONT-SIZE: 9pt"&gt;Copyright © 2008 – Bruce Eitman&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt; TEXT-INDENT: -0.25in; LINE-HEIGHT: normal" align="center"&gt;&lt;span style="FONT-SIZE: 9pt"&gt;All Rights Reserved&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=123531"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=123531" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/BruceEitman/aggbug/123531.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Bruce Eitman</dc:creator>
            <guid>http://geekswithblogs.net/BruceEitman/archive/2008/07/02/platform-builder-clone-public-code.aspx</guid>
            <pubDate>Wed, 02 Jul 2008 18:32:13 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/BruceEitman/comments/123531.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/BruceEitman/archive/2008/07/02/platform-builder-clone-public-code.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/BruceEitman/comments/commentRss/123531.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Platform Builder: Using Your Developr Batch File</title>
            <link>http://geekswithblogs.net/BruceEitman/archive/2008/06/25/platform-builder-using-your-developr-batch-file.aspx</link>
            <description>&lt;div style="MARGIN: 0in 0in 10pt"&gt;Spell checker is going to hate this post, because the ‘e’ is missing in the folder name Developr. One of the things that you can do to customize the build environment in Platform Builder is to add a batch file to the Developr folder.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;To use the Developr batch file, you must first create a sub folder named with your system username. The fact is that I am thinking about this right now because my username just changed from beitman to bruce.eitman, so my Developr batch file isn’t working anymore. So I changed my %_WINCEROOT%\Developr\beitman folder name to %_WINCEROOT%\Developr\bruce.eitman.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Now that you have a folder, create a new file named setenv.bat. Now you can set environment variables that you want in the setenv.bat. Be careful though, you should not set any variables that will affect the outcome of the build of your OS image. But, you can set variables like WINCECOD. &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt"&gt;Here is my setenv.bat:&lt;/div&gt;
&lt;div style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 4pt; PADDING-BOTTOM: 1pt; BORDER-LEFT: windowtext 1pt solid; PADDING-TOP: 1pt; BORDER-BOTTOM: windowtext 1pt solid"&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;set WINCEREL=1&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;set WINCECOD=1&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;set BUILDREL_USE_COPY=1&lt;/div&gt;
&lt;div style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: medium none"&gt;set PATH=%PATH%;%_WINCEROOT%\Developr\bruce.eitman\Bin&lt;/div&gt;
&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;Note that this even adds a path to the PATH variable that includes some useful batch files that I use during my work to simplify the command line.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;The Developr batch file is run by wince.bat when it is setting all the other environment variables. It is called with all of the parameters passed to wince.bat, so you can get more complex and use those variables, but I haven’t found a need to do that.&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt; &lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal"&gt;&lt;span style="FONT-SIZE: 9pt"&gt;&lt;a href="http://geekswithblogs.net/BruceEitman/archive/2008/06/06/platform-builder-summary-of-building-windows-ce.aspx"&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 14pt; COLOR: blue"&gt;Go to Summary of Building Windows CE&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=123377"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=123377" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/BruceEitman/aggbug/123377.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Bruce Eitman</dc:creator>
            <guid>http://geekswithblogs.net/BruceEitman/archive/2008/06/25/platform-builder-using-your-developr-batch-file.aspx</guid>
            <pubDate>Thu, 26 Jun 2008 02:13:53 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/BruceEitman/comments/123377.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/BruceEitman/archive/2008/06/25/platform-builder-using-your-developr-batch-file.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/BruceEitman/comments/commentRss/123377.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>