Git Product home page Git Product logo

tcbuild's Introduction

TcBuild

TcBuild is a tool to build Total Commander plugins that are written in .NET

Build status Nuget (with prereleases)

Nuget

Install-Package TcBuild

Possible Plugins

Plugin Total Commander name Example
FileSystem Plugin .wfx - plugin TcPlugin.AzureBlob
Content Plugin .wdx - plugin comming soon
Lister Plugin .wlx - plugin comming soon
Packer Plugin .wcx - plugin comming soon

See Total Commander plugin types.

Create a plugin

Create a .NET Library Project targeting net472 or newer and install TcBuild nuget package. The TcBuild nuget comes with some base classes and interfaces to get you started. So you just have to create a class inheriting from one of the following plugin base classes:

  • ContentPlugin
  • FsPlugin
  • ListerPlugin
  • PackerPlugin
  • QuickSearchPlugin

Then override all methods that you like to support in your plugin.

Build a Release

The TcBuild nuget contains a MsBuild Task to perform all required transformations on your .dll and it produces a .zip file, in build output folder, which can be installed with Total Commander auto installer.

More infos: Installation using Total Commander's integrated plugin installer

Copyright

The idea for .NET Total Commander plugins came from Oleg Yuvashev which wrote the original TC .NET Interface that runs on .NET 4.0 and is not that easy to get up and running.

So I (René Larch) used his code (it is Licesed as MIT) and wrote this Nuget with it.

Pros and cons of TcBuild compared to TC .NET Interface

TcBuild TC .NET Interface
.NET Version ✔️ .NET 4.7.2 ❌.NET 1.0 & .NET 4.0
Getting started ✔️Install this Nuget ❌Lots of work
Global Assembly Cache ✔️-- ❌It needs two dlls in GAC
AppDomain Isolation ❌Not now, maybe I reimplement it later ✔️Yes it load your Plugin in its own AppDomain

tcbuild's People

Contributors

r-larch avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ficnar mlcen dnnru

tcbuild's Issues

Support satellite assemblies

TcBuild not support satellite assemblies with language specific resources.
Satellite assemlies are added to zip file in root folder, not in language specific subfolders, for example "fr", or "cs".
Do you plan add it?

Support plugin icon

TcBuild not support plugin icon, that shows as folder icon on root.
Do you plan add it?

Migrate to .NET 5

Migrate to .NET 5.

Native DllExports
Look if DNNE can to the job.

Injecting the Plugin Wrapper Code
Try to use c# Source Generators
to dynamically generate and inject wrapper classes.

Build Task static Assembly analysis
Try to use System.Reflection.PortableExecutable.PEReader as used by DNNE.
To read plugin type information needed for post-processing and zip generation.

Project Structure

  • TcBuild
    • as one nuget containing everything needed,
      or as meta nuget referencing everything as distinct nugets
  • TcBuild.Generator
    • source generator
  • TcBuild.Target
    • post processing build target
  • TcPluginBase
    • Base types required for plugin authors

Steps

  • Proof of concept - (net 5 + native exports + source generator)
  • Create a working TcBuild nuget
  • Implement FileSystem Plugin
  • Implement Lister Plugin
  • Implement Content Plugin
  • Implement Packer Plugin
  • Implement QuickSearch Plugin

Null reference exception

Is this project alive?
I've got an exception

03/27/20 20:09:22.458 - Warn - IContentPlugin plugin load: [A1|T1] [TCSharp]TCSharp.Scriptor
'TOTALCMD64.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TOTALCMD64.EXE' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
03/27/20 20:09:22.473 - Error - NULL: [A1|T1] SetDefaultParams: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at TcPluginBase.Tools.TcPluginLoader.CreatePluginInstance[TPlugin](Type pluginClass)
at TcPluginBase.Tools.TcPluginLoader.GetTcPlugin[TPlugin](Type pluginClass)
at WdxWrapper.ContentWrapper.get_Plugin()
at WdxWrapper.ContentWrapper.SetDefaultParams(PluginDefaultParams& defParams)

Exception: There was code at the end

Hi,

I get a "There was code at the end" exception when I try to create a PackerPlugin.

I assume the reason are the following callsignatures (they have one opening brace and two closing braces):

WcxWrapper.cs:
_callSignature = $"PackFiles ({packedFile}, {subPath}, {srcPath}, {flags.ToString()}) - {addList.Count} files)";
_callSignature = $"DeleteFiles ({packedFile}) - {deleteList.Count} files)";

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.