Integrating the leavescan utility into CodeWarrior for Symbian 3.0
(Note this won't work for versions less than 3.0. Your SDK also needs to set the
Symbian Linker v2 in the Target Settings preference panel. If you don't meet these two
conditions this won't work for you.)

1) Get leavescan and install it in c:\apps\leavescan\

http://www3.symbiandevnet.com/faq.ns...2?OpenDocument

2) Find the "Metrowerks x86 Compiler.cwcomp" file and make a copy of it
and call it "LeaveScan+WINSCW.cwcomp"

This file is located under:

&ltcw install&gt\plugins\support\CompilerDescriptors\Symbian\

3) Open the new file "LeaveScan+WINSCW.cwcomp" in a text editor
and make the following changes. (Additions are noted in red)

Find the following text in the file...

...
&lt!-- End of Compiler Definition --&gt
&lt/struct&gt
...

Between the XML comment and the ending &lt/struct&gt tag add the following XML:

&ltstruct&gt
&lt!-- +++++++++++++++Leave Scan++++++++++++++ --&gt
&ltsetting uuid-alias="." entry="toolSymbolicCommandDef"&gt
&ltsimple&gt${var:TOOL_NAME} "${source.name}"&lt/simple&gt
&lt/setting&gt
&ltsetting uuid-alias="." entry="toolType"&gt
&ltsimple&gtkToolLeaveScan&lt/simple&gt
&lt/setting&gt
&ltsetting uuid-alias="." entry="toolDisplayName"&gt
&ltsimple&gtSymbian Leave Scan tool&lt/simple&gt
&lt/setting&gt
&ltsetting uuid-alias="." entry="toolExecutableName"&gt
&ltsimple&gtC:\apps\leavescan\leavescan.exe&lt/simple&gt
&lt/setting&gt
&ltsetting uuid-alias="." entry="parseStdOut"&gt
&ltsimple&gttrue&lt/simple&gt
&lt/setting&gt
&ltsetting uuid-alias="." entry="parseStdErr"&gt
&ltsimple&gtfalse&lt/simple&gt
&lt/setting&gt
&ltsetting uuid-alias="." entry="defaultSwitch"&gt
&ltsimple&gt&lt/simple&gt
&lt/setting&gt
&ltsetting uuid-alias="." entry="outputParser"&gt
&ltsimple&gtkGCCMessageFormatParser&lt/simple&gt
&lt/setting&gt
&lt/struct&gt

This adds a tool call defintion that can be executed during compilation

4) Now set up where the tool is called. Find the following text:

&ltsetting uuid-alias="." entry="postActionIdentifiers"&gt
&ltarray inheritance="none"&gt
&ltsimple&gtkToolSize&lt/simple&gt
&lt/array&gt
&lt/setting&gt

and change it to:

&ltsetting uuid-alias="." entry="postActionIdentifiers"&gt
&ltarray inheritance="none"&gt
&ltsimple&gtkToolSize&lt/simple&gt
&ltsimple&gtkToolLeaveScan&lt/simple&gt
&lt/array&gt
&lt/setting&gt

This makes a call to the leavescan utility after a successful call to the compiler and size tool.

Now you can save the file and choose the tool you just created.

5) Open up a project's WINCW target settings and navigate to the Symbian Compiler pref.
In the Compiler pop-up, choose "LeaveScan+WINCW". Build your project and note any messages
that are emitted in the Errors & Warnings window.

You might want to enable "Display generated commands..." in the Symbian Common preference panel
so you can see where messages are being emitted from during the build sequence.

Cheers,
Tim