Author Topic: Code::Blocks auto build script  (Read 4053 times)

Offline hl2gordon

  • Single posting newcomer
  • *
  • Posts: 6
Code::Blocks auto build script
« on: June 14, 2012, 10:24:34 am »
I am a student and use Code::Blocks actively for C++ development and I recently joined these forums. I have been working on an automated batch build script for c::b in windows which I use for building svn builds, and which I would like to share with you guys  :).

I would also like to gather the opinion of the developers on the idea of having a build environment like mozilla (except the msys shell) which would be containing all tools necessary to compile c::b (except the compiler) and set up an environment for c::b building.

(FYI the script is still WIP and i haven't created documentation. However you can open the .bat file in a text editor to see its internal workings.)

Alakh

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5218
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Code::Blocks auto build script
« Reply #1 on: June 14, 2012, 10:39:36 am »
I just briefly read your script, sounds good.
It looks like your script is an extension of the exist ones like in the trunk:
Code: [Select]
codeblocks/trunk/src/batch_build_core.bat
codeblocks/trunk/src/batch_build_plugins.bat
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline hl2gordon

  • Single posting newcomer
  • *
  • Posts: 6
Re: Code::Blocks auto build script
« Reply #2 on: June 14, 2012, 01:19:25 pm »
I went through those batch files you mentioned. I didn't notice them before - but mine was built separately and not as an extension to these or I would have incorporated them. And what are your thoughts on the build system? I think it's good to unify most tools and distribute them as a single package and provide some batch files to simplify building, like automated build and installer generation. It would be very useful for the people who build the nightly.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5218
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Code::Blocks auto build script
« Reply #3 on: June 15, 2012, 06:00:32 am »
what are your thoughts on the build system? I think it's good to unify most tools and distribute them as a single package and provide some batch files to simplify building, like automated build and installer generation. It would be very useful for the people who build the nightly.
Your work is great! I personally do not run batch build, because I always use the nightly build. :), I build c::b mainly for testing and tracking bugs.

I think this batch file is especially useful for the release builders. @Killerbot, what's your options.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Calexus

  • Multiple posting newcomer
  • *
  • Posts: 48
Re: Code::Blocks auto build script
« Reply #4 on: June 19, 2012, 03:19:21 pm »
I remember someone made something like this for osx (leopard?) about a year ago. Don't remember who it made the scripts but that was a really nice and simple way to build codeblocks. I don't believe the scripts still work for building the current trunk, but they are somewhere in the forum if you need some inspiration.