Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Inter-Plugin communication

<< < (2/3) > >>

byo:

--- Quote from: dmoore on June 11, 2007, 04:02:37 am ---thanks byo. I'll think about this approach.

now, In addition to dependencies between my own plugins I was planning to use the env vars plugin to allow the activation of environment variables for each "interpreter" action. Based on what byo is telling me this isn't possible??

--- End quote ---

This may be a problem. You could obtain pointer to plugin by calling
--- Code: ---PluginManager::Get()->FindPluginByName(<PLUGIN NAME>);
--- End code ---
It won't force C::B to load plugin's dll so it's safe but it won't work (on windows) because plugin's dll doesn't export EnvVars::GetProjectEnvvarSet and EnvVars::SetProjectEnvvarSet. Linker won't be able to link your plugin. And even if those symbols would be exported, your plugin would link to EnvVars dll so we have bad cross-plugin situation and it won't work :(.

Maybe it could be done through scripting system? (That's the way wxSmith communicates with ScriptedWizard plugin). But you will have to ask the maintainer of EnvVars plugin (MortenMacFly IIRC) to register few functions in scripting engine (I can help him because I've done it before ;) it's quite easy).

This cross-plugin linking problems should be fixed in future, but rather not before stable release :/

Regards
  BYO

dmoore:
thanks again byo.

morten, any thoughts?

dmoore:
bringing up this old thread again...

I've implemented a plugin structure that accesses a shared library along the lines that byo advocated:


--- Quote from: byo on June 10, 2007, 07:31:38 pm ---
plugin #1                      plugin #2
            \                     /
           uses                 uses
              \                /
              shared library (not a plugin)


--- End quote ---

I want to be able to deploy binaries of these plugins as .cbplugin files that the user can install from codeblocks. The question is how should I deploy the shared library? The shared library would normally be installed to the codeblocks binary directory (that's what byo does for the wxsmith plugins), but .cbplugin files won't deploy the binaries to that location. Can the shared library be installed to the plugins folder instead? (will it be found there??)

dmoore:
byo? mandrav? anyone? (see  previous post) i guess if my plugins become a part of contrib there won't be an issue, but it would be nice if they were individually deployable using the current cbplugin blobs.

thomas:

--- Quote from: dmoore on May 23, 2008, 04:15:59 pm ---The shared library would normally be installed to the codeblocks binary directory (that's what byo does for the wxsmith plugins), but .cbplugin files won't deploy the binaries to that location. Can the shared library be installed to the plugins folder instead? (will it be found there??)
--- End quote ---
It will work if you load the library using LoadLibrary or the corresponding wxWidgets wrapper function and if you provide a full pathname. Configmanager::GetFolder(sdPluginsGlobal) should help you to figure out the full path.

Otherwise, the OS will look in its library path, whatever that may be, and will bail out. The Code::Blocks plugin folder is almost guaranteed to be not in the OS library path (except if a user explicitely added it, but why would anyone).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version