Hi, I have a build target named "MakePackage", in this target, I select its type is "command only".
In the pre-build or post-build script, I wrote the command like:
cmd /c MakePackageRelease.cmd
With this command, I just copy all the exes and dlls to a specified folder.
I used this for a long time. But with the recent SVN C::B, I see this function does not work, because when I click the "run" button of the target, it will prompt
[Window Title]
codeblocks.exe
[Content]
You must select a host application to "run" a commands-only target...
[OK]
Which means I have to specify a host program?
So, I believe this is a regression. :)
Then, should the Run button be disabled always for Command only targets?
I think for a command only targets, when I build this target, it just run some commands.
What is the result of the running commands, maybe it generate an exe file? In this case, "Run" button is needed.
In-fact, I have other minor issues about the "command only targets", I see that the "Search directories" in the Build option is disabled. Which means if I have a to add some code in my command to add a directory to the PATH variable when I "Build" the target. I'm not sure you understand this, I mean in normal Console or GUI targets, the "Linker's search directories" is automatically added to the PATH when I "Build" or "Run" the targets. But currently I can't edit that field.
This is a example cmd(named AAA.cmd), the contents are like below:
@echo off
set "current_path=%~dp0"
set "new_path1=%current_path%lib"
set PATH=%new_path1%;%PATH%
start "" /wait "C:\Program Files (x86)\AAAAA\ABC.exe"
Then I have put the below code in the "pre or post build steps" in the command only target's build options.