[Implemented] make wcmd_xxx.chm files work from any folder

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

[Implemented] make wcmd_xxx.chm files work from any folder

Post by *petermad »

AS it is now TC treats wcmd_xxx.lng, wcmd_xxx.mnu, wcmd_xxx.inc and wcmd_xxx.ini as a unit, even if the files are not located in TC's Language directory.

That is if I have the four files in for example c:\test and I load c:\test\wcmd_xxx.lng (using the OPENLANGUAGEFILE command), then the 3 corresponding files from c:\test is used by TC.

But if I also have a wcmd_xxx.chm file in c:\test that help file is not used when I load c:\test\wcmd_xxx.lng - it will only be used if it is located in %COMMANDER_PATH%\Language\

It would be nice if a wcmd_xxx.chm file could be loaded from the same directory as the wcmd_xxx.lng file
Last edited by petermad on 2022-06-10, 23:23 UTC, edited 2 times in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: make wcmd_xxx.chm files work from any folder

Post by *ghisler(Author) »

This should be doable, thanks for the suggestion.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: make wcmd_xxx.chm files work from any folder

Post by *petermad »

ghisler(Author) wrote: 2021-06-20, 06:49 UTC This should be doable, thanks for the suggestion.
Thanks :) - of course if no .chm file is found in the c:\test directory in the example above, then TC should look in %COMMANDER_PATH%\Language for a .chm file that matches the language, as it is currently done.

And support for wcmd_xxxDark.chm files in the c:\test directory would also be appreciated.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: make wcmd_xxx.chm files work from any folder

Post by *petermad »

history.txt wrote:25.06.21 Fixed: When loading language files from a different directory than the default (e.g. via OPENLANGUAGEFILE), then also look for CHM/HLP files in the same directory (32/64)
Thanks for implementing this in TC 10.50b1 - seems to work fine - also for wcmd_xxxDark.chm files :-)
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [Solved] make wcmd_xxx.chm files work from any folder

Post by *ghisler(Author) »

Nice, I didn't even think about the DARK variant, but it's tied to the path of the normal one.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [Implemented] make wcmd_xxx.chm files work from any folder

Post by *petermad »

2ghisler(Author)

I just realized that a wcmd_xxxDark.chm is only used if there is also a corresponding wcmd_xxx.chm in the same folder - even if the folder is %COMMANDER_PATH%\Langúage.

Would it be possible to change that so wcmd_xxxDark.chm will be used also without the wcmd_xxx.chm file being present?
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [Implemented] make wcmd_xxx.chm files work from any folder

Post by *ghisler(Author) »

That would be a reasonable change, I will add it to my todo list.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [Implemented] make wcmd_xxx.chm files work from any folder

Post by *petermad »

Thanks :-)
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [Implemented] make wcmd_xxx.chm files work from any folder

Post by *petermad »

Also i realized that only file names like Wcmd_XXX.chm and Wcmd_XXXDark.chm works with corresponding Wcmd_XXX.lng files.

It would be nice if also Wcmd_YYY_XXX.chm and Wcmd_YYY_XXXDark.chm could work with Wcmd_YYY_XXX.lng files - just like Wcmd_YYY_XXX.lng, Wcmd_YYY_XXX.inc, Wcmd_YYY_XXX.mnu and Wcmd_YYY_XXX.ini files already work together.

Reason for request - see: viewtopic.php?p=418512#p418512 - last line.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [Implemented] make wcmd_xxx.chm files work from any folder

Post by *petermad »

*Bump - it would be nice if the proposed changes could reach TC 10.51 final
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [Implemented] make wcmd_xxx.chm files work from any folder

Post by *ghisler(Author) »

I have tried adding it, but the switch between light and dark happens in a completely different location (deep in the Delphi library) than the switch between help files, so I don't even get there when the light help file isn't there...
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [Implemented] make wcmd_xxx.chm files work from any folder

Post by *petermad »

2ghisler(Author)
OK - how about the other part about supporting name schemes like Wcmd_YYY_XXX.chm and Wcmd_YYY_XXXDark.chm ?
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [Implemented] make wcmd_xxx.chm files work from any folder

Post by *ghisler(Author) »

What exactly do you need there? Can you give me an example of which CHM file name needs to be found for which lng file name?
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [Implemented] make wcmd_xxx.chm files work from any folder

Post by *petermad »

If I for example use wcmd_pm_dan.lng (together with wcmd_pm_dan.mnu, wcmd_pm_dan.inc and wcmd_pm_dan.ini) in for example "c:\mylanguages" directory I would like TC to use wcmd_pm_dan.chm and wcmd_pm_danDark.chm if present in the same "c:\mylanguages" directory.

If wcmd_pm_dan.chm and wcmd_pm_danDark.chm are NOT present then use in this priority:
1. wcmd_dan.chm and wcmd_danDark.chm in "c:\mylanguages"
2. wcmd_dan.chm and wcmd_danDark.chm in" %COMMANDER_PATH%\Language" directory
3: totalcmd.chm and totalcmdDark.chm in the "%COMMANDER_PATH%" directory
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [Implemented] make wcmd_xxx.chm files work from any folder

Post by *ghisler(Author) »

Currently I'm already using steps 1 to 3. I'm not looking for wcmd_pm_dan.chm, though, but that should be easy to fix.
Author of Total Commander
https://www.ghisler.com
Post Reply