Download the catalog files:
 
During the Windows CE Chat a couple of weeks ago someone asked about customizing the Explorer shell. Feeling generous that day, and because it was nearing the end of the chat, I told him to contact me directly through this blog (I could feel a blog post coming on.) 
Much to my disappointment he was adamant about putting the entire Pulbic\Shell folder in the 3rdParty folder and building the code there.  It was disappointing because I don’t have any idea how to do it. But then, I realized that this was a chance to learn something new, a challenge, and of course a topic for a blog post. Game on.
So the challenge is:
1.       Clone an entire Public subfolder
2.       Build code in the 3rdParty folder
3.       Make it work for both CE 5.0 and 6.0
So I started down the path of solving this problem. I started thinking that this was going to be a real challenge, possibly one that I wouldn’t be able to solve. But like any engineering task start with what you know and move along finding solutions to what you don’t know as needed. So, I started by copying the Public\Shell folder to something that I know well, my BSP.   This allowed me to study how it builds and make changes to take control of how it builds. What I found with this step was that the INCLUDES were set up assuming that it was in the Public folder, or at least not in the Platform folder. Other than the INCLUDES, the only changes that had to make were to the RELEASETYPE, but it turns out that simply deleting the RELEASETYPE setting from the sources files solves that. I went ahead with building the Explorer.exe by running “sysgen_capture –p SHELL explorer” as I have discussed before in posts like Platform Builder: Cloning an MDD Lib.
So now, I know what to do to build the Shell folder, time to move it to the 3rdParty folder. For this, I started out at the beginning again by copying it from Public. This time it is at the root of a build tree so the INCLUDES is okay, all I needed to do was changes the sources.cmn to set RELEASETYPE=PLATFORM and delete RELEASETYPE from the sources files.   I made a conscience decision to use PLATFORM as the RELEASETYPE because I wanted the libs and targets to be put someplace else in case I want to build the 3rdParty shell with multiple projects and because I want the targets to be picked up by buildrel which doesn’t look in the 3rdParty folder. Now run sysgen_capture to create the build folder(s) for any targets that we need to build.
Step 1 is complete; I have cloned the entire Public\Shell folder to 3rdParty. Next step is to build it, and as I pointed out this is new ground for me. My guess is that I need a catalog file that introduces this new folder to Platform Builder.   
Before I start on the catalog, let me jump to the end. I was successful at building this under both CE 5.0 and CE 6.0. The only difference was the catalog file because, well, catalog files are different in the two versions. Everything else was identical.
Back to creating a catalog file which was the key to solving how to get the folder to build. I started with CE 5.0, which actually might have made solving it easier. In CE 5.0, I didn’t have many choices; create a Group was the only starting point, then only add a feature which sets a variable, and finally several options, but “Project Link…” stood out. The Project Link sets a path to a PBPXML file which defines a project. I didn’t know anything about PBPXML files, but I never let that stand in my way. I did some searching and found that I had a PBPXML file from having cloned CALIBRUI in the past. Looking at CALIBRUI.PBPXML I found that it was rather simple and that most of it didn’t apply to what I was doing, so I edited it and came up with:
<?xml version="1.0"?>
<PBProject DisplayName="customshell" xmlns="urn:PBProject-schema" />
I put this in the 3rdParty\Shell folder as CustomShell.PBPXML and pointed the catalog Project Link to it.
The rest is downhill from here. Refresh the catalog, then add the new Custom Shell component to the project and sysgen. Project done.
The only difference for CE 6.0 is that the Project Link is called Subproject Link. But I used the same PBPXML file.
The down side of this new 3rdParty folder is that it build fine from the Platform Builder GUI, but it does not build when running cebuild from the command line. So if you are building from the command line, you will need to build your 3rdParty folder separately.
Copyright © 2009 – Bruce Eitman
All Rights Reserved