Share via


Configuring a Premakeimg.bat File (Windows Embedded CE 6.0)

1/5/2010

The Premakeimg.bat file uses the Bibhelper.vbs script, which lets you change file attributes for entries in the FILES or MODULES sections of .bib files.

For more information about the Bibhelper.vbs script, see Bibhelper Script.

To configure the Premakeimg.bat file

  1. In %_WINCEROOT%\OSDesigns\<OS Design>\Wince600\<BSP>\OAK\MISC, create a Premakeimg.bat file.

  2. In the Premakeimg.bat file, add the following commands:

    • copy %_FLATRELEASEDIR%\ce.bib %_WINCEROOT%\PBWorkspaces\MyProject\MyDirectory\ce_orig.bib
    • cscript %_MAKEENVROOT%\bibhelper.vbs %_WINCEROOT%\PBWorkspaces\MyProject\MyDirectory\MyPlatform_bib.cfg %_WINCEROOT%\PBWorkspaces\MyProject\MyDirectory\ce_orig.bib %_FLATRELEASEDIR%\ce.bib
  3. In %_WINCEROOT%\OSDesigns\<OS Design>\Wince600\<BSP>\OAK\MISC, add a MyPlatform_bib.cfg file.

  4. In the MyPlatform_bib.cfg file, add entries for the modules for which you want to change the attributes.

    The following table shows how to add an attribute to a file or remove an attribute from a file. When specifying multiple attributes, specify them on separate lines in the .cfg file.

    Entry Description

    Toolhelp.dll +C

    Adds the compression attribute to the Toolhelp.dll file.

    Toolhelp.dll -C

    Removes the compression attribute from the Toolhelp.dll file.

  5. On the Project menu, choose <OS Design> Properties.

  6. Expand Configuration Properties, and choose Custom Build Actions. In the Build step: list, choose Pre-Make Image.

  7. Choose New to add a custom build action.

  8. Add the following command in the Custom build action: box:

    copy %_WINCEROOT%\OSDesigns\<OS Design>\<OS Design>\Wince600\<BSP>\OAK\MISC\premakeimg.bat %_FLATRELEASEDIR%
    

    In the previous command, make sure that you replace the placeholders <OS Design> and <BSP> with the names of the OS design and BSP for your project.

See Also

Tasks

How to Decrease Run-Time Image Size on a CEPC

Other Resources

Binary Image Builder File