Customize IDE commands

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Customize IDE commands

1,759 Views
bobc
Contributor II
Hi everyone,

I want to add a new custom command to the IDE using "Customize IDE command" option. I have successfully added a command to run a batch file and it runs ok. However, if I use the predefined variables such as %projectFileDir, to specify a directory, it does not run my batch file. I think this is because the expanded value is surrounded in double quotes (".." ) , and Windows doesn't handle that. This also prevents me specifying files on the command line using the predefined variables. This makes the predefined variables a lot less useful than they could be.

Is there a way around this problem, or am I stuck with it?

I am using CW v5.6.


Message Edited by bobc on 2008-07-14 05:20 PM
Labels (1)
Tags (1)
0 Kudos
2 Replies

364 Views
J2MEJediMaster
Specialist I
Have you considered running the tools directly from the command line, where you could then use a .bat file to handle the build? Consult the Targeting_56800E.pdf manual, located in CodeWarrior's  \Help directory. Chapter thirteen shows how to use the command line tools.

---Tom
0 Kudos

364 Views
bobc
Contributor II
Sure, but nowadays the preferred interface is the GUI.

What I really wanted was to have custom postlink processing performed automatically when the user hits "Make", but I already found that can't be done.

The workaround I have is to pass the variables into the batch file, strip the quotes, then change directory inside the batch file. This means that there must be a batch file on the path (or fixed location), which requires extra setup, but it works.

I might rewrite the batch file as a .exe, but the same method could be used.
0 Kudos