[bug] Installing WCX plugins

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3378
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA »

XPEHOPE3KA wrote:
Sir_SiLvA wrote:This is wrong even in Commodore times it was called kilobyte which sounds far better for me then kikibyte
Kibibyte, ok? Well, maybe you will also consider Earth being flat. Even in ancient times it was so. And it sounds nicer: [flæt]. It even is faster to pronounce as it has only one vowel sound, while [raund] has two...
Kiki, Kibi, Kiwi - Whayne ? :D
And it amkes really sense comparing religion/belives (flat earth)
with a Computer Standard but perhaps thats the way life goes in russia :D :twisted: :wink:
Hoecker sie sind raus!
User avatar
XPEHOPE3KA
Power Member
Power Member
Posts: 854
Joined: 2006-03-03, 18:23 UTC
Location: Saint-Petersburg, Russia

Post by *XPEHOPE3KA »

but perhaps thats the way life goes in russia
Bla-bla-bla... I just have a more association-based mind than you. :wink:
F6, Enter, Tab, F6, Enter, Tab, F6, Enter, Tab... - I like to move IT, move IT!..
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

The harddrive here uses FAT 32.
petermad wrote:Try and open your %COMMANDER_PATH%\plugins\ directory and then choose to show it UNSORTED - do you see the wlx directory BEFORE the wcx directory?
Yes.
petermad wrote:With FAT the solution is to restart TC (to get all plugins out of memory) and then move all the directories in %COMMANDER_PATH%\plugins\ temporarily to another location and then move all the directories back but in another order so that the wlx directory is placed AFTER the wcx directory.
Worked like a charm! :)
Now we know that Mr. Ghisler's algorithm depends on the unpredictable order of creation dates of the concerning subfolders.
petermad wrote:Even though NTFS sorts the dirs, the sequence can still fool TC.

If you have a wlx file in the wcx dir, then tc will suggest the wcx dir for wlx files.
Yep.
petermad wrote:TC's searc algoritm should be expanded to look for directories with the names WLX, WCX, WFX and WDX in stead of just looking for files with those extensions - or even better - count the number of files with a certain extension and the use then directory with the highest count of the wanted file type - but that will still not be fool proof.
There is a good old programming principle called KISSS (I extended the acronym so that it has three 'S' :)):
Keep it simple, safe, and straightforward.
I often met programmers who wanted to be extra smart by ignoring this principle... and in say 95% of the cases they shot themselves into the feet!

I would use something along the lines of the following (pseudo code):

Code: Select all

function suggested_plugin_install_dir (string plugin_basedir, string plugin_type, string plugin_name)
   ; -- in:
   ; plugin_basedir: from Wincmd.ini (e.g. "%COMMANDER_PATH%\plugins")
   ; plugin_type   : currently one of the strings "wcx", "wdx", "wfx", "wlx"
   ; plugin_name   : name of the ZIP file of the plugin that is going to be installed
   ;                 (without the ZIP extension)

   if exist_dir(plugin_basedir & "" & plugin_type) then
      return plugin_basedir & "" & plugin_type & "" & plugin_name
   else
      return plugin_basedir & "" & plugin_name
   end if
end function
Regards, Juergen
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

2Moderators:
Can you please remove the Sir_SiLvA nonsense here! I created this thread because I (and others, too) want to seriously discuss a problem, so this is not a playground for children.

Regards, Juergen
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
User avatar
XPEHOPE3KA
Power Member
Power Member
Posts: 854
Joined: 2006-03-03, 18:23 UTC
Location: Saint-Petersburg, Russia

Post by *XPEHOPE3KA »

Moderators, please, delete my nonsense too.

2Juergen
Your suggested function fails in Sir_SiLvA's situation. There's nothing better than four new variables in wincmd.ini...
F6, Enter, Tab, F6, Enter, Tab, F6, Enter, Tab... - I like to move IT, move IT!..
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3378
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA »

Juergen wrote:I would use something along the lines of the following (pseudo code):

Code: Select all

function suggested_plugin_install_dir (string plugin_basedir, string plugin_type, string plugin_name)
   ; -- in:
   ; plugin_basedir: from Wincmd.ini (e.g. "%COMMANDER_PATH%\plugins")
   ; plugin_type   : currently one of the strings "wcx", "wdx", "wfx", "wlx"
   ; plugin_name   : name of the ZIP file of the plugin that is going to be installed
   ;                 (without the ZIP extension)

   if exist_dir(plugin_basedir & "" & plugin_type) then
      return plugin_basedir & "" & plugin_type & "" & plugin_name
   else
      return plugin_basedir & "" & plugin_name
   end if
