Partager via


How to Duplicate a Public Directory as a Platform Directory

In Platform Builder, you may want to make changes in a selected platform by making changes directly to code in the %_WINCEROOT%\Public tree. If you do this, you may unintentionally create build issues and bugs that are difficult to trace, and replicate your changes in future platforms. Also, if you are using source control management, you may increase the size of the file set for source control management.

To avoid these possible issues, you can select a portion of the %_WINCEROOT%\Public tree, and then duplicate that portion in your %_WINCEROOT%\%_TGTPROJ% directory. By doing this, you can modify the code in the duplicated directories, while leaving the source code in the Public directory tree intact.

For information about the Platform Builder directory structure, see Platform and OS Directories and Shared Source Code Directories.

To track your progress in the following table, select the check box next to each step.

  Step Topic
1.Open an existing platform, or create a new Platform. Creating a Platform
2. Open Windows Explorer, and then create a new subdirectory named Public in %_WINCEROOT%\%_TGTPROJ%\Wince420.

- or -

From the Build menu, choose Open Release Directory, and then, from the command prompt, create a new subdirectory named Public in %_WINCEROOT%\%_TGTPROJ%\Wince420.

This directory becomes the new Public directory for your platform.

Not applicable.
3. Select the %_WINCEROOT%\Public directory that you want to duplicate.

You can choose to copy only a subset of the original directory tree in order to speed up the build process.

Not applicable.
4. Copy the selected directory into the Public directory of your platform. Not applicable.
5. Using the CEC Editor, create aCatalog feature file (.cec) in your platform's Public directory.

To successfully save the .cec file in the CEC Editor, you must add at least one item to the file. For example, you can add an empty feature group to the .cec file, and then save it.

This adds the new directory to the list of dependency trees in your platform, and enables the directory to be built.

CEC Editor

Catalog Feature Files

6. Verify that the files in the duplicated directory match the original files by navigating to the files in the duplicated directory tree in Windows Explorer or a command-prompt build window. Not applicable.
7. Create or edit the source code configuration files in your platform in order to enable the duplicated directories to build correctly.

For example, in driver makefile files, you must change references to $(_COMMONOAKROOT)\lib to %_TGTPROJ%\oak\lib.

You must add or edit dirs files in the root of your platform directory and in each subdirectory leading down the file path to the directory that you have duplicated.

By doing this, you complete creation of the duplicated directories as a new dependency tree in your platform.

Dirs File

Sources File

Makefile File

8. From the Tools menu, select Options, and then select the Build tab.
  • Verify that the Enable deptree build check box is selected.

Selecting this check box enables a successful build of the duplicated directories. Select this option when you modify files in the duplicated directories and want to add the changes to your OS image.

Not applicable.
9. Build your platform.

- or -

From a command prompt, build your platform by typing blddemo clean to perform a clean of the Cesysgen directories in your platform before building.

Building a Platform

You have successfully duplicated and built a selected directory from %_WINCEROOT%/Public in your %_TGTPROJ% directory. You are now ready to continue modifying your platform. For more information, see Platform Modification.

See Also

Platform Development How-to Topics | Build System | Platform Building | Miscellaneous Environment Variables | How to Use the IDE to Create, Customize, and Build a Platform | How to Customize the Appearance of Common Controls

 Last updated on Friday, October 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.