Menu

Hmm, no C#?

2007-06-07
2013-05-29
  • Kevin C. Dorff

    Kevin C. Dorff - 2007-06-07

    No way to write the plugins using a managed-code language like C#? Seems like the ability would vastly improve the language base. I have done CPP code but lately I do everything in Java or C#. It could easily open it up to people to code plugins in VB.NET, Python.net, etc, it seems.

     
    • Josh

      Josh - 2007-06-15

      If you would like to extend Launchy to another language then I recommend creating a language proxy plugin like so..

      For instance, let's say you want to add python support:

      Create a c++ plugin for Launchy (called the proxy plugin) that loads up all of the python scripts in the plugin directory.

      Then, any time an event occurs the c++ plugin forwards the request to the required python script.  

      Such a proxy plugin could be made for any language such as C#.

      For future versions of Launchy I'm thinking about supporting python for scripting since I don't want to have to compile the plugins for each platform that Launchy supports.

       
    • Anonymous

      Anonymous - 2007-08-11

      I tried to start writing a language proxy plugin and stopped when I realized what the end product would look like.

      Unmanaged C++ "regular" Launchy plugin that loads a...
        -> Managed C++ Launchy plugin that loads the...
           -> C# plugins that implement the...
              -> ILaunchyPlugin .NET interface created by whoever ends up making this language proxy plugin. :)

      I think it's also possible to do it with COM Interop but that route left me even more confused than the managed wrapper.

       
    • Paul Dundon

      Paul Dundon - 2007-12-04

      I'd like to take a crack at managed code support, but I don't see how the language proxy would work. The architecture assumes that each dll provides exactly one plugin, so it's hard to see how a proxy for multiple plugins would route requests. For example, how would the suggested Python proxy know which script should handle a call to PluginGetName?

       
    • Anonymous

      Anonymous - 2007-12-05

      I figured that you'd always lose a little bit of detail for things like PluginGetName (or you could return a concatenated list).

      You could also return something like "Managed Plugin Loader (5 plugins loaded)"?

       
    • Aaron

      Aaron - 2008-08-04

      I would think it would be possible to create .Net plugins for Launchy.  It's possible for unmanaged code to call managed dlls.  I'm currently working on a plugin for Snarl, which is unmanaged.  The C# code simply exposes the correct interfaces.  It would be super awesome to be able to do that here.  I would much rather do this in .Net because I'm not getting any C++ help here! ;)  I can't even get the default plugin demo project to work.  Don't know what's up with that.

       

Log in to post a comment.