end function
More usefull would be 4 Vars in the TC.INI if u you really would use your mentioned "Keep it simple, safe, and straightforward" :!: ....

PS: Go sit in a corner and cry :twisted:
Hoecker sie sind raus!
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

Sir_SiLvA wrote:PS: Go sit in a corner and cry :twisted:
I'm sorry Mr. Sir_SiLvA, you'll have to look for someone else who plays with you.
BTW: People who are able to read clearly have got an advantage.

Regards, Juergen
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
User avatar
petermad
Power Member
Power Member
Posts: 16027
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2Sir_SiLvA
I dont as I dont prefer cryptig names - mine are called FileSystem, Inhalt, Lister and Packer
So you have changed it since jan. 2005? ( http://ghisler.ch/board/viewtopic.php?p=47764#47764 and http://ghisler.ch/board/viewtopic.php?p=47519#47519 ) ;-)

Also notice this:
http://ghisler.ch/board/viewtopic.php?p=47697#47697 ("Indeed the 3rd method is the officially used and supported one, so if possible, you should use this method.")

But maybe both of you are referring to the "3rd method" as one with 1 plugins dir with 4 subdirs - regardless of the names of the subdirs?
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3378
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA »

petermad wrote:But maybe both of you are referring to the "3rd method" as one with 1 plugins dir with 4 subdirs - regardless of the names of the subdirs?
Excactly :) therefor i like XPEHOPE3KA's Idea with 4 Vars :D
Hoecker sie sind raus!
User avatar
XPEHOPE3KA
Power Member
Power Member
Posts: 854
Joined: 2006-03-03, 18:23 UTC
Location: Saint-Petersburg, Russia

Post by *XPEHOPE3KA »

One thing I don't like in my idea is that it will make TC backward incompatible. Maybe let's leave pluginbasedir var and new variables will only contain names of subdirs of pluginbasedir? But it will require some dead code in TC...
F6, Enter, Tab, F6, Enter, Tab, F6, Enter, Tab... - I like to move IT, move IT!..
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

XPEHOPE3KA wrote:2Juergen
There's nothing better than four new variables in wincmd.ini...
Yes, that's more flexible than my suggestionn. I personally don't think that it's necessary to give custom names to the "wcx", "wdx", "wfx", and "wlx" folders, though. New users of TC very probably don't want to manually edit wincmd.ini anyway. And extending the "Configuration" dialog box according to this point would be overkill IMHO.

Regards, Juergen
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
User avatar
XPEHOPE3KA
Power Member
Power Member
Posts: 854
Joined: 2006-03-03, 18:23 UTC
Location: Saint-Petersburg, Russia

Post by *XPEHOPE3KA »

Ok, now I have problems too :)
Tried to install FSClipboard plugin (contains only wfx), a part of its pluginst.inf:

Code: Select all

type=wfx
file=clipbrowser.wfx 
defaultdir=Clipbrowser
And TC suggest WCX directory because there's a file cdtracks.wfx from the distributive of audioconverter plugin.
F6, Enter, Tab, F6, Enter, Tab, F6, Enter, Tab... - I like to move IT, move IT!..
Juergen
Power Member
Power Member
Posts: 517
Joined: 2003-05-02, 18:19 UTC
Location: Berlin (Germany)
Contact:

Post by *Juergen »

XPEHOPE3KA wrote:Ok, now I have problems too :)
Welcome to the club. :)
My add-ons and plugins for TC: NiftyLink, mbox, Sequences
User avatar
Stance
Power Member
Power Member
Posts: 1079
Joined: 2005-03-29, 06:26 UTC

Post by *Stance »

Why is the INF-File in "Imagine.zip" not modified to install the packer plugin: Imagine.wcx into the right directory? Imagine should follow the guideline for plugins. That's why we all have directories named like that! Imagine should use the variable "%COMMANDER_PATH%\Plugins\WCX\Imagine\Imagine.wcx" for its (Packer) GIF-plugin !

Kisss :)
Stance
User avatar
petermad
Power Member
Power Member
Posts: 16027
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Why is the INF-File in "Imagine.zip" not modified to install the packer plugin
That is not Imagines fault. TC's installation routine only supports installing in one plugin directory (plus subdirs of this) - it doesn't support installing to different plugin dirs.

So an author of a plugin can either decide to have it installed as for example a wlx or a wcx plugin, but not both.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply