[Github-comments] [geany/geany] Plugin API extension request: execute build command directly (#1897)

LarsGit223 notifications at xxxxx
Sun Jul 15 13:28:15 UTC 2018


I am actually working on issue/feature request https://github.com/geany/geany-plugins/issues/733.

I extended the workbench plugin and now it allows to create global and projects commands, to store the values in the projects and workbench file and to inherit global workbench commands to the projects. This are all workbench internal functions.

When it comes to actually execute a command I planned to use ```build_set_menu_item()```, ```build_activate_menu_item()``` and to introduce a new build source called ```GEANY_BCS_PLUGIN```. But just adding a new build source is not doing the job. I guess ```build_activate_menu_item()``` is simply ignoring a new value.

Also, the workbench plugin maintains several projects and that would mean to re-write the commands each time by calling ```build_activate_menu_item()```. And the functions doesn't seem to free old values by itself.

I came to the conclusion that for my approach (and maybe for other plugins) it might be more suitable to have a direct plugin call like
```
build_execute_command(BUILD_TARGET_COMPILER, command, workingdir);
```
The first parameter given should tell if the command output goes to the "Compiler" message window. An alternative value would be BUILD_TARGET_NEW_TERMINAL which means start a terminal and run the command in it. This seems to be what the groups ```GEANY_GBG_FT```  /```GEANY_GBG_NON_FT``` and ```GEANY_GBG_EXEC``` do today.

The API call should work in a Fire&Forget manner: parameters ```command``` and ```workingdir``` should be copied (if necessary). Then run the command as described above and once finished simply forget about ```command``` and ```workingdir```.

What do you think?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1897
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20180715/d1b4d009/attachment.html>


More information about the Github-comments mailing list