Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

How are the project files of CodeBlocks itself are created?

(1/2) > >>

sodev:
I'd like to know how the project files of CodeBlocks that you use to build CodeBlocks itself are created. I can't find any generator scripts in the source tree and there are quite a lot of project files present.

I ask because i want to build CodeBlocks against the latest wxWidgets SVN snapshot and they changed the version number to 3.1 and EVERY CodeBlocks project file defines the wxWidgets version number as local variable so i need to change a lot of files to change that. Also the latest wxWidgets Makefiles decorate the library output folders with the compiler version (if build using official build mode) so i need to adjust that as well.

Currently it looks like i need to do some mass search-and-replace over all the project files but i would prefer to just change some numbers in a generator script and just regenerate the project files :).

My second question is, has anyone tried to compile CodeBlocks with Visual Studio (preferrably 2013), does it work? Because i'd love to get rid of my GCC toolchain on windows ;).

MortenMacFly:

--- Quote from: sodev on January 10, 2014, 09:44:49 pm ---Currently it looks like i need to do some mass search-and-replace over all the project files but i would prefer to just change some numbers in a generator script and just regenerate the project files :).

--- End quote ---
Lucky you, I am currently pimping the ProjectOptiopnsManipulator plugin so that you can do so. It requires a compilation of this plugin by you, or you'll have to wait until the next nightly.


--- Quote from: sodev on January 10, 2014, 09:44:49 pm ---My second question is, has anyone tried to compile CodeBlocks with Visual Studio (preferrably 2013), does it work? Because i'd love to get rid of my GCC toolchain on windows ;).

--- End quote ---
There was a post recently from a user that was able to do so.

sodev:
Well, i take it the project files are handwritten :).

I'm always using the SVN snapshots so thats not a problem, however i don't know how your plugin can help in my case, i can add options, remove options, but not change (parts of) options, so i ran a search-and-replace over the files, that fixed it for me.

Compiling with Visual Studio seems to be more work than just changing the project files, i gave up when i had the usual problem that enabling unicode changed the generic WinApi methods to the wide char versions but the code still passed in narrow chars and that POSIX functions are preceeded with an underscore :(.

stahta01:

--- Quote from: sodev on January 14, 2014, 01:16:54 am ---Well, i take it the project files are handwritten :).

--- End quote ---

No, the project files are created by Code::Blocks.

It is strongly suggested to never edit the CB config or CB Projects with a text editor.

But, I do from time to time edit the patch files created to update CB Projects by hand to minimize the unneeded changes for what ever patch I submit.

Tim S.

sodev:
Well, thats what i mean with handwritten, i don't expect anyone uses a text editor to write the xml code himself :D.

The opposite that i am acutally using in my projects is that the project files get generated, i am using a modified PreMake version that is able to create CodeBlocks project files that use Visual Studio as compiler, a simple premake --target cb-vs11 and you get fresh new project files. There should be really support added for the 2012 and 2013 versions, but sadly the XML is not poweful enough to detect all the fancy SDK's but even with a compiled plugin its not easy to detect all the possible combinations like x32 or x64, Windows XP compatible SDK or not. However compiler option wise it is no big deal, you only need to specify /FS for parallel build with the 2013 version, otherwise all the 2010 switches are enough to get rolling the newer versions.

Want to compile with gcc? Just call premake --target cb-gcc? Need to change the library path of wxWidgets? Change 2 lines in the wxWidgets script and start PreMake again :).

Navigation

[0] Message Index

[#] Next page

Go to full version