Author Topic: Help Plugin Installation  (Read 8293 times)

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Re: Help Plugin Installation
« Reply #15 on: September 12, 2005, 04:43:02 am »
Quote from: mispunt
Sorry, but how does an exception looks like? (can't remember :oops:)

Code: [Select]
if (LoadXMLResource(bleh) == FAILED)
{
  throw cbPluginError("Couldn't load resource file... please reboot your system");
}

That's just an example of how it would look in the ctor or the OnAttach() method in the plugin.

The code that loads the plugin would be something like:

Code: [Select]
try
{
  LoadPlugin(thePlugin);
  // ...
}
catch (cbPluginError &error)
{
  // What to do when the error is catched
}

Offline bungle

  • Single posting newcomer
  • *
  • Posts: 3
Re: Help Plugin Installation
« Reply #16 on: September 12, 2005, 09:48:08 am »
That's what I got (memory access violation)  when the zip and plugin dll resources were not in the correct directory.   The plugin should probably be more fault tolerant here when it load, the resources, or even better add failsafe code (like try catch I around the plugin loader code.

AHH,  if the zipped xrc and dll files are not in the correct directories, where should they be?  When I compiled them they were nowhere near where the other plugin files are, so I just moved the 2 files into the same directories as the others.
When compiled the files were in:-
help_plugin.zip in C:\Program Files\CodeBlocks\src\devel\share\CodeBlocks
help_plugin.dll in C:\Program Files\CodeBlocks\src\devel\share\CodeBlocks\plugins

help_plugin.zip moved to C:|program files\codeblocks\share\codeblocks
help_plugin.dll moved to C:|program files\codeblocks\share\codeblocks\plugins

If this can be solved by simply moving the files that would be good.
Thanks in advance
STEVE