Plugin auto-install HOWTO (TC 6.5 or newer)

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

Moderators: white, Hacker, petermad, Stefan2

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Plugin auto-install HOWTO (TC 6.5 or newer)

Post by *ghisler(Author) »

Dear plugin writers!

The next version of Total Commander, version 6.5, will make it easier for users to install plugins. When a plugin archive contains a file called pluginst.inf which describes the plugin, Total Commander will automatically offer to install the plugin (unzip to a directory, then enter it into the plugin configuration dialog). TC will offer to overwrite a plugin if it finds one with the same name already installed and configured.

Two things should be considered to handle this:
1. Some plugins come with sample INI files in the plugin directory. This is problematic because when the user installs a newer version, the user-modified INI file will be overwritten by the sample. To solve this problem, you can use a simple solution: Name the file pluginname.sample or so (just not pluginname.ini). Now when your plugin is called for the first time and reading from pluginname.ini fails, simply call CopyFile to copy pluginname.sample to pluginname.ini.

2. The pluginst.inf file. It's a simple ini file and has the following syntax:

[plugininstall]
description=Description of your plugin
descriptiondeu=German description
descriptionrus=Russian description
type=wcx
file=pluginname.wcx
defaultdir=pluginsubdir
defaultextension=ext,ext2

The description field just contains a description in English which is shown to the user when he opens the plugin archive. You can also specify descriptions in other languages - the appened string is the same as in the language file for that language, e.g. wcmd_deu.lng -> deu for German.

The type field contains the plugin type: wcx, wfx, wlx or wdx (new plugin type for file content data), lng for additional languages, or prg for the Total Commander directory.

The file field lists the actual plugin name, which will be registered in the appropriate plugin dialog.

defaultdir is the subdirectory suggested for installation. Backslashes in this will be ignored. A 2 level dir structure is proposed to the user (plugins\wcx\pluginname\).

defaultextension is only for packer plugins. The extensions must be separated by a comma. The associate dialog will be called for each extension separately.

Just ask here if you have more questions. I'm sorry but the beta test isn't public at this time, for security reasons.
Last edited by ghisler(Author) on 2011-05-05, 13:55 UTC, edited 1 time in total.
Author of Total Commander
https://www.ghisler.com
User avatar
ctiberg
Member
Member
Posts: 194
Joined: 2003-10-24, 14:10 UTC
Location: Kristianstad, Sweden

Post by *ctiberg »

It'd be nice to have the ability to install several plugins, if they're in the same file. Our DBLister plugin for example has both a lister and a file-system plugin.. Don't know if that's unique :)
Best regards,
Christian Tiberg
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

2 ghisler(Author)
Is the WDX-plugin writer's guide available, or WDX interface is also in beta-testing? If it's in beta-testing, when (approximately, of course) it will be available?
It would be interesting to look it through, and also I have a couple of ideas for WDX-plugins to realize... ;)
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2ctiberg
This would probably confuse too many users. The idea would be to put the plugins in separate archives inside the main archive, or in separate archives to download separately. This way a user could also install just one part of the plugin suite.

2Flint
It is in beta test, and some plugin writers are also participating in the test.
Author of Total Commander
https://www.ghisler.com
User avatar
Xyzzy
Junior Member
Junior Member
Posts: 54
Joined: 2004-11-24, 09:25 UTC
Location: Poland

Post by *Xyzzy »

Language plugins require putting lng and mnu in Language subdir and help file in main TCMD directory. How to specify this?

X.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Language files will be put in the language subdir automatically, not need to handle this. Help file installation isn't automated at this time, sorry.
Author of Total Commander
https://www.ghisler.com
User avatar
Dark One
Junior Member
Junior Member
Posts: 40
Joined: 2003-05-19, 10:48 UTC
Location: Serbia

Post by *Dark One »

please be more precise on the following:
1) description - how long should it be? i.e. what is it supposed to fit into - a short label (meaning just the name and version) or a long multiline label (allowing for some functionality intro)?
2) defaultdir - what directory is it relative to? does the directory structure for plugins remain arbitrary? if not, allow defaultdir=. to mean "do not create a separate directory, just place a plugin along with others of the same type"
3) version - how do you make out which one is newer? do we have to include version in the description in order for it to be displayed to plugin user?

recomendation: add a new field: readme=myreadme.txt and a button on your new dialog which will allow users to see plugin's readme file. perhaps also readmedeu=myreadme.de readmerus=myreadme.ru or a combo box like in Kconfigure. allow html files along with txt...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

1) 255 characters max. (short description shown in message box).
2) It's relative to the last used base directory chosen by the user, plus a plugin-type specific dir, e.g. basedir\wfx\<pluginname>
3) You can't - this should be checked by the user before downloading, it's too late when he has already downloaded it (you shouldn't download dozens of plugins again and again for no reason).
Author of Total Commander
https://www.ghisler.com
User avatar
Dark One
Junior Member
Junior Member
Posts: 40
Joined: 2003-05-19, 10:48 UTC
Location: Serbia

Post by *Dark One »

But one may wan't to enter the archive multiple times without worrying about downgrading the plugin. Why don't you add a version=x.x[.x.x] field that you will use to check and compare versions?
XPKiller
Junior Member
Junior Member
Posts: 2
Joined: 2005-01-03, 11:12 UTC

Post by *XPKiller »

When is the new version going to be available?
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

This month, presumably.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
ctiberg
Member
Member
Posts: 194
Joined: 2003-10-24, 14:10 UTC
Location: Kristianstad, Sweden

Post by *ctiberg »

ghisler(Author) wrote:2ctiberg
This would probably confuse too many users. The idea would be to put the plugins in separate archives inside the main archive, or in separate archives to download separately. This way a user could also install just one part of the plugin suite.
The problem with this is when you've got one main plugin DLL, with all the features, and small "stubs" that are installed in TC. This isn't possible to do with your current way of installing plugins :(
Best regards,
Christian Tiberg
Evgeny
Junior Member
Junior Member
Posts: 6
Joined: 2005-01-31, 10:53 UTC

Re: Making your plugin ready for Total Commander 6.5

Post by *Evgeny »

Dear Mr. Ghisler,
Please what we need to change in Lister plugin to make it work with thumbnails?
Also we suggest to make easy deleting the plugin in similar way as creating. So the program can ask not 'Do you want to install it' but 'Do you want to install or uninstall it?'.
Thank you!
User avatar
franck8244
Power Member
Power Member
Posts: 703
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Re: Making your plugin ready for Total Commander 6.5

Post by *franck8244 »

Evgeny wrote:Please what we need to change in Lister plugin to make it work with thumbnails?
Simply download the new version of the help file for lister plugin writer, Here is a link ...

There is a new function to add in your plugin...
TC#88260 -
Evgeny
Junior Member
Junior Member
Posts: 6
Joined: 2005-01-31, 10:53 UTC

Re: Making your plugin ready for Total Commander 6.5

Post by *Evgeny »

franck8244 wrote:
Evgeny wrote:Please what we need to change in Lister plugin to make it work with thumbnails?
Simply download the new version of the help file for lister plugin writer, Here is a link ...

There is a new function to add in your plugin...
Thank you!!!
We will deal with this right now:)
Post Reply