Hi Everybody,
I was going through the Code::Blocks batch build files and have some improvements:
1. Instead of setting the variables only through the batch file, we should have an option of supplying them beforehand
:
Old code:
set CB_ROOT=C:\Devel\CodeBlocks
rem ------------------------------------------
rem Setup GCC root folder with "bin" subfolder
rem ------------------------------------------
set GCC_ROOT=C:\Devel\GCC46TDM
New code:
if not defined CB_ROOT set CB_ROOT=C:\Devel\CodeBlocks
rem ------------------------------------------
rem Setup GCC root folder with "bin" subfolder
rem ------------------------------------------
if not defined GCC_ROOT set GCC_ROOT=C:\Devel\GCC46TDM
This has the added advantage that these files can be used as-is by other build scripts by simply declaring the root dirs for cb, gcc, etc.
Most other options that are configurable should also be implemented this way.
2. Since these files are in the 'src' directory, they should be able to access update.bat and instead of this:
echo Do not forget to run "update.bat" after successful build!
goto TheEnd
we should use this:
echo Running update.bat ...
call "%~dp0update.bat"
goto TheEnd
This command to run update.bat should also be configurable ( as it is preferable to run it after a full compile - i.e. cb + plugins )
Forgive me for sounding too lazy, but I have a lack of time, limited computer access ( school is going on ) and full knowledge of tools like patch and diff blocking me from providing a patch.( Thanks to obfuscated for providing the link
EDIT: I was successfully able to create a patch. I was not sure where to post it though, here or on berlios so I will post it here for developers to review it before uploading it to berlios.
EDIT2: Patch updated for all scripts as of rev 8096 (conditional2.patch) and posted on berlios (PID: 003303)
Alakh