Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: Pecan on June 05, 2007, 05:45:21 pm

Title: Problem Installing new .plugin on linux
Post by: Pecan on June 05, 2007, 05:45:21 pm
I get the following error when using "install new" on linux ubuntu 7.04 SVN  3987.

(http://img184.imageshack.us/img184/155/177to1.png)

The commands to build the .cbplugin were:
(http://img184.imageshack.us/img184/8952/178ph3.png)

and the contents of the .cbplugin is:
(http://img184.imageshack.us/img184/4025/179ed7.png)

Why does CB expect browsetracker.so instead of libbrowsetracker.so ?
Title: Re: Problem Installing new .plugin on linux
Post by: killerbot on June 05, 2007, 05:50:45 pm
be careful with the cases, see somewhere a sticky post of mine in the forums, on what to do for plug-ins and their CamelCase-d names, aswell as manifest files, makefiles, etc ...

EDIT : http://forums.codeblocks.org/index.php/topic,4290.0.html
Title: Re: Problem Installing new .plugin on linux
Post by: Pecan on June 05, 2007, 05:54:11 pm
be careful with the cases, see somewhere a sticky post of mine in the forums, on what to do for plug-ins and their CamelCase-d names, aswell as manifest files, makefiles, etc ...

EDIT : http://forums.codeblocks.org/index.php/topic,4290.0.html

That not the problem.
Look at the contents of the .cbplugin and error message.

wait...
Oh... is the manifest supposed to have "libbrowsetracker.so"
Title: Re: Problem Installing new .plugin on linux
Post by: killerbot on June 05, 2007, 06:00:51 pm
no : manifest : just the name and title
Title: Re: Problem Installing new .plugin on linux
Post by: Pecan on June 05, 2007, 06:05:53 pm
Since the plugin name is libbrowsetracker.so, what's the "plugin name=" supposed to contain. I've tried all combinations I can think of.


Code
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_plugin_manifest_file>
    <SdkVersion major="1" minor="11"  release="11" />
    <Plugin name="libbrowsetracker.so">
        <Value title="browsetracker" />
        <Value version="0.1" />
        <Value description="Browse to previous source positions" />
        <Value author="Pecan Heber" />
        <Value authorEmail="" />
        <Value authorWebsite="" />
        <Value thanksTo="" />
        <Value license="GPL" />
    </Plugin>
</CodeBlocks_plugin_manifest_file>

Title: Re: Problem Installing new .plugin on linux
Post by: killerbot on June 05, 2007, 06:12:32 pm
no no your plugin name  is not lib....so

Read carefully my sticky post, choose a name and consistently reuse/apply it in the other parts (dll/so/zip/....)
Title: Re: Problem Installing new .plugin on linux
Post by: Pecan on June 05, 2007, 06:23:03 pm
I've read your post about consistences.

I've simplified the .cbplugin as
(http://img520.imageshack.us/img520/3848/180zo1.png)

with the following manifest:
Code
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_plugin_manifest_file>
    <SdkVersion major="1" minor="11"  release="11" />
    <Plugin name="browsetracker">
        <Value title="browsetracker" />
        <Value version="0.1" />
        <Value description="Browse to previous source positions" />
        <Value author="Pecan Heber" />
        <Value authorEmail="" />
        <Value authorWebsite="" />
        <Value thanksTo="" />
        <Value license="GPL" />
    </Plugin>
</CodeBlocks_plugin_manifest_file>

It still gets the same message "browsetracker.so" cannot be found as posted earlier.

I don't know what else can be done. I believe there is a bug on CB linux.

I've tried:
browsedtracker
browsetracker.so
libbrowsetracker.so

None of them work.
Title: Re: Problem Installing new .plugin on linux
Post by: David Perfors on June 05, 2007, 06:33:09 pm
it's because the plugin is called browsetracker. C::B will get load the file browsetracker.so/.dll when it is loading the plugin. It should have the same name as de .cbplugin file
Title: Re: Problem Installing new .plugin on linux
Post by: Pecan on June 05, 2007, 06:37:09 pm
it's because the plugin is called browsetracker. C::B will get load the file browsetracker.so/.dll when it is loading the plugin. It should have the same name as de .cbplugin file

I dont understand.
The .cbplugin's name is browsetracker.cbplugin
The plugin's name is libbrowsetracker.so
The zip's name is browsetracker.zip
The manifest plugin name="browsetracker"

What are you saying is wrong.
Title: Re: Problem Installing new .plugin on linux
Post by: Pecan on June 05, 2007, 06:39:07 pm
Ok, there's a bug somewhere.

I opened up the .cbplugin and manually copied libbrowsetracker.so and browsetracker.zip to .../plugins and .../codeblocks

It works.

It's the .cbplugin loading that's got the problem on linux.
The install process does not understand that "lib" should be prepended to the manifest plugin name.
Title: Re: Problem Installing new .plugin on linux
Post by: Pecan on June 05, 2007, 08:25:44 pm
I finally got it to install by renaming browsetracker.cbplugin to libbrowsetracker.cbplugin.

Is that the way it should be? or is this a bug?
Title: Re: Problem Installing new .plugin on linux
Post by: David Perfors on June 05, 2007, 11:42:13 pm
that is what I was trying to say.. the name of the .so file should be the same as the name of the .cbplugin file :) so if you don't want to use the lib at front of the plugin name, don't link it that way.
Title: Re: Problem Installing new .plugin on linux
Post by: Pecan on June 05, 2007, 11:45:39 pm
that is what I was trying to say.. the name of the .so file should be the same as the name of the .cbplugin file :) so if you don't want to use the lib at front of the plugin name, don't link it that way.

Thanks. I just didn't understand.

Finally figured it out by trial and error.
Title: Re: Problem Installing new .plugin on linux
Post by: killerbot on June 05, 2007, 11:50:56 pm
how do the other plugins do this ?

compiler, debugger, keybinder, copystrings, ...  ?

do they do the same trick ??
Sorry I don't have time to help investigate, doing nightly live tests in a tunnel in France ;-)
Title: Re: Problem Installing new .plugin on linux
Post by: Pecan on June 05, 2007, 11:54:37 pm
how do the other plugins do this ?

compiler, debugger, keybinder, copystrings, ...  ?

do they do the same trick ??
Sorry I don't have time to help investigate, doing nightly live tests in a tunnel in France ;-)

They don't do it. They don't use .cbplugin files.

Their .cbp files write directly to .../codeblocks/plugin/whateverplugin.so and .../codeblocks/whateverplugin.zip


The .cbplugin files are for plugins that are not part of the contribs.
Title: Re: Problem Installing new .plugin on linux
Post by: killerbot on June 06, 2007, 12:28:45 am
so it's a bug or shortcoming in the cbplugins :

Since I would say all the rest should be identical like the core and contribs

Quote
<Plugin name="Compiler">
        <Value title="Compiler" />

Quote
lib_LTLIBRARIES = libcompiler.la

Title: Re: Problem Installing new .plugin on linux
Post by: Pecan on June 06, 2007, 12:35:12 am
so it's a bug or shortcoming in the cbplugins :

Since I would say all the rest should be identical like the core and contribs

Quote
<Plugin name="Compiler">
        <Value title="Compiler" />

Quote
lib_LTLIBRARIES = libcompiler.la



Well... forcing unix to use libWhatEver.cbplugin surely tags it as a unix plugin.

Whereas MSWindows uses only WhatEver.cbplugin .

I can live with that. I just didn't know it worked that way. It only took 3/4 day to figure it out. :shock: