Automating PYTHONENVIRONMENTDIR
peardox opened this issue · 6 comments
I've just been experimenting
We need $(PYTHONENVIRONMENTDIR) so ATM it's up to the user to set it.
However, there's a Registry key at "[HKCU]\Software\Embarcadero\BDS[DELPHIVERSION]\Environment Variables" where all Delphi's own 'EnvironmentVariables" are stored.
If on installation you know the CWD of PythonEnvironments then you can simply add the ENVVAR yourself (not sure if you know this info when installing - may only be relative)
I'm looking at this stuff to make sure the environment looks correct and also optionally add a value for my MakeP4DComponents thing.
I'm not sure how well this would work pre 19.0 as I've only checked back that far and XE won't install using a 11.2 license...
I thought to create a batch script to add it automatically as we build the project.
@Priyatham10 it will automatically set the PYTHONENVIRONMENTDIR environment variable. Can we add it to the readme?
Steps to auto set the env var:
- Build the "dclP4DEnvironmentProject.dproj" project.
That has to be the quickest Issue to Solution in history :)
That has to be the quickest Issue to Solution in history :)
Hahaa nice.. Does it work for you?
You can close it as it is done.
@Priyatham10 it will automatically set the PYTHONENVIRONMENTDIR environment variable. Can we add it to the readme?
Steps to auto set the env var:
- Build the "dclP4DEnvironmentProject.dproj" project.
Yes, Definitely! I'll update the sample too..