How to make a plugin

From Ultracopier wiki
Jump to: navigation, search


Here, you will learn how make a plugin for Ultracopier. The version 0.3 is used.

Quick step

Download the model plugin

Go into the plugin download folder, here we will use the plugin Ultracopier-0.3 of the category CopyEngine, into the version

Download the source of the plugin:

  • CopyEngine-Ultracopier-0.3-

Extract it.

Setup the environment

Search on google the Qt SDK, install it. After your can open the project file and compile it.

Edit every often what you want. You need respect the interface file stored into the interface/ folder. NEVER EDIT IT! It's that's which define how ultracopier call the plugin. If you need something contact the developer.

Do the packaging

Now down the released plugin, and overwrite the binary with your binary. WARNING: it should use the same architecture (debug or not, x86 windows, x86_64 linux, ...)

Options engine

Ultracopier provide to the plugin, options engine to store their options. Provide too folder to store file. That's allow good integration into all portable version.

The options engine need be access into the main thread, it minimize the disk writing by:

  • Don't rewrite same value
  • Not create value on disk/register since it's different than the default value (that's allow to change the default value without patch is the user have not change the option)
  • I load into memory the value to work on read only folder and to not access to the disk at multiple read of same key

Facility engine

The facility engine provide lot of function to a plugin, like:

  • time conversion
  • time estimation (about 1min remaining)
  • Size human readable (1024*1024 -> 1MB)
  • translation (located into void FacilityEngine::retranslate()) for previous function + alone text like:
    • Copy
    • Move
    • Pause
    • Resume
    • Skip
    • Source
    • Size
    • Destination
    • Quit
    • Save transfer list
    • Open transfer list
    • Error
    • [...]