Plugin auto-install HOWTO (TC 6.5 or newer)
Moderators: white, Hacker, petermad, Stefan2
- ghisler(Author)
- Site Admin
- Posts: 48124
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Plugin auto-install HOWTO (TC 6.5 or newer)
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.
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
https://www.ghisler.com
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...![Wink ;)](./images/smilies/icon_wink.gif)
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...
![Wink ;)](./images/smilies/icon_wink.gif)
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
Using TC 10.52 / Win10 x64
Using TC 10.52 / Win10 x64
- ghisler(Author)
- Site Admin
- Posts: 48124
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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.
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
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 48124
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
https://www.ghisler.com
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...
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...
- ghisler(Author)
- Site Admin
- Posts: 48124
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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).
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
https://www.ghisler.com
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 pluginsghisler(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.
![Sad :(](./images/smilies/icon_sad.gif)
Best regards,
Christian Tiberg
Christian Tiberg
Re: Making your plugin ready for Total Commander 6.5
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!
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!
- franck8244
- Power Member
- Posts: 703
- Joined: 2003-03-06, 17:37 UTC
- Location: Geneva...
Re: Making your plugin ready for Total Commander 6.5
Simply download the new version of the help file for lister plugin writer, Here is a link ...Evgeny wrote:Please what we need to change in Lister plugin to make it work with thumbnails?
There is a new function to add in your plugin...
TC#88260 -
Re: Making your plugin ready for Total Commander 6.5
Thank you!!!franck8244 wrote:Simply download the new version of the help file for lister plugin writer, Here is a link ...Evgeny wrote:Please what we need to change in Lister plugin to make it work with thumbnails?
There is a new function to add in your plugin...
We will deal with this right now:)