Home > Articles > Operating Systems, Server

Extending the Platform Builder Catalog

The Platform Builder catalog isn't for components that ship with Windows CE. Components can be added to the catalog so that they become available as standard components for a given platform. When you're adding a component, the principal pieces of information you must supply are its name, a method to build the component, the group to which this component belongs (this could be a new group or an existing one in the catalog), and a unique ID. A multitude of other information, which we will discuss shortly, must also be supplied.

Let's start by introducing the unique ID. This ID must be unique across any component ever created for Windows CE. A globally unique identifier (GUID), also referred to as a universally unique identifier (UUID), is a 128-bit value that uniquely identifies a component. You can generate a unique number on demand by using the Microsoft utility guidgen.exe. You can then use this number to identify a component that must be added to the catalog. If a GUID is not supplied, Platform Builder generates one for the component when adding it to the catalog. However, providing a GUID for each component is recommended because it must be supplied when modifications are made to the component in the catalog.

Guidgen will generate a new GUID and allow you to copy it to Clipboard so that you can paste it into any other application. One of four formats can be selected. For a format suitable for our purposes, select Registry Format. Then click on the Copy button. Now the GUID can be pasted in via the editor being used to create the component that will be added to the catalog.

Components to be imported into a catalog must be specified by a special syntax and placed in a file with a .cec extension. Files with the .cec extension are called component files.

Component Files in Depth

Component files have a format for laying out information about a component. The best way to start is by example. Recall that we built an application called welcome.exe for our project Adam. This simple welcome application can be included as a standard component in the catalog. A CEC file must be used to describe this component before it can be imported into the catalog.

CECInfo Block

Every component file starts with the CECInfo block (Listing 3.6), a structure that contains information about the component file itself. Note that any text following the characters "//" up to the end of the line is considered to be a comment.

Listing 3.6  Sample component file header

CECInfo (
  Name(New.cec)
  CECVersion (3.00)
  // GUID() – left blank
  Vendor ("Windows CE Unlimited")
  Description ("A sample Cec file")
)

The fields of the CECInfo block are specified as follows:

  • Name is an optional field that identifies the name of the component file.

  • CECVersion is a mandatory field that can have a value of either 2.12 or 3.00. It identifies the version of Windows CE for which the component file was written.

  • GUID is an optional field containing a number that uniquely identifies the component file. If it is left blank, a GUID will automatically be generated for the component file when it is used to import the component.

  • Vendor is an optional field identifying the vendor that is distributing this component as part of the catalog.

  • Description is an optional field that describes the component file.

ComponentType Block

The component itself is described by a ComponentType block. Consider the sample shown in Listing 3.7, which describes welcome.exe as a component.

Listing 3.7  Sample component file

ComponentType (
 Name( Welcome )
 GUID( {232FBCF4-72DD-4208-A40F-686A42FFE8B3} )
 Description( "Welcome application" )
 Group( "\Standard Applications" )
 Implementations(
  Implementation(
    Name(Welcome)
    GUID( {2A8D35B5-F6BC-485c-867B-8352826D27CF} )
    Description( "Welcome application" )
    Vendor("Windows CE Book")
    Date(05/05/2000)
    BuildMethods(
      BuildMethod(
         Step( buildrel )
         GUID( {A3CED1C5-617E-4065-A784-8551FA00A249} )
         CPU( x86 )
         InputFiles( )
         OutputFiles( )
         Action( "#COPY( "$(_PROJECTROOT\Welcome\Obj\Welcome.exe", $(_FLATRELEASEDIR)" )))
         Setting( '#CHM( "Welcome.chm" )' )
         Setting( '#CHM( "Welcome.chi" )' )
         Setting('#INPUT("Include Welcome", INCLUDE_WELCOME, 1, 0, "")')
      )
    )
  )
 )
)

The fields of the ComponentType block are specified as follows:

  • Name specifies the name of the component. The name of the component in Listing 3.7 is Welcome.

  • GUID is an optional field containing a number that uniquely identifies the component. In this case we have assigned a GUID to the component so that we can specify it later to modify this component.

  • Description is an optional field that describes this component. It is displayed when the properties for a component are viewed in Platform Builder.

  • Group is an optional field that refers to the organization hierarchy displayed in the catalog. If you specify \Standard Applications in the sample, this component will be added to a new group in the catalog at the root level called Standard Applications. Welcome will be added as a component to this group. You can add a component to an existing component simply by specifying its name. Group names in a group hierarchy can be separated by a backslash (\). If no other option is specified, the component is added directly to the root of the catalog.

  • Vendor identifies the vendor of the component. The value of this field is displayed when the properties for the component are viewed (right-click on the component in the catalog and select Properties from the pop-up menu).

