In the past I used to use Visual Studio with large workspaces/many projects with interdependencies. We always did the nightly build as command line builds without IDE GUI, using the workspace file. Something similar would be nice with Code::Blocks in my opinion.... as Code::Blocks is now my preferred IDE

It won't work in the foreseeable future, though. The application uses wxWidgets components which depend on other components that require the whole GUI stuff. While it is theoretically possible to build wxWidgets without GUI, it is not possible to build Code::Blocks with such a build.I remember we tried (maybe 2 years ago) to implement a console-only mode with normal wxWidgets linkage that simply didn't create any windows, hoping it might just work. However, this was not successful. I forgot the actual reason why it didn't work, but the complications were of such nature that we dropped the idea entirely.

Logged

"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

It won't work in the foreseeable future, though. The application uses wxWidgets components which depend on other components that require the whole GUI stuff. While it is theoretically possible to build wxWidgets without GUI, it is not possible to build Code::Blocks with such a build.I remember we tried (maybe 2 years ago) to implement a console-only mode with normal wxWidgets linkage that simply didn't create any windows, hoping it might just work. However, this was not successful. I forgot the actual reason why it didn't work, but the complications were of such nature that we dropped the idea entirely.

I realise the original poster asked for a build without GUI, and I appreciate that it may not be easy to do.

However, there are situations such as this where it would be desirable to run C::B as if it was a console application, even though it is obviously a full-blown GUI application. I just did a small experiment using a wxWidgets dialog based GUI app, to see if I could make it behave like a console application when command line parameters were provided, and I could do it quite easily. I realise the code below is Windows only, but I imagine it wouldn't be impossible to do the same thing on Linux?

}So what you have above, is a small example of a wxWidgets GUI application that behaves as a GUI application when no command line parameters are present, and as a console application when command line parameters are present. Obviously, it could be made to react to a certain command line parameter for console mode use.

So a suggestion might be to consider this technique for the standard C::B GUI build, so that we could build workspaces from the command line without starting the GUI.

Again, I realise this may be slightly different that what the OP asked for, but anyway.

The trick is using the unpopular wxEntryStart and wxEntryCleanup() functions (of course, if you don't have a wxApp, you won't be able to rely on the wxWidgets event handling, which is the tricky part). Once you make an application object that is not a subclass of wxApplication, everything is smooth.

steedhorse

In my opinion, although it might be hard to implement, it is a very important feature that we can build project or workspace from raw character console device.Otherwise, we often have to use other tools, such as automake to set up another set of configurations to be used in daily build server.But I have get used to get everything done in C::B: define projects dependencies, define and use variables, set up pre-build and post-build steps, configure include and lib paths....... It's a misery to repeats all these using automake.:-(

If the using of wx of current C::B makes it hard to accomplish this, I think at least we can set up another separated small sub-project, using no wxWidget stuffs, just a console app that parse .cbp or .workspace files, extracting all configurations, and then do what should be done accordingly.I really need this feature.

If the using of wx of current C::B makes it hard to accomplish this, I think at least we can set up another separated small sub-project, using no wxWidget stuffs, just a console app that parse .cbp or .workspace files, extracting all configurations, and then do what should be done accordingly.I really need this feature.

I was just wondering what plug-ins do you think should be able to work with an command-line only Code::Blocks?Compiler is needed, but the others are questionable.

kgb98egr

I am new to codeblocks and am trying to use it as the IDE for our developers who work on code that has automatic nightly builds. Your tool cbp2mak could be useful. Could I get a copy of your code and readme.txt?

In your last post you say code is attached, but I don't see how to get it.