How to? Switch between TCC and RT on same PC

Oct 18, 2009
126
5
#1
How can I use both TCC-RT and TCC on the same PC, other than by installing multiple user accounts, using virtual machines, etc?

I've started a separate thread asking how to do this with the current software and explaining why I would want to be able to switch--the basic issue is being able to simply double-click on a .btm file in Windows Explorer and it will automatically "know" whether to open .btm files in TCC or RT. That wouldn't be on a file-by-file basis, it would apply across the board--either all .btm files open in TCC or all open in RT.

I wouldn't want to have to repeatedly run a program that changes the file association--sooner or later something is bound to break.

How about adding an environment variable the user can set and (for instance), if that is set to RT, TCC will automatically "hand off" to RT? Don't have it set or have it set to something else, and TCC will handle it as if RT didn't exist.

It would also have to do the same treatment with CALL.
 
Last edited:
Oct 18, 2009
126
5
#2
We've had a dialog in the other thread and I've found it can work by having this in tcstart.btm:

Code:
@echo off
:: These two lines are completely unrelated.
Set path=C:\Program Files\JPSoft\BTM;%path
CALL "C:\Program Files\JPSoft\BTM\setalias.btm"

IFF EXIST C:\TEMP\USE_TCC_RT.TXT THEN
   "C:\Program Files\JPSoft\TCC_RT_20\tcc.exe" %$
   EXIT
ENDIFF
USE_TCC_RT.TXT is a "switch file". If the file exists the program (tcstart.btm) does one thing. If it doesn't exist that part is skipped.
It should also work with an environment variable instead. I prefer switch files, since they don't require special setups or changes to the user's PC. (They can work even if they're only on a network.)

Please add info on this in the Help.

=============
Below are two files used to test calling from one .btm to another:

Filename: 0-show_ver.btm
Code:
@echo off
Echo 0-show
ver
CALL "c:\Program Files\JPSoft\BTM\1-show_ver.btm" ABC
Echo Back from 1-show
pause
Filename: 1-show_ver.btm
Code:
@echo off
ver
Echo Data received from 0-show: %1
pause