Implementation Block

Each ComponentType block must have an embedded Implementations block (see Listing 3.7). The Implementations block can consist of one or more Implementation blocks that describe how the component has been implemented.

The fields of the Implementation block are specified as follows:

  • Name is a mandatory field that identifies the Implementation block in other Implementation blocks.

  • GUID contains the unique identifier for the Implementation block. This field is optional, but if specified, it must be unique for each block. An implementation may be referred to by name or by GUID. If this field is left blank, Platform Builder automatically generates and applies a GUID to this block.

  • Description is an optional field that describes the implementation.

  • Vendor is an optional field that identifies the vendor of the implementation and is optional.

  • Children is an optional field that lists any children of an implementation. This field can be used to specify any dependent implementations. A child implementation must be described earlier in the component file. Implementations may be identified by name or GUID in this field.

  • Date is an optional field that specifies the date of implementation in MM/DD/YY format.

This date can be set to the date the component was built or to the date it was included in the catalog.

BuildMethods Block

The BuildMethods block, along with the Name field, is required in the Implementation block. The BuildMethods block is followed by one or more BuildMethod blocks, each of which specifies a method for building the component (see Listing 3.7). The fields of the BuildMethod block are specified as follows:

  • Step and Action are mandatory fields that form the heart of the BuildMethod block. Together these fields specify how this particular implementation of the component will be built. The following list gives the different keywords that can be specified in these fields. For a more thorough treatment of how each of these keywords operates, refer to Chapter 10. The command specified in the Action field depends on the keyword specified in the Step field (see Table 3.6).

    Table 3.6  Build Actions

    Step Keyword

    Phase of Build

    Action Command

    CESYSGEN

    System generation phase. The Microsoft modules and third- party vendor components that make up the Windows CE system are combined to create a core operating system. Components supplied by the system integrator are added to this build to create the final image.

    #COPY

    BSP

    Core build phase. During this phase of the build process, each component that is part of the Windows CE image is built individually.

    #ENV

    #BUILD

    #CUSTOM

    BUILDREL

    Build-release phase. In this phase, all the output files are collected in a predetermined location in a mass copy operation.

    #COPY

    #CUSTOM

    MAKEIMG

    Make-image phase. The final operating system image is built from the collected files.

    #ENV


    The Action field can contain the commands specified in the list that follows. In each case the entire command must be enclosed in quotation marks for it to be executed—that is, Action ("<command>").

    • #COPY("SrcPath", "TargetDir") copies a file with a fully qualified path name into the target directory. Use this command to copy files during the system generation or build-release phases. For example, this command can be used to copy a component to the final target directory from which the operating system image is constructed.

    • #ENV("Variable", "Value") sets an environment variable to a specific value. For a more detailed explanation of how environment variables can affect a build, refer to the section titled Customizing the Build Using Environment Variables earlier in this chapter and to Chapter 10.

    • #BUILD(Dirs< | Sources, "Directory") tells the build process to build either a Dirs file or a Sources file to be found in the directory specified in Directory. Dirs and Sources files specify commands for building one or more components. A more thorough treatment of these files can be found in Chapter 11.

    • #BUILD(MAK, "Directory", "Makefile") is an alternative flavor of the BUILD command that can be used to build a component with a custom makefile. A custom makefile would be used in lieu of a sources file for better control of the build process. This command can also be helpful in porting components to Windows CE, where you can use a fully tested makefile instead of converting it into a sources file. For a quick primer on how makefiles work, refer to Appendix B.

    • #CUSTOM("WorkingDirectory", "CustomCommand") can be used to execute a command specified by CustomCommand. This command is executed from the directory specified by WorkingDirectory. It can be used to execute scripts like batch files that perform tasks that either cannot be performed by a makefile or would be extremely tedious to port to a makefile. Again, legacy components that are built by scripts can be accommodated by this command.

  • GUID contains the unique identifier for the Implementation block. This field is optional, but if specified, it must be unique for each block. An implementation may be referred to by name or by GUID. If the field is left blank or not specified, Platform Builder automatically generates and applies a GUID to this block.

  • CPU is a mandatory field that indicates if the implementation is CPU specific. Current CPU values that can be specified in this field are SH3, SH4, SA1100, ARM720, ARM720T, R3912, R4102, R4111.16, R4111.32, R4300, PPC403, PPC821, and x86 for Windows CE 3.0. This list, supported by Microsoft, may grow in the future as more processors are supported by Windows CE. Processors may also be dropped from this list. The value of the CPU field must be enclosed in quotation marks. The value default indicates that the implementation is for the default list of processors for the operating system. The default list is the list supported by Microsoft.

  • Setting is an optional field that supports three different operations:

    1. #INPUT( "Sysgen setting", EnvironmentVariable, 1 | 0, InitialValue, BspValue). Each BuildMethod block is allowed to specify a setting during the system generation phase, referred to as Cesysgen or Sysgen. In the Platform Builder IDE, you can select or deselect Sysgen by selecting Build and then Settings, and finally clicking on the Sysgen tab in the Platform Settings dialog box.

      Each setting sets an environment variable. The #INPUT operation allows such a setting to be made visible in the Sysgen tab of the Platform Settings dialog box. The string Sysgen setting is displayed in the tab. The environment variable specified by EnvironmentVariable is either set or unset depending on its value: either 1 or 0. If the value is 1, then the environment variable will be set to TRUE when the setting is selected. A value of 0 specifies that the variable be set to FALSE when the setting is selected. Finally, InitialValue specifies the initial value of the environment variable and hence the default selection of the setting in the tab. BspValue is a string that is set to the name or GUID of the board support package that allows this setting.

    2. #OUTPUT(Output) allows the selection of a particular module in the image. Output is usually an environment variable that is read by the cesysgen.bat file during the system generation phase (we'll give more details in Chapter 10).

    3. #CHM("HelpOrHelpIndexFile") associates an HTML help file (.chm extension) or a help index file (.chi extension) with the component. When an SDK is exported, the component's help files specified by this operation are automatically included in the SDK by Platform Builder.

  • InputFiles is an optional field that is used to specify a list of files, separated by spaces, required to perform the build for this component.

  • OutputFiles is an optional field that is used to specify a list of files, separated by spaces, output by the build.

