Plugins using interpreters

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
steve_3199
Junior Member
Junior Member
Posts: 14
Joined: 2004-05-06, 06:28 UTC
Location: Australia

Plugins using interpreters

Post by *steve_3199 »

How would i make a plugin using an interpreter to load a plugin in TC,instead of needing to compile all my plugins it would be much easier like this, as i could add to any plugins i would choose to make without the need to recompiling it everytime

what i mean by an interpreter is perl, shells like bash, php and many more

If there isnt a way of doing this, im sure it would increase 3rd party plugin development, as the plugins would be written faster
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6496
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

There is a Perl plugin available. look in totalcmd.net
http://www.totalcmd.net/plugring/perlfs.html
steve_3199
Junior Member
Junior Member
Posts: 14
Joined: 2004-05-06, 06:28 UTC
Location: Australia

Post by *steve_3199 »

Thank you for that, i could use that, but the question still remains, is it possible to execute plugins through an interpreter, if this was possible, then virtually any language could be used to create a plugin (even BASIC's)

or is the a code frame to support this that only requires tweaking to the specific program running the plugin i will create a example of this procedure



Total Commander Loads Interpreter Plugin

Interpreter Plugin Loads specified interpreter, eg. C:\php\bin\php.exe or c:\perl\bin\perl.exe
Like when bash or apache loads a specific interpreter for whatever the #! is pointing to eg. #!/usr/bin/perl or #!/usr/bin/php, or fopr windows #!C:\perl\bin\perl.exe

Interpreter Loads up and whatever the Interpreter plugin gets by the interpreter, it passes it into Total Commander

Total Commander reponds to what was passed into it in an appropiate manner
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

but the question still remains, is it possible to execute plugins through an interpreter, if this was possible, then virtually any language could be used to create a plugin (even BASIC's)
No this is not possible at the moment, as those languages do not support dll binding and callback functions.
I switched to Linux, bye and thanks for all the fish!
steve_3199
Junior Member
Junior Member
Posts: 14
Joined: 2004-05-06, 06:28 UTC
Location: Australia

Post by *steve_3199 »

Yes, but how is saying that going to answer my question
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

steve_3199 wrote:Yes, but how is saying that going to answer my question
steve_3199 wrote:... is it possible to execute plugins through an interpreter...
SanskritFritz wrote: No this is not possible at the moment, as those languages do not support dll binding and callback functions.
Maybe you intended to ask another question, but you didn't :wink:

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
steve_3199
Junior Member
Junior Member
Posts: 14
Joined: 2004-05-06, 06:28 UTC
Location: Australia

Post by *steve_3199 »

No, because the question wasnt "can i get plugins that are written in BASIC", instead i was asking "Is it possible to use interpreters as plugins?
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

2steve_3199
No, because the question wasnt "can i get plugins that are written in BASIC", instead i was asking "Is it possible to use interpreters as plugins?
The answer is still:
No this is not possible at the moment, as those languages do not support dll binding and callback functions.
Maybe we are misunderstanding something. The way i understand your question is: "can i use an interpreter like basic, or javascript to write a plugin for TC?". If i am not correct, you have to describe your question again, many of us are not native english speaking people.
I switched to Linux, bye and thanks for all the fish!
steve_3199
Junior Member
Junior Member
Posts: 14
Joined: 2004-05-06, 06:28 UTC
Location: Australia

Post by *steve_3199 »

ok, i will just look elsewhere,but i will psot it here to whoever it may interest when i do find what i need
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

Yes, that would be awesome, thanks!
The subject is really interesting, if you come up with any info, we will gladly hear about it.
I switched to Linux, bye and thanks for all the fish!
User avatar
CoMiKe
Senior Member
Senior Member
Posts: 285
Joined: 2003-05-05, 17:45 UTC
Location: Salamanca, Spain

Post by *CoMiKe »

[joke]

Well, I was thinking about programming a compiler, parsing Basic to Asm386 (Nasm), to be OO and able to compile dlls. Although this is probably not made before 2010! :D At this time, will we have Total Commander 15.0??

[/joke]

Anyway, it would be cool!!
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

So far a helper plugin was written for PERL. Similarly another plugins could be written supporting another script languages. IMHO. But I dont know pearl, so i might not be right.
I switched to Linux, bye and thanks for all the fish!
User avatar
ctiberg
Member
Member
Posts: 194
Joined: 2003-10-24, 14:10 UTC
Location: Kristianstad, Sweden

Post by *ctiberg »

Hmm.. It should be fairly straight-forward to write a wrapper for the Windows Scripting Host.. This would enable people to write plugins in VBScript, and any other script language supported by Windows... Provided they put the right function entry points in the scripts, it should be possible to develop all kinds of plugins - lister, packer and FS alike..

Might even be interesting to take this kind of plugin for a test drive :) Just copy a DLL with a new name, create the .INI file that specifies the scripts, install it in TC and go :)
Best regards,
Christian Tiberg
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

Yeah, bringing the COM close to TC plugins, nice possibilities, like driving Outlook from TC :-) I'm for the idea. Too bad I dont know how to write a WSH server addon, because I'm not good at COM, but if someone points me to the right direction, i might give it a try...
I switched to Linux, bye and thanks for all the fish!
Post Reply