At the moment I'm playing around with a first version of the proposed SCM plugin, just to get a feel how to write a C::B plugin.
I used the wizard to create a generic plugin, checked all the boxes and: WOW! Got a plugin.
After looking at some of the other plugins I managed to add a SCM menu in the main menu bar, the context menu's for the different locations and a settings panel which saves and reads settings using the ConfigManager . The toolbar I need to look at, don't know if it is needed, but as I understand it now, is that it should give a panel in the Messages window, like the build log and build messages. Guess we will need it to produce the output from the SCM system invocation.
But to get to the point, invoking Settings->Environment produces an unhandled exception caused by a read.
I'm building with svn 3791, mingw with gcc 3.4.2 and wxWidgets 2.8.4. All build on my xp box, as unicode.
When I link the debug version of my plugin against wxmsw28u_gcc_custom.dll, all is well. But when I link against wxmsw28ud_gcc_custom.dll, as should be done, as it is a debug version, I get a nice crash when I try to open Settings->Environment.
Seems that something is checked in the debug version of wxWidgets and that it isn't right. My guess is an assert on a null pointer. Don't know if this is a know issue or that I'm making some mistake in my settings.
I have a problem with loading the bitmap for the panel in the Environment view, so I think that in the debug version wxWidgets checks for a valid bitmap, but as the creation of the bitmap failed, it is a null pointer and it asserts on it.
Any help is welcome, it might be fixed when the bitmap is correctly loaded.
I have the following in the header of the cbConfigurationPanel class for the basename, the class is managed by wxSmith without xrc:
virtual wxString GetBitmapBaseName() const
{
return _T("codeblocks-scm");
}
The bitmaps are included in the .cbplugin zip to install it, with the same name as stated above. The following is put into SCM.cbplugin:
Running project post-build steps
zip -j9 SCM.zip manifest.xml
updating: manifest.xml
(188 bytes security) (deflated 52%)
zip -j9 SCM.zip codeblocks-scm.png codeblocks-scm-off.png
updating: codeblocks-scm.png (188 bytes security) (stored 0%)
updating: codeblocks-scm-off.png (188 bytes security) (deflated 4%)
zip -j9 SCM.cbplugin SCM.dll SCM.zip
updating: SCM.dll
(188 bytes security) (deflated 81%)
updating: SCM.zip (188 bytes security) (deflated 2%)
So far I'm pleased with the progress and must say I like the way how things work, including creating the panel with wxSmith. It's a bit different than most other resource editors, but once you get it, it is a very nice way to make them.
If needed I can send the source, but it is MSW only atm.
Thx in advance for a solution.