Partager via


Creating Excluded Projects to Host Shell Source Code in the IDE (Windows CE 5.0)

Send Feedback

This topic assumes that you have copied the source code for the standard shell to a new directory and that you adjusted Platform Builder build settings so that your modified shell code builds instead of the original standard shell code. For more information, see How to Customize the Shell.

You can edit your source files in any editor or development environment, from Notepad to a third-party tool.

The following table shows the advantages and disadvantages of using the Platform Builder IDE to edit your custom shell source code.

Pros Cons
Provides quick access to your code while working on other parts of your OS design. The Platform Builder IDE cannot handle multiple resource script (.rc) files.
Provides the convenience of an IDE that is similar to Visual Studio. When creating browse information for your code, you might get compilation errors.

**Note   **No matter which source editor you choose, Platform Builder compiles your code during the run-time image build process.

The remainder of this topic describes how to expose your shell source code in the Platform Builder IDE.

For the source code to appear in the IDE, it must be part of a feature in your OS design tree. Therefore, you must organize the code for your custom shell into one or more application projects, which are then added to your OS design as user projects.

Typically, user projects are built at the end of the run-time image build process. However, you previously adjusted Platform Builder's settings so the shell code is compiled during the run-time image build process.

To prevent your shell code from being compiled twice, set your custom shell projects to be excluded from the usual build process for user projects. After you do this, the projects for your custom shell provide access to your code in the IDE at design time.

Note   Do not edit the Shell and User Interface\Shell\Standard Shell source files in the Platform Builder Catalog. The code within supports the standard shell and is shared by all your Windows CE-based OS designs. For more information, see Setting Up the Source Files for a Custom Shell.

To create an excluded project

  1. From the File menu, choose New Project or File.

  2. In the New Project or File dialog box, choose the Projects tab and then choose WCE Application.

  3. In the Project name field, enter the name for your project, such as MyTaskbar, and then choose OK.

    Note that in this step you are creating an empty project, and files will be added to this project in a later step

  4. Select the Workspace project radio button in this dialog box.

    It is useful to create an individual project for each part of the shell. The following table shows possible names for your custom projects and their corresponding directories.

    Project name Corresponding directory
    MyCEShell %_WINCEROOT%\Public\Shell\Oak\<Shell Name>\CEShell
    MyExplorer %_WINCEROOT%\Public\Shell\Oak\<Shell Name>\Explorer\Main
    MyFavorites %_WINCEROOT%\Public\Shell\Oak\<Shell Name>\Explorer\Favorites
    MyIEUI %_WINCEROOT%\Public\Shell\Oak\<Shell Name>\Explorer\IEUI
    MyPocketIEUI %_WINCEROOT%\Public\Shell\Oak\<Shell Name>\Explorer\PIEUI
    MyTaskbar %_WINCEROOT%\Public\Shell\Oak\<Shell Name>\Explorer\Taskbar
  5. In the New Project Wizard-Step 1 of 3, fill in the optional information, and choose Next.

  6. In the New Project Wizard-Step 2 of 3, choose An empty project, and then choose Finish.

  7. In the New Project Wizard-Step 3 of 3, choose Finish.

    Your project appears in the Platform Builder IDE, on the FileView tab of the Workspace view.

  8. From the FileView tab, expand the Workspace Projects node, and left-click your new project, such as MyTaskbar.

  9. From the Platform menu, choose Settings. In the Platform Settings dialog box that appears, choose the Image Settings tab.

  10. Select your new project, such as MyTaskbar, and click Edit. In the Edit Image Settings box, choose Exclude from build and Exclude from image. Choose OK.

  11. Choose OK to close the Platform Settings dialog box.

You have just created an empty project that is not compiled during the run-time image build process and whose files are not added to the run-time image. Although the code in your project is not built as a user project, it is built into your run-time image because of your previous setup activities.

To add files to your excluded project

  1. In the Workspace view, choose the FileView tab.

    Expand your project node, such as MyTaskbar, right-click on Include Files, and choose Add Files. The Windows Explorer Open dialog box appears.

  2. Navigate to the location of your shell code, select the header files that you want to add to your project, and choose OK.

    For example, if you were working on the taskbar, you would add all header files in %_WINCEROOT%\Public\Shell\Oak\<Shell Name>\Explorer\Taskbar to your project.

  3. Follow a similar procedure to add source files to the Sources Files node.

You can now open the source files and edit them in Platform Builder.

See Also

How to Customize the Shell | Project Settings Dialog Box

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.