Is it possible to get the information of the location of the Purebasic configuration file within a program which is used for a IDE tool?
I have programmed a nice extension which works fine, but I'd like to use it on my USB stick as well, where I have the full purebasic environment to be able to program everywhere.
So the drive letter can be different and I can't get the information of some settings - for instance the tabulator setting from the Purebasic config file.
Michael
Variables in Configure tools
- Michael Vogel
- Addict
- Posts: 2807
- Joined: Thu Feb 09, 2006 11:27 pm
- Contact:
-
- Addict
- Posts: 4789
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: Variables in Configure tools
By default, the file is in theMichael Vogel wrote:Is it possible to get the information of the location of the Purebasic configuration file within a program which is used for a IDE tool?
I have programmed a nice extension which works fine, but I'd like to use it on my USB stick as well, where I have the full purebasic environment to be able to program everywhere.
So the drive letter can be different and I can't get the information of some settings - for instance the tabulator setting from the Purebasic config file.
Michael
Code: Select all
%APPDATA%\PureBasic\
The configuration file might be located somewhere else, depending on the command-line switches that you used when launching PB. For more details, see in the Help
Regards, Little JohnIDE Commandline options
- Michael Vogel
- Addict
- Posts: 2807
- Joined: Thu Feb 09, 2006 11:27 pm
- Contact:
Re: Variables in Configure tools
Thanks, Little John - I was searching within the help file for words, like Configure, Tools, but didn't find anything.Little John wrote:By default, the file is in the[...]Code: Select all
%APPDATA%\PureBasic\
Regards, Little JohnIDE Commandline options
I'll try that now, hopefully it will work :roll:
Michael
- Michael Vogel
- Addict
- Posts: 2807
- Joined: Thu Feb 09, 2006 11:27 pm
- Contact:
Re: Variables in Configure tools
I did not see, that this can't workMichael Vogel wrote: I'll try that now, hopefully it will work :roll:

The Environment variable %APPDATA does not show the path to the configure file (at least, when PB is started in portable mode)!
I use the portable mode, because I use my PB stuff also at work and don't want that anything is written to the registry (BTW I don't like the PB icons which get changed when the IDE is started without the /PORTABLE parameter)
So it's tricky to solve that - the only way I see is that the tool have to be given into a certain directory...
Michael
-
- Addict
- Posts: 4789
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: Variables in Configure tools
Yes, that's the reason why I wrote:Michael Vogel wrote:The Environment variable %APPDATA does not show the path to the configure file (at least, when PB is started in portable mode)!
Here it is in German: IDE Kommandozeilen-Optionen.The configuration file might be located somewhere else, depending on the command-line switches that you used when launching PB. For more details, see in the HelpIDE Commandline options
Regards, Little John
In portable mode, the preferences are always in the directory of the IDE, so for this case you can use the PB_TOOL_IDE variable like this:
I added PB_TOOL_Preferences as an environment variable for the tools for the next version.
Code: Select all
PreferenceFile$ = GetPathPart(GetEnvironmentVariable("PB_TOOL_IDE")) + "PureBasic.prefs"
I added PB_TOOL_Preferences as an environment variable for the tools for the next version.
quidquid Latine dictum sit altum videtur
- Michael Vogel
- Addict
- Posts: 2807
- Joined: Thu Feb 09, 2006 11:27 pm
- Contact: