I have try to create a Tools item like this:
$(CODEBLOCKS)\test.bat [[CompileOptionsBase().GetCompilerOptions();]]
and the content of test.bat is:
@echo off @echo %1
But the pop-up window does not show the compiler options but just say "echo is off".
I want the compiler options is because I am trying to create a clang-check item in Tools, clang-check need to know the current compiler options.
So, is there any way to do this?
Could NOT get yours to work; but, this did using the ToolPlus Plugin
Edit: Just got the echo message like you did with your command.
$(CODEBLOCKS)\test.bat [[ print(GetProjectManager().GetActiveProject().GetTitle()); ]]
Tim S.
$(CODEBLOCKS)\test.bat "[[ print(CompileOptionsBase().GetCompilerOptions()); ]]"This time I got:
Quote"(null : 0x00000000)"
Does CompileOptionsBase().GetCompilerOptions() work in my case ?
Likely you are doing something wrong.
Edit: As in you are using the wrong script command(s); I really have no idea what the right script command would be.
Edit2: I think it is likely you need to use GetStringFromArray in order to convert the compiler options into a thing usable by print; but, this is just a guess.
Please state what compiler options you wish to have in the output?
Global, Project, or Target?
Tim S.
If possible, I think it is better send all options to the .bat.
If the script can grap only one type option, I can use 3 scripts to send 3 type option as 3 parameters to .bat.
You'll have to probably use some kind of manager, then you'll have to get the current project, target, compiler then ask it to get all the options...
It won't be a single call for sure.
Quote from: oBFusCATed on September 21, 2014, 09:12:43 PM
You'll have to probably use some kind of manager, then you'll have to get the current project, target, compiler then ask it to get all the options...
It won't be a single call for sure.
Thanks for your reply. But the question for now is which script should be used in this case. The [[CompileOptionsBase().GetCompilerOptions();]] does not work .