[TC 11.50] PluginBaseDir automatically changed

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

[TC 11.50] PluginBaseDir automatically changed

Post by *jonathanpoulin »

Hi,

I found that the setting PluginBaseDir is, for some reason, automatically changed by TC.

In my case, I first set it to:

Code: Select all

%COMMANDER_PATH%\plugins
But, after installing by example a new plugin (in my case, DirSizeCalc 2.22), by double-clicking the compressed file, the setting becomes:

Code: Select all

%COMMANDER_PATH%\plugins\wlx\
It appends "\wlx\".
Thanks,
Jonathan Poulin
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: [TC 11.50] PluginBaseDir automatically changed

Post by *jonathanpoulin »

I just found something interesting. This is related for sure.

In my wincmd.ini, I have my setting PluginBaseDir set to:

Code: Select all

%COMMANDER_PATH%\plugins
I am now trying to install the plugin DiskDirW (Unicode) 1.2.4. I use the same way, by double-clicking on its compressed file I downloaded.

In the dialog that is opened by TC at that moment, I see that the path where it wants to install the plugin is:

Code: Select all

%COMMANDER_PATH%\plugins\wlx\diskdirW
I then cancel the installation and restart TC. I see that now, PluginBaseDir was not changed automatically. I don't know why...

The exact same thing happens if I set PluginBaseDir explicitly by myself to:

Code: Select all

%COMMANDER_PATH%\plugins\wlx\
So, there is something weird around "\wlx\". TC tries to append it on its own and sometimes it overwrites the setting as well. This is a new bug as far as I know.

Even more interestingly, if I the change the setting value for:

Code: Select all

%COMMANDER_PATH%\plugins\foo\
And then try to install the same content plugin the same way, this is where TC proposes to put it:

Code: Select all

%COMMANDER_PATH%\plugins\foo\wcx\diskdirW
Thanks,
Jonathan Poulin
User avatar
tuska
Power Member
Power Member
Posts: 4046
Joined: 2007-05-21, 12:17 UTC

Re: [TC 11.50] PluginBaseDir automatically changed

Post by *tuska »

2jonathanpoulin
I can't see anything unusual so far.

wincmd.ini - section [Configuration]

Code: Select all

pluginbasedir=%COMMANDER_PATH%\Plugins
The default installation directory can be found in the file “pluginst.inf”:
Option: Determine installation directory BEFORE installing the plug-in...
Position the cursor on the ZIP file, then press Ctrl+Page Down, position the cursor on the “pluginst.inf” file,
then press F3 Lister or Ctrl+Q “Quick View Panel”.
Then close the Lister view: press the ESC key or press Ctrl+Q “Quick View Panel” again.
To view the ZIP file (Name.ext), press Backspace or Ctrl+Page Up.
TC must then be restarted, as plug-in installation by double-clicking on the ZIP file is not possible at this point.
For example, create a button with the command: cm_exit 9 and then click on the button to restart TC.
Afterwards, the plugin installation is possible [again] by double-clicking on the ZIP file.
Help - Button for commands, e.g. cm_exit

Code: Select all

TOTALCMD#BAR#DATA
hh.exe %COMMANDER_PATH%\LANGUAGE\WCMD_ENG.CHM::dlg_choosecommand.htm

C:\WINDOWS\hh.exe
F1 (Help) > Index > Dialog box: Choose command >|List of internal commands that support a parameter: cm_Edit, etc.|https://www.ghisler.ch/board/viewtopic.php?p=446461#p446461

0
-1

%COMMANDER_PATH%\Plugins\wdx\DirSizeCalc\wdx_dirsizecalc_2.22.zip\pluginst.inf -> defaultdir=DirSizeCalc

Code: Select all

%COMMANDER_PATH%\Plugins\	pluginbasedir
wdx\				type=wdx
DirSizeCalc			defaultdir=DirSizeCalc
This results in the installation directory (which is created automatically):

Code: Select all

%COMMANDER_PATH%\Plugins\wdx\DirSizeCalc\

The same applies to:
%COMMANDER_PATH%\Plugins\wcx\DiskDirW\wcx_DiskDirW_1.2.4.zip\pluginst.inf -> defaultdir=diskdirW
Please see file “pluginst.inf”...

Installation directory – provided the installation location is NOT changed during installation (!) –: *)

Code: Select all

%COMMANDER_PATH%\Plugins\wcx\DiskDirW\
*) I only change the plug-in installation location - during installation - in this case, for example,
to carry out the installation in separate directories:
%COMMANDER_PATH%\Plugins\wlx\Imagine\
%COMMANDER_PATH%\Plugins\wlx\Imagine_32-bit\


This ensures that the plugins are assigned to the plugin types, i.e.
wcx_Packer plugins, wdx_Content plugins, wfx_File System plugins, wlx_Lister plugins
in the corresponding directories. This also makes it easier to find them later.
(Hope I expressed myself correctly).
Last edited by tuska on 2025-01-08, 20:57 UTC, edited 1 time in total.
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: [TC 11.50] PluginBaseDir automatically changed

Post by *jonathanpoulin »

tuska wrote: 2025-01-08, 17:36 UTC This ensures that the plugins are assigned to the plugin types, i.e.
wcx_Packer plugins, wdx_Content plugins, wfx_File System plugins, wlx_Lister plugins
in the corresponding directories. This also makes it easier to find them later.
(Hope I expressed myself correctly).
Yes, I understand all of what you explained here. I use TC for a long time and before I never had issues with plugins installation, like the glitches I described in my first 2 posts. Please re-read it.
Thanks,
Jonathan Poulin
User avatar
tuska
Power Member
Power Member
Posts: 4046
Joined: 2007-05-21, 12:17 UTC

Re: [TC 11.50] PluginBaseDir automatically changed

Post by *tuska »

2jonathanpoulin
I tested again and simply reinstalled the "DirSizeCalc" plugin over my existing installation.

During this process I received the following message:
DirSizeCalc.wdx wrote:A plugin with this name is already installed in the following
directory:

%COMMANDER_PATH%\Plugins\wdx\DirSizeCalc\

Do you want to overwrite it?
Choose 'No' to select a different location.

Yes No Cancel
After clicking on the “Yes” button, the plug-in installation was started.

After that, the entry in wincmd.ini remained UNCHANGED(!): pluginbasedir=%COMMANDER_PATH%\Plugins
- even after a restart of Total Commander -

Tested with: Total Commander (x64) 11.50 (portable in C:\totalcmd)

Therefore I can NOT confirm your statement in the first post.

Which version of TC & 32 Bit or 64 Bit did you have this experience with?
I can only recommend that you correct the entry in wincmd.ini and reinstall the plug-in.


Please run a test with a TC_clean.ini.
EDIT:
I ran the test myself and got the following result:
TC_clean_11.50_final_x64.ini > [Configuration] pluginbasedir=%COMMANDER_PATH%\Plugins...
was NOT changed after installing the plugin "DirSizeCalc"!


Windows 11 Pro (x64) Version 24H2 (OS Build 26100.2605) - 2024-12-10
User avatar
petermad
Power Member
Power Member
Posts: 15997
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.50] PluginBaseDir automatically changed

Post by *petermad »

jonathanpoulin wrote: 2025-01-08, 16:10 UTC But, after installing by example a new plugin (in my case, DirSizeCalc 2.22), by double-clicking the compressed file, the setting becomes:

Code: Select all

%COMMANDER_PATH%\plugins\wlx\
It appends "\wlx\".
Not confirmed.

jonathanpoulin wrote: 2025-01-08, 17:09 UTC I am now trying to install the plugin DiskDirW (Unicode) 1.2.4. I use the same way, by double-clicking on its compressed file I downloaded.

In the dialog that is opened by TC at that moment, I see that the path where it wants to install the plugin is:

Code: Select all

%COMMANDER_PATH%\plugins\wlx\diskdirW
Not confirmed.

I have tested in TC 11.50 x64 both with my work ini file and with a fresh ini file. with the two plugins you mention in your report.

But I can confirm some other things:
If I use pluginbasedir=%COMMANDER_PATH%\plugins\wcx
Then:
wcx plugins are suggested installed in: %COMMANDER_PATH%\plugins\wcx
wdx plugins are suggested installed in: %COMMANDER_PATH%\plugins\wcx\wdx
wfx plugins are suggested installed in: %COMMANDER_PATH%\plugins\wcx\wfx
wlx plugins are suggested installed in: %COMMANDER_PATH%\plugins\wcx\wlx


If I use pluginbasedir=%COMMANDER_PATH%\plugins\wdx
Then:
wdx plugins are suggested installed in: %COMMANDER_PATH%\plugins\wdx
wcx plugins aresuggested installed in: %COMMANDER_PATH%\plugins\wdx\wcx
wfx plugins aresuggested installed in: %COMMANDER_PATH%\plugins\wdx\wfx
wlx plugins aresuggested installed in: %COMMANDER_PATH%\plugins\wdx\wlx


If I use pluginbasedir=%COMMANDER_PATH%\plugins\wfx
Then:
wfx plugins are suggested installed in: %COMMANDER_PATH%\plugins\wfx
wcx plugins are suggested installed in: %COMMANDER_PATH%\plugins\wfx\wcx
wdx plugins are suggested installed in: %COMMANDER_PATH%\plugins\wfx\wdx
wlx plugins are suggested installed in: %COMMANDER_PATH%\plugins\wfx\wlx


BUT if I use pluginbasedir=%COMMANDER_PATH%\plugins\wlx
Then:
wlx plugins are suggested installed in: %COMMANDER_PATH%\plugins\wlx
wcx plugins are suggested installed in: %COMMANDER_PATH%\plugins\wlx (unexpected)
wdx plugins are suggested installed in: %COMMANDER_PATH%\plugins\wlx (unexpected)

wfx plugins are suggested installed in: %COMMANDER_PATH%\plugins\wlx\wfx




If I use pluginbasedir=%COMMANDER_PATH%\plugins
Then:
wfx plugins are suggested installed in: %COMMANDER_PATH%\plugins\wfx
wcx plugins are suggested installed in: %COMMANDER_PATH%\plugins\wcx
wdx plugins are suggested installed in: %COMMANDER_PATH%\plugins\wdx
wlx plugins are suggested installed in: %COMMANDER_PATH%\plugins\wlx


If I use pluginbasedir=%COMMANDER_PATH%\plugins\foo
Then:
wfx plugins are suggested installed in: %COMMANDER_PATH%\plugins\foo\wfx
wcx plugins are suggested installed in: %COMMANDER_PATH%\plugins\foo\wcx
wdx plugins are suggested installed in: %COMMANDER_PATH%\plugins\foo\wdx
wlx plugins are suggested installed in: %COMMANDER_PATH%\plugins\foo\wlx
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
ghisler(Author)
Site Admin
Site Admin
Posts: 50383
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.50] PluginBaseDir automatically changed

Post by *ghisler(Author) »

Plugin installation doesn't just take PluginBasedir and puts the plugin there - it looks for plugins of similar type and then tries to put the new plugin there too. For example, I have content plugins in PluginBasedir\content\pluginname, and installing a new content plugin will suggest to put it under "content" too. However, this should not change PluginBasedir itself.

I have now tried with a fresh wincmd.ini, and when don't change the suggested destination, plugins are all put in <program path>\plugins followed by the plugin type (e.g. wdx), and PluginBasedir is saved without the plugin type.

In a second test, I changed the path from <program path>\plugins\wdx\Dirsizecalc to c:\plugins\wdx\Dirsizecalc and PluginBasedir was stored as c:\plugins. I then installed a Lister plugin, it was put in c:\plugins\wlx\pluginname and PluginBasedir remained unchanged as c:\plugins.

Can anyone find a way to install a plugin where PluginBasedir is stored with sdx/wlx etc. appended?
Author of Total Commander
https://www.ghisler.com
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: [TC 11.50] PluginBaseDir automatically changed

Post by *jonathanpoulin »

tuska wrote: 2025-01-08, 21:22 UTC Which version of TC & 32 Bit or 64 Bit did you have this experience with?
64 bit (not tried that on 32 bit)
Thanks,
Jonathan Poulin
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: [TC 11.50] PluginBaseDir automatically changed

Post by *jonathanpoulin »

petermad wrote: 2025-01-09, 00:59 UTC BUT if I use pluginbasedir=%COMMANDER_PATH%\plugins\wlx
Then:
wlx plugins will be installed in: %COMMANDER_PATH%\plugins\wlx
wcx plugins will be installed in: %COMMANDER_PATH%\plugins\wlx (unexpected)
wdx plugins will be installed in: %COMMANDER_PATH%\plugins\wlx (unexpected)
wfx plugins will be installed in: %COMMANDER_PATH%\plugins\wlx\wfx
Oh! Thanks for all those tests Peter! So, there are some things not okay there.
Thanks,
Jonathan Poulin
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: [TC 11.50] PluginBaseDir automatically changed

Post by *jonathanpoulin »

Hi Mr. Ghisler,

Thanks for your tests.
ghisler(Author) wrote: 2025-01-09, 08:33 UTC Plugin installation doesn't just take PluginBasedir and puts the plugin there - it looks for plugins of similar type and then tries to put the new plugin there too. For example, I have content plugins in PluginBasedir\content\pluginname, and installing a new content plugin will suggest to put it under "content" too. However, this should not change PluginBasedir itself.
Okay! Good to know! Is it a new thing? By the way, I just realized something. I have the Imagine plugin installed. It seems that this plugin is kind of a "hybrid" one (Packer AND Lister plugin if I can say) because I see files Imagine.wcx64 and Imagine.wlx64 in its directory. Could this be the problem here?
ghisler(Author) wrote: 2025-01-09, 08:33 UTC I have now tried with a fresh wincmd.ini, and when don't change the suggested destination, plugins are all put in <program path>\plugins followed by the plugin type (e.g. wdx), and PluginBasedir is saved without the plugin type.
Yes, simple, and this is always what I understood.
ghisler(Author) wrote: 2025-01-09, 08:33 UTC In a second test, I changed the path from <program path>\plugins\wdx\Dirsizecalc to c:\plugins\wdx\Dirsizecalc and PluginBasedir was stored as c:\plugins. I then installed a Lister plugin, it was put in c:\plugins\wlx\pluginname and PluginBasedir remained unchanged as c:\plugins.

