User forums > Using Code::Blocks

Codeblocks build system and RPM

(1/2) > >>

72deluxe:
Hello all

I was just wondering with regard to Code::Blocks make system. It seems to work excellently within the program, but I was wondering how to make use of Code::Blocks build system when it comes to building an executable for an RPM. There doesn't seem to be any command line parameters that can be passed to Code::Blocks to do a build WITHOUT opening the main batch build log window. Have I not looked hard enough?
Ideally, it would be good for Code::Blocks to run without a GUI being created.

This doesn't seem to be an issue for building Windows setup programs (just dump everything that has been built into a ZIP and use NSIS), nor for the Mac (dump your executable into an applicationname.app directory and send along some meta data), but for Linux RPM building, it would be helpful to be able to build a Code::Blocks workspace/project file using the command line (not under X) in order to bundle an RPM.

Is this possible? Would anyone appreciate this implementing? I did have a look at the build system source file a while back but have forgotten - is it entirely dependent on wxBase or does it require wx GUI components? If dependent on wxGUI components, it would kill the ability to run entirely on the command line.

BTW, I'm finding the Code::Blocks system to be excellent on GTK+ and Mac (especially given the confusing many-windowed nature of XCode). Keep up the good work!
Apologies if I have missed something obvious.

oBFusCATed:
At the moment it is not possible to build something without X and unfortunately the X dependency is hard to remove. :(

72deluxe:
That's a shame. I suppose that the .cbp file (as it is just XML) could be parsed to extract the build options and flags and target compiler and in order to build a traditional makefile.

Alternatively, if the main frame is not created when doing a batch build from the command line, you could easily bypass the GUI creation and just use stdout to dump build messages. I will look into it!

Thanks anyway

oBFusCATed:
There is a cbMakefileGen plugin, that can create makefiles, but it is unmaintained and quite buggy :(

stahta01:
Another way might be to use Premake or CMake to create the Code::Blocks project.
Or, to use a Custom Makefile for your project.

Note: Premake makes real C::B projects; and, CMake make Custom Makefile projects the last time I checked.

Tim S.

Navigation

[0] Message Index

[#] Next page

Go to full version