Feature #5524 2012-05-07 23:25

geckon

Custom command for "Run" option

Hi!

Would it be possible to add a possibility to specify custom command which would be run in case of "Build- > Run" (or Ctrl+F10)? Or maybe to extend "Make" commands (I would appreciate adding a command for "Run" which would be similar to e.g. "Build project/ target").

Category
Build System
Status
Closed
Close date
2012-05-09 08:11
Assigned to
ollydbg
ollydbg 2012-05-08 12:32

I can't follow your idea. Sorry.

geckon 2012-05-08 13:38

I'll try to make it clear.. When I hit the Build button my project is compiled. I can specify the compilation by using own Makefile and setting Make commands.

When I hit the Run button (or use the Ctrl+F10 shortcut) the executable is run. I would like to specify this i. e. to specify custom command using predefined variables like %executable etc. This command would be executed every time when the Run button was hit.

I think it would be useful to add another "Make command" (in terms of project's Build options) which would be executed by hitting the "Run" button. It is (at least as I see it) an analogy to "Build project/target" Make command which is executed by hitting the "Build" button.

Is that understandable? :)

ollydbg 2012-05-08 14:11

OK, I understand now, but I'm not sure this feature is exist. But what I can tell you is that there are some plugins which can let the user define there own command:

http://wiki.codeblocks.org/index.php?title=Tools%2B_plugin

Does this fit your desire?

Also C::B has a build-in language called: http://wiki.codeblocks.org/index.php?title=Category:Scripting_Code::Blocks

You can put your custom command before or after you click the "build" command.

BTW: you can ask your original question in c::b forum, I think there are many advanced c::b users who can help you more.

geckon 2012-05-08 15:02

User-defined tool is OK for my needs, thanks!

Just.. Is it possible to add a button which would execute this user-defined tool?

geckon 2012-05-08 15:05

I mean a button which could be added to a toolbar so running of that tool would be possible "on one click".

Or is it at least possible to bind the tool to a keyboard shortcut?

ollydbg 2012-05-08 23:56

I have never use a custom tool button. So I can't tell about this feature.

But I do know there is a shout cut key plugin, which works nicely.

See: http://wiki.codeblocks.org/index.php?title=Keyboard_Shortcuts_plugin

geckon 2012-05-09 00:24

Thanks again (I must have been blind, because I looked in that menu today but I didn't see it).

I'll try to live with a shortcut. If it turns out to be too uncomfortable, I'll use the forum for my question. My "problem" seems to be solved here then. I guess this request can be closed (If you don't think this feature would be nice anyway).

ollydbg 2012-05-09 08:11

Ok, I close this thread.