By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!> Seems like TCC doesn't like environment variables in tcmd.ini. I've got an env. var called HOME defined as "C:\home" and I'm trying to use %HOME as the startup dir in tcmd.ini. I'm on Win7 64, TCC 11.
> Seems like TCC doesn't like environment variables in tcmd.ini. I've got
> an env. var called HOME defined as "C:\home" and I'm trying to use
> %HOME as the startup dir in tcmd.ini. I'm on Win7 64, TCC 11.
For most .INI directives it's irrelevant, and for the rest TCMD doesn't have any way of knowing whether to expand variables when loading TCMD.INI or when executing commands.
> ---Quote (Originally by rconn)---
> For most .INI directives it's irrelevant, and for the rest TCMD doesn't
> have any way of knowing whether to expand variables when loading
> TCMD.INI or when executing commands.
> ---End Quote---
> Well, it's relevant to cross-platform setup of user's logs, history
> files, start dir, etc. "Has no way of knowing" - isn't %VAR or %VAR%
> enough of a clue that we're dealing with an env. var? tcmd.ini could
> also have an explicit flag: "Expand env. variables: yes/no".
The problem isn't recognizing that there's a variable, the problem is that (1) TCC can't tell if you want it expanded now or later, and (2) at the time the TCMD.INI file is parsed, the TCC parser isn't yet capable of doing expansion (because there are a lot of .INI options that define subsequent expansion parameters).
> I think that people are just wanting environment variables, not
> internal variables or functions or pseudovars or whatever. If you
> could expand those, replacing doubled percents signs with single ones,
> then users could use e.g. %USERPROFILE% if they want it expanded during
> .INI processing, or %%USERPROFILE%% if they want it expanded later.
> The real trick might be deciding which directives should support
> environment-variable expansion. I think it might not be appropriate in
> all lines....
To recapitulate (for the nth time in n years)
no discernible benefit for the users
> ---Quote (Originally by rconn)---
> To recapitulate (for the nth time in n years)
> no discernible benefit for the users
> ---End Quote---
> If you had to explain this n times in n years, I'd say there's a very
> discernible interest among the users... ;)
extproc weave.rex
!src
!set ypath #g:\save\newin\jpsoft#
!new #ypath#\4start.btm
!put #@echo off##
!inc startnt
!new #ypath#\tcstart.btm
!put #@echo off##
!inc starttc
!new #ypath#\alias.4nt
!inc aliases
!inc alias4nt
!new #ypath#\alias.tc
!inc aliases
!inc aliastc
!new #ypath#\environ.4nt
!inc environ4nt
!inc environs
!new #ypath#\environ.tc
!inc environtc
!inc environs
!end
!topic 4start
!src startnt
!put #alias /r #ypath#\alias.4nt##
!put #set /r #ypath#\environ.4nt##
!lbl starttc
!put #alias /r #ypath#\alias.tc##
!put #set /r #ypath#\environ.tc##
!end
Aliases with a semicolon represent cdd directory.
!topic Aliases
!src aliases
dl:=m:\download
cdata:=h:\save\cdata
usr:=g:\users\wendy
drives=echo %_drives
!lbl alias4nt
!lbl aliastc
!end
secon32 = Scriptease (CEnvi).
!topic Environment
!src environs
.rex=regina.exe
.cmm=secon32.exe
!lbl environ4nt
!lbl environtc
!end
!end