Author Topic: Help Plugin Installation  (Read 13044 times)

Offline eoneuk

  • Multiple posting newcomer
  • *
  • Posts: 18
    • http://
Help Plugin Installation
« on: August 10, 2005, 04:20:41 pm »
How do I install the help plugin?  Searching produced no clearcut answer; perhaps I was looking in the wrong places.

I need simples steps: 1,2,3, etc.

Thanks for any assistance.

Ed


Offline AkiraDev

  • Multiple posting newcomer
  • *
  • Posts: 71
Re: Help Plugin Installation
« Reply #1 on: August 10, 2005, 05:07:07 pm »
Any plugin is comprised of at least two files: a .ZIP archive, and a DLL.
Usually, the .ZIP file contains any resources (graphics files and .XRC resources) that the plugin needs to run, while the DLL obviously is the actual plugin in itself.

($Codeblocks) refers to the directory where you installed C::B :

The .ZIP archive is to be placed in ($Codeblocks)/share/Codeblocks, while the .DLL goes to ($Codeblocks)/share/Codeblocks/plugins.

Now restart Code::Blocks, and there you go.

Shouldn't the question "How can I install new plugins into Code::Blocks?" be part of the FAQ anyway?

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Help Plugin Installation
« Reply #2 on: August 10, 2005, 07:12:38 pm »
1. Get the sources of the plugin.
2. Compile the plugin using one of the Code::Blocks project files (you'll need to get Code::Blocks SDK or compile it yourself).
3. Compress help_plugin.xrc to help_plugin.zip
4. Copy help_plugin.dll (which is located in codeblocks/src/devel/share/CodeBlocks/plugins/ if you got it from CVS) to your ($Codeblocks)/share/CodeBlocks/plugins/ folder.
5. Copy help_plugin.zip to your ($Codeblocks)/share/CodeBlocks/ folder.

Here, just like AkiraDev wrote, ($Codeblocks) refers to the directory where you installed Code::Blocks.

bungle

  • Guest
Re: Help Plugin Installation
« Reply #3 on: September 07, 2005, 02:54:39 pm »
Hi there, I am having problems compiling the help_plugin too.  I have followed the steps stated by Ceniza, and when I try to compile either of the help_plugin project files in C::B I get the error message:

Project   : Code::Blocks Help Plugin
Compiler  : GNU GCC Compiler (called directly)
Directory : C:\Program Files\CodeBlocks\src\plugins\contrib\help_plugin\
--------------------------------------------------------------------------------
Switching to target: help_plugin
Linking dynamic library: ..\..\..\devel\share\CodeBlocks\plugins\help_plugin.dll
C:\Program Files\CodeBlocks\bin\..\lib\gcc\mingw32\3.4.4\..\..\..\..\mingw32\bin\ld.exe: cannot find -lcodeblocks
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings

I get the same error if I try to compile the wxSmith plugin too.

I am running Win2K, C::B installed from binaries and updated to 1.0RC1-1 with the sdk folders copied out of the CVS.
I have successfully dowonloaded and compiled wxWidgets, so I know this thing works!!

Thanks in advance

STEVE

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Help Plugin Installation
« Reply #4 on: September 07, 2005, 03:13:44 pm »
If you got up there the plugins are being compiled, but fail to link. What you need is in the SDK, but the binary one you can get from here.

You could also try compiling Code::Blocks (so you'll get all the library files needed) or my binary snapshots which include the help_plugin.

bungle

  • Guest
Re: Help Plugin Installation
« Reply #5 on: September 07, 2005, 03:45:54 pm »
OK, I downloaded the SDK, extracted the contents into the directory
"C:\Program Files\CodeBlocks\src\sdk"
Now it compiles and creates the dll. I then have to zip the help_plugin.xrc to help_plugin.zip and place the 2 files into their correct directories.  As soon  as I do that, and try to restart C::B it creates an exit error dialog:

codeblocks.exe - Application error
The instruction at "0x60641252" referenced memory at "0x00000000". The memory could not be "read".

Where can I download your snapshots which include this plugin?? and will that need compiling too??

Thanks again

STEVE

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Help Plugin Installation
« Reply #6 on: September 07, 2005, 03:51:59 pm »
Quote from: bungle
Where can I download your snapshots which include this plugin?? and will that need compiling too??

Just click the link that says "Every now and then Code::Blocks CVS binary snapshots." at the end of any of my posts.

It won't need compiling but it doesn't include the wxSmith plugin. I'll have it in mind for the next release.

grv575

  • Guest
Re: Help Plugin Installation
« Reply #7 on: September 08, 2005, 11:17:56 pm »
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.

OK, I downloaded the SDK, extracted the contents into the directory
"C:\Program Files\CodeBlocks\src\sdk"
Now it compiles and creates the dll. I then have to zip the help_plugin.xrc to help_plugin.zip and place the 2 files into their correct directories.  As soon  as I do that, and try to restart C::B it creates an exit error dialog:

codeblocks.exe - Application error
The instruction at "0x60641252" referenced memory at "0x00000000". The memory could not be "read".

Where can I download your snapshots which include this plugin?? and will that need compiling too??

Thanks again

STEVE

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Help Plugin Installation
« Reply #8 on: September 08, 2005, 11:59:24 pm »
That's an easy problem, the plugin tries to load sources from XRC. All it has to do is add some nullchecks, and voila :) I think all plugins should check for the resources before loading.

grv575

  • Guest
Re: Help Plugin Installation
« Reply #9 on: September 09, 2005, 05:50:11 am »
Yes but do we trust the user to compile and setup plugins correctly?  A plugin which doesn't do NULL checks will crash codeblocks in this case...  I guess if we leave it up to the plugin author to do this then it just needs to be documented clearly how to install plugins and their resources in the plugin sdk.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Help Plugin Installation
« Reply #10 on: September 09, 2005, 07:08:12 am »
On init, pop up a box which says "You installed the plugins wrongly! Fix them bwwwd!!! :P " or something. More friendly of course.

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Help Plugin Installation
« Reply #11 on: September 10, 2005, 03:18:18 am »
"You installed this plugin incorrectly. Please click OK to stop removing random files from your system."

Make up your minds and tell me what you want it to do. A MessageBox? An exception? The crash?

Even more, whatever be decided should be the default behaviour we should implement for plugins lacking resource file.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Help Plugin Installation
« Reply #12 on: September 10, 2005, 09:52:47 am »
I believe an exception should be enough, either in the constructor or in OnAttach().
If everyone agrees on using exceptions, I 'll add a special exception class for CB and use this for throwing exceptions.
Be patient!
This bug will be fixed soon...

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Help Plugin Installation
« Reply #13 on: September 10, 2005, 02:52:43 pm »
Quote from: mandrav
If everyone agrees on using exceptions, I 'll add a special exception class for CB and use this for throwing exceptions.

I agree.

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: Help Plugin Installation
« Reply #14 on: September 10, 2005, 10:58:16 pm »
I believe an exception should be enough, either in the constructor or in OnAttach().
If everyone agrees on using exceptions, I 'll add a special exception class for CB and use this for throwing exceptions.
Sorry, but how does an exception looks like? (can't remember  :oops:)
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring