User forums > Using Code::Blocks
rebuiding entire workspace from the command line
VincentB:
Just to say that this does not seem to work any longer with SVN 3677. There seems to be a regression.
Also CB crashes when the worspace name is incorrect. Finally the help site still does not indicate how to set the workspace/project name in the command line, I will edit it with the Wiki based on your message, assuming that this is the expected behaviour.
Please see the message that I have replied to Mr Tobiaslohe on another topic.
--- Quote from: VincentB on March 12, 2007, 04:51:54 pm ---Hello,
I am a newcomer to CodeBlocks, and I have a similar problem as Mr tobiaslohe. I would like to set the workspace in the command line when launching codeblocks in order to compile my workspace from an MS DOS batch, or from a Visual Basic Script, or from any kind of shell script.
I could not find the relevant information either in the help site http://wiki.codeblocks.org/index.php?title=Command_line_arguments
My nightly build is svn 3677 (March 8th 2007, 23:18:02 -wx2.6.3).
I am using Windows XP, and MinGW on top of MSYS.
Could anyone tell me if this is supported (If not I can report a bug on the Berlios site)
My command line is :
codeblocks --no-splash-screen --target="Release" --personality="Lite" --rebuild myworkspace.cbp > compile.log
The content of compile log is after this line execution :
Nothing to be done.
Nothing to be done.
Nothing to be done.
Also, I noticed that when the filename/filepath & name myworkspace.cbp is incorrect, I get a notification "The project does not exists" twice, and then codeblocks crashes.
By the way it would be nice if the the indication of codeblock build was possible to cut and paste from the Menu help->about, that would be easier than copying it to this message by hand for lasy ones like me 8)
Very best regards,
Vincent.
--- End quote ---
VincentB:
Just to say that I have updated http://wiki.codeblocks.org/index.php?title=Command_line_arguments based on the information from Mr Mandrav's post 3603 December 05, 2005, 09:44:46 AM.
I hope that my message is not going to be overlooked as this discussion happened more than one year ago.
Best regards,
Vincent.
MortenMacFly:
--- Quote from: VincentB on March 12, 2007, 04:51:54 pm ---My command line is :
codeblocks --no-splash-screen --target="Release" --personality="Lite" --rebuild myworkspace.cbp > compile.log
Also, I noticed that when the filename/filepath & name myworkspace.cbp is incorrect, I get a notification "The project does not exists" twice, and then codeblocks crashes.
--- End quote ---
That is truly a bug. The reason is that in compilergcc.cpp in int CompilerGCC::Clean(const wxString& target) the line:
--- Code: ---clean = dc.GetCleanSingleFileCommand(Manager::Get()->GetEditorManager()->GetActiveEditor()->GetFilename());
--- End code ---
crashes because Manager::Get()->GetEditorManager()->GetActiveEditor() returns NULL. Will fix that in a minute... Thanks for spotting this.
With regards, Morten.
Edit: Fixed in SVN.
VincentB:
Dear Mr MortenMacFly,
Thank you for your quick and kind answer. May I ask some additional questions :
1) Is your correction only for preventing CB from crashing when the project/workspace filename is incorrect, or is it also going to solve this that I get no rebuild from command line even with a correct filename ?
2) Have you checked that my update on http://wiki.codeblocks.org/index.php?title=Command_line_arguments is correct, I would really hate to have produced incorrect information on this page.
3) Are you to anounce on this forum when the fix is done, so that I can download the nightly build at this moment only.
Very best regards,
Vincent.
MortenMacFly:
--- Quote from: VincentB on March 13, 2007, 08:49:13 am ---1) Is your correction only for preventing CB from crashing when the project/workspace filename is incorrect, [...]
--- End quote ---
Only for that part.
--- Quote from: VincentB on March 13, 2007, 08:49:13 am ---2) Have you checked that my update on http://wiki.codeblocks.org/index.php?title=Command_line_arguments
--- End quote ---
Yes, this seems to be correct.
--- Quote from: VincentB on March 13, 2007, 08:49:13 am ---3) Are you to anounce on this forum when the fix is done, [...]
--- End quote ---
Did that already for the part above.
Anyway - The command line e.g. D:\Devel\CodeBlocks_Devel\codeblocks.exe --no-splash-screen --target="Release" --rebuild MyCon.cbp >_ works very well for me - it is indeed a re-build that gets triggered. However, there is a message popping up "Project already exists in workspace" which is another bug (and prevents *any* batch-build from being issued until the message is acknowledged, which is *bad*). BTW: This also happens for DDE (click on a .cbp file in the explorer). Will have a look into that...
With regards, Morten.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version