Adding a Component to the Catalog

One global catalog is used by Platform Builder to store components and can be reused across projects. To add a component to the catalog, you must create the component. Component files have a .cec extension. To import the component, select Manage Platform Builder Components... in the File menu. The resulting dialog box lists all the components that have already been imported (Figure 3.15). Click on Import New... and browse for the component file that has been created for the new component.

Figure 3.15 Adding Welcome to the catalog

As an example, save Listing 3.6 to a file called new.cec and import it into the catalog. Welcome will show up as a member of the catalog under the folder Standard Applications. After Welcome has been added to the catalog (Figure 3.16), it is available for inclusion in all new platforms.

Figure 3.16 The catalog after Welcome has been added

The dialog box to manage platform builder components is a front end to the pbcec.exe utility that comes with Platform Builder. Pbcec imports components into the catalog. To import a component, we call Pbcec with the component file name as its argument. For example, to import the Welcome component into the CEPC catalog via the command line, we would have invoked Pbcec in the following way:

Pbcec New.cec

Calling Pbcec with the /list argument lists the components in the catalog. A sample run yielded the following output:

Microsoft (R) Platform Builder 3.00 Catalog Utility
Copyright (C) Microsoft Corp 2000. All rights reserved.
CEC File         Description
========         ===========
cepc.cec         CEPC components
configs.cec      CoreOS components
extras.cec       OAL components
mfcatl.cec       MFC and ATL components
odo.cec          Odo components
platmgr.cec      Platform Manager components
vbrt.cec         VBCE Components
ddtk30.cec       Driver Development Test Kit Components
new.cec          A sample Cec file
There are currently 9 cec files in the catalog.

When called with the /r option, Pbcec removes from the catalog the component that is specified in the file passed in as the Pbcec argument. The /clean option does exactly what it says: It clears out all components from the catalog.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020