Page 1 of 2

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

Posted: 2021-06-19, 12:46 UTC
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

Re: make wcmd_xxx.chm files work from any folder

Posted: 2021-06-20, 06:49 UTC
by ghisler(Author)
This should be doable, thanks for the suggestion.

Re: make wcmd_xxx.chm files work from any folder

Posted: 2021-06-20, 22:35 UTC
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.

Re: make wcmd_xxx.chm files work from any folder

Posted: 2022-04-13, 18:56 UTC
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 :-)

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

Posted: 2022-04-14, 08:11 UTC
by ghisler(Author)
Nice, I didn't even think about the DARK variant, but it's tied to the path of the normal one.

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

Posted: 2022-07-25, 11:45 UTC
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?

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

Posted: 2022-07-25, 13:20 UTC
by ghisler(Author)
That would be a reasonable change, I will add it to my todo list.

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

Posted: 2022-07-25, 20:33 UTC
by petermad
Thanks :-)

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

Posted: 2022-07-26, 15:20 UTC
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.

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

Posted: 2022-08-10, 19:57 UTC
by petermad
*Bump - it would be nice if the proposed changes could reach TC 10.51 final

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

Posted: 2022-08-11, 07:41 UTC
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...

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

Posted: 2022-08-11, 10:39 UTC
by petermad
2ghisler(Author)
OK - how about the other part about supporting name schemes like Wcmd_YYY_XXX.chm and Wcmd_YYY_XXXDark.chm ?

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

Posted: 2022-08-11, 13:06 UTC
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?

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

Posted: 2022-08-11, 15:25 UTC
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

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

Posted: 2022-08-12, 09:50 UTC
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.