DPM icon indicating copy to clipboard operation
DPM copied to clipboard

Add Environment Variables options

Open viniciusfbb opened this issue 4 years ago • 3 comments

Hi Vincent!

First, I would like to thank you for the beautiful project!

It would be great if you added the option to change and add Environment Variables from the IDE (registry HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\22.0\Environment Variables). It's something that other package managers don't have and essential in some cases. For example, Skia4Delphi needs to add the variable SKIADIR and also add some directories in the PATH:

image

viniciusfbb avatar Oct 02 '21 21:10 viniciusfbb

I'm guessing this is so the apps can find the dll's? In that case a better option would be to copy the dll's to the output folder - like we do with runtime packages. Right now there isn't a feature for that (there is for runtime packages) however that would be pretty easy to add.

The reason I'm hesitant to add to the PATH is that if I install 3 versions of Skia4Delphi in 3 different projects, all 3 would end up on the path, which would cause problems.

What is the SKIADIR used for?

vincentparrett avatar Oct 02 '21 22:10 vincentparrett

Vicent, the SKIADIR is essential, because our plugin set automatically the deployment files in all platforms of the project:

image

and as you can see in the image, we use the $(SKIADIR) variable. We also use SKIADIR to copy the dll to the application output when compiled, as deployment windows only works for remote builds.

The PATH is used to add the win32 dll path so that the package loads the dll at designtime when the package is loaded by IDE. In this case, copy the dll to the delphi's bpl folder would solve it, but I still think the best practice would be to add it to the PATH.

viniciusfbb avatar Oct 02 '21 22:10 viniciusfbb

If a design time package needs a dll, having the dll in the same folder as the bpl would be enough to find it.

I'll look at the env variable option when I get a chance.

vincentparrett avatar Oct 02 '21 22:10 vincentparrett