[This is preliminary documentation and is subject to change.]

Generates a plugin

Namespace: Tools.TotalCommanderT.PluginBuilder
Assembly: TCPluginBuilder (in TCPluginBuilder.exe) Version: 1.5.3.38916 (1.5.3.38916)

Syntax

C#
public class Generator
Visual Basic
Public Class Generator
Visual C++
public ref class Generator
F#
type Generator =  class end
JScript
public class Generator

Remarks

This class generates one or more Total Commander pluggin wrappers from given assembly/types. Wrapper generation process can be invoked from command line or programatically using Generator API. Separate wrapper is generated for each plugin class. Wrapper generation consists of following steps:
  1. Prepare wrapper template - Template is copied to intermediate directory (either from specified template directory or from built-in template)
  2. Configure tamplate - Type wraper is being generated for is inspected to detect plugin type and which methods the plugin implements. Appropriate settings are generated to template files. Namely: Conditional compilation is set up to generate only those functions supported by plugin; Module export definition is written; Assembly info is generated.
  3. Invoke compiler - C++ compiler invoked via MSBuild to compile the wrapper. MSBuild and C++ compiler must be installled on your machine.
Following rules apply to plugin being generated: Wrapped debugging info is copied to target only when CopyPDB is set. Do not set this to true when name of your plugin DLL and plugin wrapper are same but the extension. (Your debugging info will be overwritten with almost useless debugging info of wrapper.)

To genereta plugin wraper for your plugin from Visual Stuidio environment as part of build process, simply add plugin generator tool TCPluginBuilder.exe as post-build event. Example post-build event:

Examples

This command line invokes TCPluginBuilder.exe and generates plugin(s) from output of project, places the w?x files into project output directory and uses project obj directory as its intermediate directory. Intermediate files are not deleted. Built-in template is used. w?x assembly is not signed.
CopyVB.NET
TCPluginBuilder.exe "$(TargetPath)" /out "$(TargetDir)\" /int "$(ProjectDir)obj\$(ConfigurationName)" /keepint

Deploying the plugin:

When Total Commander refuses to load your plugin try following troubleshoting tips:

  • Place plugin files inside the same directory as TOTALCMD.EXE or one of subdirectories.
  • Windows Vista: If you are ceating subdirectory inside Total Commander directory you will copy plugin for testing during development and you are changing rights on the directory in order to get rid of UAC, do not make yourself owner of the directory.
  • Restart Total Commander in order to test a new version of your plugin.

Inheritance Hierarchy

System..::..Object
  Tools.TotalCommanderT.PluginBuilder..::..Generator

See Also

Collapse/expand Version History

1.5.3

  • Property VCBuild removed. Class now use MSBuild which is referenced as assembly. Reference to VCBuild.exe removed from settings as well.
  • Property SN removed. Class now use MSBuild task to sign resulting assembly. Reference to SN.exe removed from settings as well.