Can anyone find a way to install a plugin where PluginBasedir is stored with sdx/wlx etc. appended?
If I find out the scenario for PluginBasedir to have "\wlx\" appended, I'll let you know. But, again, is it possible that a plugin with 2 or more types (ex.: containing a .wcx and .wlx file), like Imagine, be our issue here?
Thanks,
Jonathan Poulin
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: [TC 11.50] PluginBaseDir automatically changed

Post by *jonathanpoulin »

jonathanpoulin wrote: 2025-01-09, 11:51 UTC It seems that this plugin is kind of a "hybrid" one (Packer AND Lister plugin if I can say) because I see files Imagine.wcx64 and Imagine.wlx64 in its directory. Could this be the problem here?
Okay, I think I just find the bug! I tried to rename temporarily the file Imagine.wcx64 to Imagine.wcx64.bak. After that, all seems to work as expected! :D

P.S. Of course, I renamed the file to its original name after my test.
Thanks,
Jonathan Poulin
User avatar
petermad
Power Member
Power Member
Posts: 15997
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.50] PluginBaseDir automatically changed

Post by *petermad »

it looks for plugins of similar type and then tries to put the new plugin there too
That explains the unexpected results marked with red in my previous post. I have wlx plugins where there are also .wcx and/or .wdx files inside the plugin directory (Imagine, DirSizeCalc Charts).

Maybe TC should look through all dirs and prioritize matches in a dir with the same name as the plugins type (a wcx file in a wcx dir) over dirs with a name that does not match the plugin type (a wcx plugin in a wlx dir), Is that feasible?

Or TC should stop searching for similar plugin types after the first hit. The alphabetical order of the dirs is wcx, wdx, wfx and wlx so if TC stopped looking for wcx, wdx and wfx plugins after the first hit, then those wcx and wdx plugins in a wlx dir would not be found.
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
tuska
Power Member
Power Member
Posts: 4046
Joined: 2007-05-21, 12:17 UTC

Re: [TC 11.50] PluginBaseDir automatically changed

Post by *tuska »

Hmm.
I don't understand some of the statements here.
Why should one question all test results in this case?

For example, if pluginbasedir=%COMMANDER_PATH%\Plugins was recorded,
then the plugin types are sorted correctly after installation.
In the wincmd.ini file, pluginbasedir= remains unchanged.

This has been confirmed several times by tests with a TC_clean.ini.

If pluginbasedir= is changed to any path OR the path is changed during installation,
then the plugin types should be sorted into this path.

I don't understand why a change should be necessary here,
just because a user, for a reason that he cannot yet find,
installed in a different path than expected and allegedly
a parameter (set path) in the wincmd.ini was changed afterwards.
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: [TC 11.50] PluginBaseDir automatically changed

Post by *jonathanpoulin »

tuska wrote: 2025-01-09, 14:16 UTC I don't understand why a change should be necessary here,
just because a user, for a reason that he cannot yet find,
installed in a different path than expected and allegedly
a parameter (set path) in the wincmd.ini was changed afterwards.
I don't know what made the setting PluginBaseDir changed automatically, what was the steps I did. I put some time again this morning trying to reproduce to no avail. But, there is something for sure within TC that "plays" with that setting.

BTW, here are very old posts (same thread) from Raymond that got a similar wrong behaviour with PluginBaseDir.
viewtopic.php?p=47453#p47453
viewtopic.php?p=47800#p47800
Thanks,
Jonathan Poulin
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: [TC 11.50] PluginBaseDir automatically changed

Post by *jonathanpoulin »

tuska wrote: 2025-01-09, 14:16 UTC I don't understand why a change should be necessary here,
just because a user, for a reason that he cannot yet find,
And yes, I am maybe just a user... BUT I take my own time to report bugs, like this one, and to try to reproduce it over and over again, in order to make a software I like, TC, better in quality.

You know... I can also ignore it completely... I mean... by installing all the plugins manually or even use totally other tools (not TC plugins) to do my everyday work as a programmer.
Thanks,
Jonathan Poulin
Post Reply