Page 1 of 3

[Implemented] New environment variable needed

Posted: 2011-09-17, 19:08 UTC
by petermad
After starting testing the x64 version of TC 8.0 I have had to make a lot of changes to my setup, everywhere where I start Total Commander in a new process.

In usercmd.ini and buttonbars I have used %COMMANDER_PATH%\TOTALCMD.EXE in 100's of places. They are all obsolete with the x64 version where it has to be %COMMANDER_PATH%\TOTALCMD64.EXE

I can off course change that in my *.ini and *.bar files, but then I cannot use the same files with the 32bit version, which I cannot discharge for a long time because of missing 64bit plugins.

So I suggest that we get a new environment variable:

%COMMANDER_PROGRAM%


to replace either: %COMMANDER_PATH%\TOTALCMD.EXE and %COMMANDER_PATH%\TOTALCMD64.EXE

or to replace just: TOTALCMD.EXE and TOTALCMD64.EXE.

Posted: 2011-09-17, 19:29 UTC
by m^2
I think it would be better if Christian kept calling TC totalcmd.exe.

Posted: 2011-09-17, 19:42 UTC
by Sir_SiLvA
m^2 wrote:I think it would be better if Christian kept calling TC totalcmd.exe.
No! that way you cant have 32bit and 64bit in one dir...

@pertermad: if you dont use tc 32bit anymore why not just rename tc64.exe to tc.exe?


ps: tc=totalcmd

Posted: 2011-09-17, 20:22 UTC
by m^2
Sir_SiLvA wrote:
m^2 wrote:I think it would be better if Christian kept calling TC totalcmd.exe.
No! that way you cant have 32bit and 64bit in one dir...

@pertermad: if you dont use tc 32bit anymore why not just rename tc64.exe to tc.exe?


ps: tc=totalcmd
Obviously you can. You can rename it yourself. And I would guess that if you had both in the same dir, you would write a script to automatically launch the correct one. And such script can set a variable if needed. I think that changing app name is unnecessary mess.

Posted: 2011-09-18, 14:13 UTC
by ghisler(Author)
You can just rename totalcmd64.exe to totalcmd.exe if you don't want to run the 32-bit and 64-bit versions in parallel, or better create a hard link from totalcmd.exe to totalcmd64.exe (e.g. using the tool junction.exe from www.sysinternals.com ).

Posted: 2011-09-18, 18:52 UTC
by petermad
2Sir_SiLvA
@pertermad: if you dont use tc 32bit anymore why not just rename tc64.exe to tc.exe?
As i wrote:
I cannot use the same files with the 32bit version, which I cannot discharge for a long time because of missing 64bit plugins.
So yes I do use the 32bit version. I also have a Win XP machine - it is much more practical if I can use the same .ini and .bar files with both computers.

2ghisler(Author)
You can just rename totalcmd64.exe to totalcmd.exe if you don't want to run the 32-bit and 64-bit versions in parallel,
Well, I can, but what about the users that use my extended menus - they would have to be instructed to do the same - a little akward. And what about updates - will the installer automatically rename totalcmd64.exe to toltalcmd.exe when it sees that it is present (and not being the 32bit exe in the same dir).

If I rename do I also have to rename TOTALCMD64.EXE.MANIFEST ?

Anyway - renaming seems to simply be an unpractical workaround, that doesn't even take into account that the 32bit and 64bit versions can be installed in the same dir.

Posted: 2011-09-18, 20:00 UTC
by DrShark
I support the suggestion for new internal variable like %COMMANDER_PROGRAM% since it's much easier to replace one string in all configuration files then the adaptation of the one instance of each config file for both 32 and 64 bit Total Commander installed in same directory.

Posted: 2011-09-18, 21:56 UTC
by HolgerK
Support++

Especially if you are using a portable installation you may want to start the 32bit TC version on 32bit systems.
One additional environment variable like %COMMANDER_PROGRAM% saves you the effort to install and maintain 2 versions in different installation paths.

Regards
Holger

Posted: 2011-09-18, 23:17 UTC
by Samuel
Support++

Otherwise I need to maintain 2 buttons:

Code: Select all

TOTALCMD#BAR#DATA
%Commander_Path%\TOTALCMD.EXE
/S=S "%X%Z%P" "%T"
%Commander_Path%\TOTALCMD.EXE,32
sync32
%Commander_Path%
0
-1

