Load extensions/modules at runtime

Benjamin Meyer ben at meyerhome.net
Wed Feb 23 01:12:11 GMT 2005


On Tuesday 22 February 2005 3:24 pm, Mauricio Bahamonde wrote:
> Hi,
> I was thinking if it would be possible for KDE 4, to change the way we are
> currently using for compiling/developing KDE apps in the sense of:
> Loading extensions/modules at runtime, and NOT at compile time.
> It's very uncomfortable to have to recompile an app to enable a feature.
>
> I will give an example:
> Let's say I install amaroK and currently I only have artsd, so my output
> engine will be arts.
> 2 months later, I discover gstreamer and I decide to install it. If I want
> amaroK to use gstreamer as my output plugin, I will have to recompile
> amarok, so it detects that now I have gstreamer installed and compiles the
> support for it.
>
> Shouldn't amaroK detect at runtime if I have gstreamer installed, and if
> it's installed, load the corresponding plugin and give the option to use
> gstreamer as the output plugin, without actually recompiling?
>
> The same happens with many other KDE apps. Wouldn't something like this be
> possible? I've been thinking this for a couple of days, but I think this is
> not actually possible because the plugin includes a header of the
> program/library and if it's not present, the plugin will not be compiled,
> then the program obviously won't have the support for that plugin.
>
> This would also benefit distro packager's, they will not have to depend on
> many other packages. Programs would be compiled with defaults, and if the
> user installs later a package, and a certain KDE app can use that
> program/library, then it will support it.
>
> Greetings,

For what it is worth if you check out the audiocd ioslave lame plugin you will 
see exactly that.  The plugin at runtime attempts to load the lame library to 
see if it is on the system.  The code is fugly though and if it wasn't for 
the special circumstances I wouldn't have it like this.  The reason being 
that distributions can now ship with the lame plugin without requiring lame.  
Then if the user adds lame later on the plugin is "automagically" enabled.

-Benjamin Meyer 

-- 
aka icefox
Public Key: http://www.icefox.net/public_key.asc




More information about the kde-core-devel mailing list