Customize IDE commands

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Customize IDE commands

1,979 次查看
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
标签 (1)
标记 (1)
0 项奖励
回复
2 回复数

584 次查看
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 项奖励
回复

584 次查看
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 项奖励
回复