Code: Select all

TOTALCMD#BAR#DATA
%Commander_Path%\TOTALCMD64.EXE
/S=S "%X%Z%P" "%T"
%Commander_Path%\TOTALCMD64.EXE,32
sync64
%Commander_Path%
0
-1

Posted: 2011-09-19, 11:15 UTC
by tbeu
2Sir_SiLvA
Sir_SiLvA wrote:No! that way you cant have 32bit and 64bit in one dir...
I would not recommend to install 32 and 64 bit version in same directory. Keep it separate and you can keep the old name TOTALCMD.EXE.

2Peter_Mad
Can you fix title typo in environtment

Posted: 2011-09-19, 12:40 UTC
by MVV
All we need is 64-bit version of Autorun.wdx. It is possible to define desired envvar using this plugin. Currently the only way is to start both TC versions via a batch that will set corresponding envvar.

Posted: 2011-09-19, 18:26 UTC
by Sir_SiLvA
Please God no!
the names as they are now with a 64 are the best solution.
Apart from Autorun.wdx wich is a old Plugin that never worked correctly...

Posted: 2011-09-19, 19:05 UTC
by Sob
Sir_SiLvA wrote:the names as they are now with a 64 are the best solution.
It doesn't magically solve everything, but instead brings new problems, although I admit that's because not everyone adopted the same approach with appending "64". Did you see related thread about OpenSSL dlls? How would you solve that?

I don't think you really need both TCs in same directory, correct me if I'm wrong. What is needed are shared settings. And it should be possible even with separate TCs. Things like button bar files can be put somewhere where they can be referenced using environment variables. Plugins should store their settings in same directory where TC ini files are. A lot of them don't, but if their authors find time to produce 64-bit versions, they could fix this too.

The only real problem I see, and I must admit it's not a small one, is that it requires user to make some configuration changes, possibly a lot of them, which is of course bad. But it should be one-time thing. And maybe some nice tool to help with that could be made?

Posted: 2011-09-19, 20:02 UTC
by Sir_SiLvA
I dont think a new Variable wasting Virtual Space solves anything as in the long run
- If Chris doesnt come up with a clever way -
you will need 2 Ini-Files (one for 32/64 Bit each) as 64Bit needs 64Bit-Plugins
shared things like Gui, Copy-Etc-Options can be shared with RedirectSection
So id prefer if for sections like Plugins there would be an Option called
RedirectSection64 (only read by TC64 ofc and overriding RedirectSection)

i dont get it how someone can waste so much space with
In usercmd.ini and buttonbars I have used %COMMANDER_PATH%\TOTALCMD.EXE in 100's of places
but im surly the only one that doesnt understand that nonesense...
But to solve that Problem as Pointed out its easier to use 2 seperate directories for 32/64Bit TC with using RedirectSection...
(wich would solve also the openssl-nonesense...)

that could look ie
TotalCommand
-> TC32Bit
-> TC64Bit
-> Inis
-> PlugIns

me, I prefer 32 & 64 bit in one folder and a 64 at all 64Bit files to easily see wich are 64Bit and wich are not cause compared to 16Bit 32Bit wont die out that fast...

Posted: 2011-09-19, 20:19 UTC
by HolgerK
So id prefer if for sections like Plugins there would be an Option called
RedirectSection64 (only read by TC64 ofc and overriding RedirectSection)
Just a thought:

Code: Select all

pluginbasedir=%COMMANDER_PATH%\plugins%PROCESSOR_ARCHITECTURE%
[PackerPlugins]
RedirectSection=%COMMANDER_PATH%\wincmd_Plugins%PROCESSOR_ARCHITECTURE%.ini
[ListerPlugins]
RedirectSection=%COMMANDER_PATH%\wincmd_Plugins%PROCESSOR_ARCHITECTURE%.ini
[FileSystemPlugins]
RedirectSection=%COMMANDER_PATH%\wincmd_Plugins%PROCESSOR_ARCHITECTURE%.ini
[ContentPlugins]
RedirectSection=%COMMANDER_PATH%\wincmd_Plugins%PROCESSOR_ARCHITECTURE%.ini
Regards
Holger