[Lazarus] How to add & change application EnvironmentList ?
Michael Van Canneyt
michael at freepascal.org
Thu Aug 27 11:58:57 CEST 2015
On Thu, 27 Aug 2015, FreeMan wrote:
> On 27.08.2015 00:44, Michael Van Canneyt wrote:
>>
>> I use this technique to provide environment parameters to a newly started
>> program since many years.
>>
>> Michael.
>
> You mean, need make "starproject1" application and its starts to "project1"
> main application. Is this right? If this answer is yes, I think bash script
> is much easy way, because Application can check system parameter, or others,
> then create bash script and terminate self, and maybe (need test) on
> terminate run created script.
> If TProcess can get extra parameter, why not add to current process? but I
> think this is compiler site problem, get variable function is there but there
> is no get functions.
I'm sorry, I absolutely do not understand what you want to say.
Application.EnvironmentList contains the environment of the current process.
You must consider this read-only.
TProcess.Environment can be used to specify the environment of a newly started process.
Michael.
More information about the Lazarus
mailing list