Embarcadero / PythonEnvironments

Components to simplify the deployment for Python environments for Delphi applications using Python4Delphi.
MIT License
44 stars 15 forks source link

GetPip is currently broken #21

Closed peardox closed 2 years ago

peardox commented 2 years ago

With a GetPIP component on the form compilation results in the following error

[dcc64 Error] E1026 File not found: '....\resources\getpipscript.res'

Removing the GetPIP (fairly obvioously) resolves the issue BUT this means that dev created GetPIP will also fail

I have changed my PYTHONENVIRONMENTDIR (new Delphi, fresh build of all components)

lmbelo commented 2 years ago

You must compile all components instead of only linking to its sources. All the .res files are build at projects compile time.

peardox commented 2 years ago

All components are installed using the following steps

1) Double-click on [repo].groupproj 2) Build All (Win32 Release) 3) Install Components (Win32 Release) 4) Build All (Win32 Debug) 5) Build All (Win64 Release) 6) Build All (Win64 Debug) 7) Open Tools -> Options -> Language -> Delphi -> Library 8) Add new Library Path(s) (lib/Win64/release) 9) Add new Debug DCU Path(s) (lib/Win64/debug) 10) Add new Library Path(s) (lib/Win32/release) 11) Add new Debug DCU Path(s) (lib/Win32/debug) 12) Close Delphi without saving project (so it opens as Win32 if you need to do it again)

This process is repeated for each of the five repos = 60 steps in total - see, needs instructions :)

lmbelo commented 2 years ago

Presumably you got it working out, right?

peardox commented 2 years ago

But with the above steps which should be those required for proper installation GetPIP throws the above error

Maybe adding the source directory will resolve the issue? Not a very elegant solution though...

lmbelo commented 2 years ago

As you need to set a path to the lib folder, you definitely need to set a path to the resource folder. How would the linker find the respective .res file to embed it to the executable file?

peardox commented 2 years ago

Wasn't sure if it was needed or not

Which entry Browsing Path I guess?

image

lmbelo commented 2 years ago

Library path. Browsing path is used by the IDE to search for units.

peardox commented 2 years ago

Doesn't your Enable Python IDE thing do this too?

i.e. either add e.g. [D:\Delphi\Components\PythonEnviroments\src\AddOn] to Library or select Enable Python from the project menu?

peardox commented 2 years ago

Works again nicely now - thx