Page 1 of 1

New pluginst.inf line to show plugin version number

Posted: 2012-12-05, 12:03 UTC
by Bluestar
Hi,

I've got a simple idea from which i think Total Commander & its users (and plugin developers) could also benefit from (see the original topic here).
A lot of pluginst.inf currently looks like:
description=Sample plugin 2.0.6 (32/64): only for demonstration purposes
descriptionrus=Пример плагина 2.0.6 (32/64): только для демонстрационных целей
descriptiongrk=Δείγμα plugin 2.0.6 (32/64): μόνο για σκοπούς επίδειξης
descriptiondeu=Beispiel-Plugin 2.0.6 (32/64): nur für demonstrationszwecke
descriptionukr=Приклад плагіна 2.0.6 (32/64): тільки для демонстраційних цілей
descriptionesp=Ejemplo de plug-in 2.0.6 (32/64): sólo para fines de demostración
descriptionhun=Minta bővítmény 2.0.6 (32/64): csak demonstrációs célokra
descriptiondan=Prøve plugin 2.0.6 (32/64): kun med henblik på demonstration
... which in this case means 8 lines with redundant informations to modify for every new version, if the developer wants to update the version number correctly.

I think it would be nice if we could just define a new string in the "pluginst.inf" file like "version=2.0.6", remove the version information from all the language strings, and Total Commander could display it on the Plugin installation confirmation dialog automatically simply by reading this new value. In case it doesn't exists, it could just show "Version: unknown" (no new translation is needed, since line #1287 already contains the string "unknown" for every language file of TC). It would even be backward-compatible, since the previous versions would just ignore this new pluginst.inf line.

A nice extra advantage of this whole thing: developers would be a bit more "forced" to fill in & always update the plugin's version information, 'cause if they miss this step, TC would show "Version: unknown" (or the previous version number), and of course they would like the TC plugin-installer to display everything correctly. :wink:

Visual presentation: click here for the image.
(TC could even optionally show 32/64, in case both files - w*x and w*x64 - exists in the pack - but thats another story, the main point is the simplified displaying of the current version - btw my original conception was reading the version information without extra pluginst fields directly from the wcx/wfx etc files, but that would probably need the file to be unpacked)

What do you think about it?

Posted: 2013-09-13, 11:01 UTC
by Maximus
I think this will be very useful feature.

Posted: 2013-09-13, 22:36 UTC
by Flint
Support too.

Posted: 2013-09-14, 01:43 UTC
by petermad
Big Support++++

Posted: 2013-09-14, 06:40 UTC
by Lefteous
An alternative could be to unpack the plugin main file temporarily and use its version information.

Posted: 2013-10-21, 17:15 UTC
by Bluestar
@Lefteous:
I was also thinking about that, but unfortunately most of the plug-ins doesn't have a relevant & updated versioninfo section, so this wouldn't be a very successful way.

Christian, would it be possible to extend the current plugin installer feature with such a thing, so it could handle this extra "version" key in the "pluginst.inf" files in case it exists?

Posted: 2013-10-22, 06:49 UTC
by ghisler(Author)
OK, I will add it. Unfortunately I have already contacted all translators, so it's too late to ask for a new translation for "Version". I will probably use string Nr. 5808 for now.

However, I will leave out this "Version:" line from the dialog and not show "unknown" because the version number is often part of the name in existing inf files.

Posted: 2013-10-22, 08:27 UTC
by Flint
ghisler(Author) wrote:Unfortunately I have already contacted all translators, so it's too late to ask for a new translation for "Version". I will probably use string Nr. 5808 for now.
I would suggest to add a new line anyway, and only use 5808 if the translation for the new line is missing. I remember you did such things earlier, and it was quite a good idea.

Posted: 2013-10-27, 14:47 UTC
by Bluestar
Thanks for implementing it Christian, it works like a charm! :) The used string is perfect too.

WDX for Images plugin now already contains a version string in its ini, hope more and more developers are going to follow the trend.

Regards,
Bluestar

Posted: 2013-10-27, 15:06 UTC
by Maximus
2Bluestar
My tcPhonebook and AppLoader contains version string from 2011 and 2012 year :)

Posted: 2013-10-27, 15:19 UTC
by Bluestar
@Maximus:
You're right I just checked it. :D You were very forward-thinking, respect. :wink:
(btw I was able to find a pretty old "wlx_apploader_0.9.5b.rar" package on my PC from 2009 which doesn't contains it yet :P)

Edit:
Checked my installdir and noticed that decClipBoardFS, DeliciousPosts, badcopy, FSClipboard and excellence also contains it.