Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: Alpha on February 27, 2012, 04:20:48 am

Title: Code Snippets post build steps
Post by: Alpha on February 27, 2012, 04:20:48 am
Is there any reason Code Snippets tries to run update.bat - albeit unsuccessfully - as a post build step (on Windows) during the compilation of contrib plugins?
Title: Re: Code Snippets post build steps
Post by: ollydbg on February 27, 2012, 06:36:57 am
I think it's a bug to add "update.bat" in codesnippets.cbp file.
Title: Re: Code Snippets post build steps
Post by: Jenna on February 27, 2012, 08:18:19 am
I think it's a bug to add "update.bat" in codesnippets.cbp file.
No, it's not.
Several contrib-plugins have their own update[.bat]-script to run all post-build-steps through one file.
It's easier to test and to maintain.

These plugins do not run C::B's core update[.bat]-script !
Title: Re: Code Snippets post build steps
Post by: ollydbg on February 27, 2012, 08:24:49 am
I think it's a bug to add "update.bat" in codesnippets.cbp file.
No, it's not.
Several contrib-plugins have their own update[.bat]-script to run all post-build-steps through one file.
It's easier to test and to maintain.

These plugins do not run C::B's core update[.bat]-script !
Oh, thanks. (I was not aware of that :))
Title: Re: Code Snippets post build steps
Post by: Pecan on February 27, 2012, 12:26:50 pm
Is there any reason Code Snippets tries to run update.bat - albeit unsuccessfully - as a post build step (on Windows) during the compilation of contrib plugins?

Specifically, to create the folders that may not exits.
Is there a reason you say it's unsuccessful. It works here.

Code
Output size is 10.37 MB
Running project post-build steps
update.bat
Process terminated with status 0 (1 minutes, 29 seconds)
0 errors, 1 warnings (1 minutes, 29 seconds)
 
Title: Re: Code Snippets post build steps
Post by: Alpha on February 27, 2012, 11:31:35 pm
These plugins do not run C::B's core update[.bat]-script !
Is there a reason you say it's unsuccessful. It works here.
Sorry, I had gotten confused reading the log output (or lack thereof :) > nul 2>&1).  If it is unwanted to have the commands themselves in the post build steps:
Code
$(CMD_RM) ..\..\..\output\share\CodeBlocks\plugins\codesnippets.exe
zip -j9 ..\..\..\devel\share\CodeBlocks\codesnippets.zip manifest.xml
$(CMD_MKDIR) ..\..\..\devel\share\CodeBlocks\images\codesnippets
$(CMD_CP) .\resources\*.png ..\..\..\devel\share\CodeBlocks\images\codesnippets\
$(CMD_MKDIR) ..\..\..\output\share\CodeBlocks\images\codesnippets
$(CMD_CP) .\resources\*.png ..\..\..\output\share\CodeBlocks\images\codesnippets\
then perhaps it would be useful to add an explanatory echo to the beginning of the update.bat (for example echo Copying resources) to prevent unnecessary reports from people like me.