Improve interaction with plugins

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Eugene
Junior Member
Junior Member
Posts: 17
Joined: 2009-11-17, 20:59 UTC

Improve interaction with plugins

Post by *Eugene »

I offer the following improvements.

1) Clear arhives cache after calling ConfigurePacker(). Also don't forget to reread contents of any archive opened in panel when ConfigurePacker() called.

2) For many plugins archive cache is useless. Implement PK_CAPS_DONTCACHE flag.

3) Call GetPackerCaps() after calling ConfigurePacker(). Because plugin caps could be changed.

4) Call GetPackerCaps() each time plugin is loaded. Because plugin caps could be changed.
User avatar
ND
Member
Member
Posts: 150
Joined: 2006-04-10, 16:24 UTC
Location: Sibiu, RO

Post by *ND »

1)+2)

I'm not a plugin developer, so I don't know this for sure: Is caching done by the plugin, or by TC? Because if it's done by TC, then it's not a plugin feature (not a PK_CAPS). But if such (plugin or TC) feature is possible, then I'm not against it.


3)+4)

The way I read the "WCX Writer's Reference", the plugin features which are determined via GetPackerCaps() are something that should only change after a installing a new version of the plugin. Anything else is handled by the plugin itself, via options stored by the plugin after ConfigurePacker() is called.

The existing PK_CAPS are not something that can change at runtime. Take for instance PK_CAPS_ENCRYPT: "Now I can encrypt your archives, now I can't - I forgot how to"? Doesn't make any sense.
aNDreas Bolotă
The truth always carries the ambiguity of the words used to express it. (Frank Herbert, God Emperor of Dune)
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ND wrote:I'm not a plugin developer, so I don't know this for sure: Is caching done by the plugin, or by TC?
By TC.
ND wrote:The existing PK_CAPS are not something that can change at runtime. Take for instance PK_CAPS_ENCRYPT: "Now I can encrypt your archives, now I can't - I forgot how to"? Doesn't make any sense.
But after plugin reconfiguring some caps may change (e.g. PK_CAPS_HIDE). Also, if you use Multiarc you know that its caps are different for each packer tool (some archives may be modified, some allow to delete file(s) etc), and Multiarc allow to set caps from configuration dialog.
Post Reply