WSCI is not defined as environment variable: getenv("WSCI") yields an error (unlike, SCI, SCIHOME, TMPDIR and home)
Reported by Samuel GOUGEON (@sgougeon)
BUG DESCRIPTION:
----------------
--> WSCI
WSCI =
C:\Applications\scilab\scilab-6.0.2
--> getenv WSCI
getenv: Undefined environment variable WSCI. <<<<<< The bug
--> unix_w("set W")
WIN32=OK
WIN64=OK
windir=C:\Windows
This prevents using %WSCI% in commands sent with unix_*() and host() functions.
Other main predefined paths are OK:
--> unix_w("set SCI")
SCI=C:/Applic~1/scilab/SCILAB~2.2
SCIHOME=C:\Users\I\AppData\Roaming\Scilab\SCILAB~2.2
SCIPATH=C:/Applic~1/scilab/SCILAB~2.2
--> getenv SCI
ans =
C:/Applic~1/scilab/SCILAB~2.2
--> getenv SCIHOME
ans =
C:\Users\I\AppData\Roaming\Scilab\SCILAB~2.2
--> getenv TMPDIR
ans =
C:\Users\I\AppData\Local\Temp\SC6FE7~1
--> getenv home
ans =
C:\Users\I
ERROR LOG:
----------
getenv: Undefined environment variable WSCI.
HOW TO REPRODUCE THE BUG:
-------------------------
getenv WSCI
unix_w("set W")
OTHER INFORMATION:
------------------
The setting is likely done in
\scilab\modules\ast\src\cpp\system_env\setenvvar.cpp
#79-:
static void SetScilabVariables(void)
{
//create SCI
defineSCI();
//create SCIHOME
defineSCIHOME();
//create TMPDIR
defineTMPDIR();
//create home
defineHOME();
}
and in
\scilab\modules\ast\src\cpp\system_env\sci_path.cpp
where defineSCI() is defined.