Author Topic: ShellExtensions on Linux  (Read 5558 times)

Offline raybert

  • Multiple posting newcomer
  • *
  • Posts: 21
ShellExtensions on Linux
« on: March 01, 2009, 11:04:52 pm »
Hi,

I've been trying to get the ShellExtensions plugin working on Linux (Fedora 8 ) but so far it hasn't worked.

I've managed to get it to compile successfully but c::b doesn't load it (I'm not certain how to install it, which may be the problem).

I checked-out rev 116 of the source from SVN (svn://svn.berlios.de/cbilplugin/trunk) which is apparently the correct revision for c::b 8.02 according to this page: <http://developer.berlios.de/project/shownotes.php?release_id=14501>.

I used the c::b SDK from the F8 repos (codeblocks-devel-8.02-3.fc8) which seems to place its files in places that the SE project wasn't expecting (based on its use of #cb).  I modified the paths in the project build options and everything built without error.  The resulting files were: "libshellextensions.so", "se-common.so", "ShellExtensions.zip".

I've tried several combinations of locations to install these files to under both "~/.codeblocks" and "/usr/share/codeblocks" + "/usr/lib/codeblocks" but c::b doesn't seem to recognize it.

I did have some success getting c::b to recognize an earlier build under these dirs (but it was the wrong version and I didn't realize it at the time).

Any help would be greatly appreciated.

Thanks!

~ray

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: ShellExtensions on Linux
« Reply #1 on: March 02, 2009, 04:55:47 am »
I've recently split this plugin into two: FileManager and PowerShell. I've ceased work on the ShellExtensions plugin. see http://forums.codeblocks.org/index.php/topic,10060.0.html

the project files for these plugins (and the original ShellExtensions plugin) were set up to build against the Code::Blocks built from sources rather than a binary package.

If instead of building against source you want to build against C::B 8.02 binaries:

1. you will need to get the headers. the best way is to checkout the tagged 8.02 sources:
Code
svn checkout http://svn.berlios.de/svnroot/repos/codeblocks/tags/8.02

and make the project include directories point to them (you can obviously use global variables but don't need to.)
2. Then you need to link against the code::blocks libs from your specific binary package: codeblocks and wxscintilla by adding the appropriate directories to the project linker paths.
3. Install locations:
libse-common.so -> same place a libcodeblocks.so
libShellExtensions.so (or libFileManager.so or libPowerShell.so) -> same place as other plugins (typically /usr/lib/codeblocks/plugins or /usr/share/codeblocks/plugins)
ShellExtensions.zip (or FileManager.zip or PowerShell.zip) -> /usr/share/codeblocks

NB: the newer FileManager and PowerShell plugins no longer build libse-common.so
« Last Edit: March 02, 2009, 04:57:42 am by dmoore »

Offline raybert

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: ShellExtensions on Linux
« Reply #2 on: March 02, 2009, 08:05:36 am »
Hi,

Thanks for the reply.

I've changed tactics tonight.  I checked-out the CB source (r5456) and built it.  It was pretty painless so I'm probably going to stick with that (rather than 8.02).

I checked-out the FileManager source using the svn link in your linked-to message.  I put it under plugins/contrib, as you instructed.

Question: Do you have it integrated with the CB build yet or should I be using CB to build it?

I tried to integrate it with the CB build by hacking the AM files.  Unfortunately, I don't know AM very well. :)  I used IncrementalSearch as a model for this and it seems okay.  FM failed to build initially because it was missing the include path for gnome vfs.  I hacked that by adding $(shell pkg-config --cflags gnome-vfs-2.0) to the Makefile.  (I'm sure there's a better way to do that; got to get up to speed an AM one of these days...)

Anyway, I got it to build and install but CB won't load it (built for different version of SDK... ?).  I know it built against the CB that I built because I uninstalled all RPMs before attempting to build.  CB also won't load two other contrib/plugins for the same reason (two of the wxsmith plugins).

Any idea what I might be doing wrong?

Thanks again,

~ray


PS: There appears to be an error in the CB BUILD file; this:

    ./configure --enable-contrib

apparently should be this:

    ./configure --with-contrib-plugins=all

Offline raybert

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: ShellExtensions on Linux
« Reply #3 on: March 02, 2009, 08:17:59 am »
I just noticed this in the CB log:

/usr/local/lib/codeblocks/plugins/libFileManager.so: not loaded (missing symbols?)
/usr/local/lib/codeblocks/plugins/libwxsmith.so: not loaded (missing symbols?)
/usr/local/lib/codeblocks/plugins/libwxsmithcontribitems.so: not loaded (missing symbols?)

(According to nm, it does have symbols in it... I don't know what CB looks for.)

~ray

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: ShellExtensions on Linux
« Reply #4 on: March 02, 2009, 08:30:15 am »
I attach a patch, that integrates Filemanager and PowerShell plugin in C::B's automake-system (and contrib-plugins workspace), but not to automatically rpm generation.

You can remove the PowerShell-part or also integrate it (you can disable it from being configured with --with-contrib-plugins=all,-powershell).

To see which symbols are really missing, you can turn on an (sometimes annoying) debug-message-popup by changeing wxLog::EnableLogging(false); to wxLog::EnableLogging(true); in OnInit() in app.cpp (about line 468).
You will get some error-messages (and warnings) that can be ignored, but the missing symbols will also be shown.

[attachment deleted by admin]

Offline raybert

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: ShellExtensions on Linux
« Reply #5 on: March 02, 2009, 08:59:03 pm »
jens, thanks very much!  That was a big help.  I now have FM and PS working!

Unfortunately, wxSmith still isn't working.  I suspect I'm missing a required package but I'm not sure what it is.  I'll try your suggestion of enabling the extra debug output and see what that gets me.

Thanks again!

~ray

Offline raybert

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: ShellExtensions on Linux
« Reply #6 on: March 02, 2009, 10:54:50 pm »
Looks like I just needed to run ldconfig.  Everything seems to be working now.

Thanks again!

~ray