Embarcadero / PythonEnvironments

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

Old Versions + Android libraries still missing #14

Open peardox opened 2 years ago

peardox commented 2 years ago

I notice that the versions of Python included with this package have been superceeded e.h. 3.9 is currently at 14 while 12 is included - might be an idea to update them?

Also it was necessary to manually copy the Android library into the android/version/cpu folder - e.g. python\android\3.9.12\arm64 so that it will be deployed via the IDE plugin - at the very least these should be present in the repo as otherwise Android won't work (and there's no documentation covering this)

lmbelo commented 2 years ago

I really forgot to place the Python executable and interpreter in the destination folder. I will do it as possible.

lmbelo commented 2 years ago

It is fixed now :D

lmbelo commented 2 years ago

Can you try it again?

peardox commented 2 years ago

Oh yeah, noticed that but didn't remember to point it out

I'll do a full rebuild and test in the morning - I want to get Macs ready and that takes several hours prep plus I just re-imaged my x86 Mac so need to load that up again as well

I plan to run your new samples as well as my own - changes in some events parameters mean I need to alter some stuff for upcoming Tutorials as well

lmbelo commented 2 years ago

Oh yeah, noticed that but didn't remember to point it out

I'll do a full rebuild and test in the morning - I want to get Macs ready and that takes several hours prep plus I just re-imaged my x86 Mac so need to load that up again as well

I plan to run your new samples as well as my own - changes in some events parameters mean I need to alter some stuff for upcoming Tutorials as well

Unfotunatelly the ZIP library is broken for macOS on Delphi 11.2.

Priyatham10 commented 2 years ago

Oh yeah, noticed that but didn't remember to point it out

I'll do a full rebuild and test in the morning - I want to get Macs ready and that takes several hours prep plus I just re-imaged my x86 Mac so need to load that up again as well

I plan to run your new samples as well as my own - changes in some events parameters mean I need to alter some stuff for upcoming Tutorials as well

Yeah, Please try the SimpleAndroid sample. It's working now. All the Android .so files are added to the repo now..

peardox commented 2 years ago

Well, on a freshly installed 11.2 SimpleAndroid will definitely fail from https://github.com/Embarcadero/python4delphi/pull/39 On 10.4.2 it will almost certainly work One 11.0 + 11.1 - maybe it works, I guess it does as you can obviously run it

Priyatham10 commented 2 years ago

But if you use the hack that you discovered here: https://github.com/Embarcadero/python4delphi/issues/37 for 11.2, it works. By adding the $(BDSCOMMONDIR)\Dcp\$(Platform) to Library Path, build P4D. Then SimpleAndroid of PythoEnvironment will work for 11.2. I've tested it on 11.2, and it worked. The currently discovered bug in 11.2 is only for the Mac platform, as @lmbelo mentioned above.

peardox commented 2 years ago

I put some warning messages in today's PR for python4delphi to address known Win64, Android and Linux issues.

I think that if you have 11.0/11.1 and upgrade to 11.2 you'll actually be OK as they may have had the correct $(BDSCOMMONDIR)\Dcp\$(Platform) etc entries (Linux needs a Redist)

If you install a new 11.2.1 all of the issues above will be encountered

I started adding a 'Are my paths correct?' earlier for MakeP4DComponents then got distracted by testing etc - all these issues can be easily checked by looking at some Registry keys (where all these settings are stored)

Priyatham10 commented 2 years ago

Mine is a new/fresh install of 11.2, but the above hack worked for me.

lmbelo commented 2 years ago

Well, on a freshly installed 11.2 SimpleAndroid will definitely fail from Embarcadero/python4delphi#39 On 10.4.2 it will almost certainly work One 11.0 + 11.1 - maybe it works, I guess it does as you can obviously run it

Why would it fail? I'm very sure that I have told you to include the dcp path into the IDE lib path two or three times.

peardox commented 2 years ago

We know you need the DCP/Release but nobody else does. Without being explicitly told this setting is required other people won't know what's wrong.

lmbelo commented 2 years ago

This is a Delphi issue. User may face it on any other Android library they build. @Priyatham10 can we add this info in the wiki page?

Priyatham10 commented 2 years ago

Sure, we shall mention.