[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

 

Chapter 14.

 

Batch File Plug-in



You can run a batch file after building an application in the CodeWarrior® IDE. However, a default file mapping for batch files does not exist. Whether you saved your file with the extension ".bat" or another extension, the IDE will not allow it to be added to the project.


Add batch files to your project

1. Display the Target Settings window.

Choose Edit > Target Settings, where Target is the name of the currently selected target for the project.

2. Set file mappings.

Select File Mappings from the Target Settings Panels area. The File Mappings panel appears, as shown in Figure 14.1. Enter the file extension for your batch file in the Extension field and select None from the Compiler list-box. Click Add to add the extension to the list of recognized file types. Repeat this process for each batch file type to be recognized by the IDE. When you are finished, click OK to save the new settings and close the window.

The File Mappings panel:

3. Add the batch files to the project.

Choose Project > Add Files. The Select files to add dialog appears, as shown in Figure 14.2. Navigate to your batch files, select them (use Control-click to select multiple files), then click Add. The Add Files dialog appears, as shown in Figure 14.3. Add the files to the preferred targets by enabling the options in the Targets area, then click OK.

Select files to add dialog:
Add files dialog:

Enable the batch file post-linker

1. Enable the post-linker.

Choose Edit > Target Settings, where Target is the name of the currently selected target for the project. Select Target Settings from the Target Settings Panels area. The Target Settings panel appears, as shown in Figure 14.4. Select Batch File Runner from the Post-linker list-box, then click OK to save the new settings and close the window.

The Target Settings panel:

Your project is now ready to use batch files.


NOTE

When you are working with more than one batch file in a project, you can select which batch file will be invoked by the batch file post-linker by listing it first in the Link Order view. All other batch files will be ignored. For information on the Link Order view, refer to the IDE's Online Help.


 


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: July 21, 2000