Hello,
I would like to create a tool which would use SB preference file to get JDK and SB path after app creation, per-project basis.
But it seems no environment variables are set, when I list all environment variable (using PB) I only have standard variables set, not any from SB IDE.
Is it the right behaviour in this situation?
Thanks.
Environment variables look like to be missing for external t
-
- Posts: 6
- Joined: Thu Mar 23, 2017 6:42 pm
Re: Environment variables look like to be missing for extern
AppData\Roaming\SpiderBasic\SpiderBasic.prefs
has JDK path and registry has SB path in uninstall and extension keys.
You can add a compiler and proxy to SB. This isn't a bug.
has JDK path and registry has SB path in uninstall and extension keys.
You can add a compiler and proxy to SB. This isn't a bug.
-
- Posts: 6
- Joined: Thu Mar 23, 2017 6:42 pm
Re: Environment variables look like to be missing for extern
Basically agree with that.tj1010 wrote:AppData\Roaming\SpiderBasic\SpiderBasic.prefs
has JDK path and registry has SB path in uninstall and extension keys.
But environment variables allow to be sure of the used path.
So why, in the documentation, section The SpiderBasic IDE->External Tools, we can read this...You can add a compiler and proxy to SB. This isn't a bug.
When there are no any environment variable set?The IDE provides additional information for the tools in the form of environment variables.
I wanted to use PB_TOOL_Preferences to get the preferences file instead of hard-coding a path.
Because if I run the IDE with the /P command line (also documented) the preferences file won't be at the same place.
Re: Environment variables look like to be missing for extern
with this PB-Code:
i get this output:
Greetings ... Peter
Code: Select all
Global.s PB_TOOL_IDE = GetEnvironmentVariable("PB_TOOL_IDE")
Global.s PB_TOOL_Compiler = GetEnvironmentVariable("PB_TOOL_Compiler")
Global.s PB_TOOL_Preferences = GetEnvironmentVariable("PB_TOOL_Preferences")
OpenConsole()
PrintN("PB_TOOL_IDE: '" + PB_TOOL_IDE + "'")
PrintN("PB_TOOL_Compiler: '" + PB_TOOL_Compiler + "'")
PrintN("PB_TOOL_Preferences: '" + PB_TOOL_Preferences + "'")
Input()
CloseConsole()
so i guess, it's not a bug.PB_TOOL_IDE: 'C:\SpiderBasic\SpiderBasic.exe'
PB_TOOL_Compiler: 'C:\SpiderBasic\Compilers\sbcompiler.exe'
PB_TOOL_Preferences: 'C:\Users\peter\AppData\Roaming\SpiderBasic\SpiderBasic.prefs'
Greetings ... Peter
Re: Environment variables look like to be missing for extern
According to the docs they are PID based and passed by RunProgram(). Probably set by static PB library.
The naming doesn't surprise me because a lot of constants still use "PB" too.
The naming doesn't surprise me because a lot of constants still use "PB" too.
Re: Environment variables look like to be missing for extern
Thats for compatibility with PB. I dont think that will ever change. (you can use code from PB to SB)The naming doesn't surprise me because a lot of constants still use "PB" too.
-
- Posts: 6
- Joined: Thu Mar 23, 2017 6:42 pm
Re: Environment variables look like to be missing for extern
Hi,
When have you executed your code? after creating an APK?
Per-project basis?
That's the case I executed mine, examined all environment variables and had nothing at all except Windows environment variables.
There might be something different with your test and with mine.
When have you executed your code? after creating an APK?
Per-project basis?
That's the case I executed mine, examined all environment variables and had nothing at all except Windows environment variables.
There might be something different with your test and with mine.
-
- Posts: 6
- Joined: Thu Mar 23, 2017 6:42 pm
Re: Environment variables look like to be missing for extern
Here is my code:
A simple point which came to me, because of file system permissions under Win7, it seems I have to run my tool as an administrator. In fact I want to enhance this: http://forums.spiderbasic.com/viewtopic ... 3&start=10 (page 2). I would prefer to obtain informations from environment variables instead of being confident only in a installed version of the IDE without any command line parameters passed.
Maybe it is the reason why I haven't the environment variable in the list?
It look like strange if administrator privileged apps could access less informations, but nothing is impossible with Microsoft...
EDIT: confirmed, nothing is impossible with Microsoft...
Sorry for this wrong bug.
Code: Select all
If ExamineEnvironmentVariables()
EnvList$ = "Variables:"
While NextEnvironmentVariable()
EnvList$+ #CRLF$ + EnvironmentVariableName() + " = " + EnvironmentVariableValue()
Wend
MessageRequester("env", EnvList$)
Maybe it is the reason why I haven't the environment variable in the list?
It look like strange if administrator privileged apps could access less informations, but nothing is impossible with Microsoft...
EDIT: confirmed, nothing is impossible with Microsoft...
Sorry for this wrong bug.