Compile Code::Blocks plugins based on a nightly

From Code::Blocks
Revision as of 20:10, 22 August 2012 by MortenMacFly (talk | contribs)

UNDER CONSTRUCTION

So, you don't want to compile wxWidgets or Code::Blocks core but still want to be able to modify a certain plugin (for example) and use the modified plugin in your favourite nightly? Its possible. Here is what you need:

  • The wxWidgets sources (!) - no need to compile them, just download from here.
  • A nightly of your choice, download from [/index.php/board,20.0.html here].
  • The Code::Blocks sources in the revision the nightly is based on from here. You usually get these, if you issue a
 svn checkout svn://somepath@1234 working-directory

For example, to checkout trunk at revision 8150 into the folder you are currently in, issue:

 svn checkout svn://svn.berlios.de/codeblocks/trunk@8150
  • The sources of the plugin / component you want to change should be included in this checkout, you can (however)) update the specific folder to SVN HEAD, if you like.

One note: This surely only works, if the SDK version is compatible to the plugin. What won't work is, if the plugin makes use of SDK methods not available in the SDK version the nightly is based on.

Now comes the "hard" part: You'll need to adjust the plugin's project file, so it links against the DLL's from the nightly (yes, MinGW can do so!) instead of the import libraries you usually compile.

Do the following:

  • Goto the plugin's build options
  • Goto linker settings
    • change the wxmsw28$(WX_SUFFIX) part to become "wxmsw28u_gcc_cb.dll" (the one shipped with the nightly)
    • change the codeblocks part to become "codeblocks.dll" (the one shipped with the nightly)
  • Goto the "search directories" settings
    • change the compilers C::B related include directories (usually setup relative, like ..\..\..\include) to point to the equivalent path's where you checked out the C::B sources
    • change the compilers wxwidgets related include directories (usually setup like $(#WX.INCLUDE)) to point to the equivalent path's where you extracted the wxWidgets sources, or (in case of global variables like here), just adjust the global compiler variables (GCV's).

Note that you might need to do this at project and target level - depending on how the plugin is setup.