Plugins Automated Installation

From TotalcmdWiki
Revision as of 08:40, 19 February 2008 by Nsp (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is a copy of C.Ghisler message from TC Forum message . 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), or lng for additional languages.

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

The defaultdir field 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\).

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

Also Discussed :

  • Multi plugins install at once : Not supported !
  • Help file location : Not supported !
  • lng file location : Automatically saved in language folder.
  • Delete/rename file : Not supported !
  • Multi line description : for compatibility reason description is a single line text limited to 255 char. MLDescription field proposition did not receive any public answer.