I am trying to figure out how I can configure the "Run" button in C::B. I am setting up a compiler that outputs non-executable files, and C::B doesn't know how to handle them. These files need to be opened in another program, which is run from the command line. I have come up with one solution to this problem, but it has a few issues.
Here is how I initially solved the problem:
Create a new build target called "RunScript".
Set the compiler to "No Compiler".
Set the type to "Console application".
Uncheck "Auto-generate filename extension", and set the output filename to "RunButton.bat".
Create a new file called "RunButton.bat" (or whatever you entered as the output filename).
Whatever you put in "RunButton.bat" will now be executed when you click the run button.
I also created a new virtual target that contained my "RunScript" target, and my main target, so that I don't have to switch targets whenever I want to test my application.
While this method does work, it is not ideal, as it requires you to have two extra targets (including the virtual target that I made for convenience). I would rather be able to just have everything contained in one target.
One solution to this problem that I came up with, is to replace the console runner program that is used by code blocks. But this doesn't seem like the best solution. I honestly think that being able to configure launch scripts should be a built-in feature. Does anybody know how I can solve this problem? It has been giving me problems for days already.
Thanks.