Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


SwiftExpat last won the day on September 6 2022

SwiftExpat had the most liked content!

Community Reputation

64 Excellent

Technical Information

  • Delphi-Version
    Delphi 11 Alexandria

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. SwiftExpat

    Optimization On or Off ?

    My guess would be ASLR, see discussion in this thread:
  2. SwiftExpat

    Modify bitmap of FMX Image object

    Looks like TCanvas.BeginScene / EndScene is missing from the code.
  3. For anyone who struggles with py embeddable in the future, here are some working executables for you to troubleshoot with. Validate your python embeddable setup, confirm package installation and test your imports. FMX and VCL X64 compiled executables in the releases : Source code & sample "_pth" file is available in the GitHub Repo : https://github.com/SwiftExpat/ValidatePythonEmbeddable Usage: Click on browse DLL , this will set the dllname and path correctly and then allow you to adjust other component properties. Then load DLL PIP List Pip results can be confusing, so I have automated the PIP list command to ensure it runs from the embeddedable dist. More should be done for this, but this is a start and feel free to fork the repository or make suggestions.
  4. No build events, but good suggestion. I built a new project group so I am testing.
  5. SwiftExpat

    Anything in a TMemoryStream??

    TMemoryStream has a size property which is size in bytes, just check to see that it is greater than zero or some minimum size that you find acceptable.
  6. You answering a question with something from left field does not help others in the future, it just gives us more comments to try and filter through. So did you just reply so that you can increase the number of posts on your profile?
  7. Autorecover is the only thing on, is there a QP report that makes you suspect that setting?
  8. In Delphi 11.3 I am curious if anyone else has seen this behavior. I can not reproduce this yet, but it has happened several times and I am curious if anyone else has seen this. I will likely rebuild this project group to see if it resolves. Symptoms / Cause of error I have open a project group with ~20 projects in the list. I am debugging projectA I am looking at the source and the IDE prompts for recompile recompile happens but random projectB executes ( I had not debugged or compiled this program in days ) no projects are active in the project group Activate projectA and everything works fine again.
  9. Profiling that code is necessary to figure out which component is taking the time, as Brian Evans said above. I use one component which takes 23 ms to execute the create. That is a long time considering there are 5 instances on the form. My fix was to delay creation of the 4 instances not visible.
  10. Glad to see you sticking with it and it sounds like you are close. I spent a long time on this but having it stable pays off in the end. Something simple like this is what I use, so just change python to 3.11 TPath.Combine(TPath.GetDirectoryName(paramstr(0)), 'python'); Pip should resolve packages in your embedded dist, this is why you use the package with the -m option. If it does not the dist is not importing site correctly and you are going to chase errors. Here is my working, by changing to the directory it will use the python binary from that folder first, so double check with the double -V. After that the concern is the location of the package, it should show in your embedded. C:\Users\Coder\AppData\Local\Programs\RunTime_ToolKit\python>python -V -V Python 3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64 bit (AMD64)] C:\Users\Coder\AppData\Local\Programs\RunTime_ToolKit\python>python -m pip list -v Package Version Location Installer --------------------- ----------- ------------------------------------------------------------------------------ --------- astroid 2.5 c:\users\coder\appdata\roaming\python\python39\site-packages pip bcrypt 3.2.0 c:\users\coder\appdata\local\programs\runtime_toolkit\python\lib\site-packages pip Now for the pth file, it should look like this: python39.zip . .\Scripts .\Lib .\Lib\site-packages # Uncomment to run site.main() automatically import site The last piece you will need is msvc runtime, python does not require it but likely a module you use will python -m pip install msvc_runtime Now you are not done yet, because Delphi wants to load that DLL from the same directory as your exe. So as part of your install just copy the dlls from python over to your exe dir. I did this for the same question a while back, so here it is as reference:
  11. This covers how to set it up, after that you can run pip against your embedded dist. Note, path is important and likely why you got the same results. https://dev.to/fpim/setting-up-python-s-windows-embeddable-distribution-properly-1081 Read through this one as well,
  12. I used pip to install them into my embedded dist, that will check for any dependencies. python -m pip install numpy python -m pip install opencv-contrib-python You should be able to diff using --List modules in embedded python -m pip list -v --list modules from other distribution pip list -v
  13. Version control that file and commit often. Then you can merge the changes or just go back to the old version of the dfm. At least this will save the pain of resetting those connections. I do not experience the problem.
  14. SwiftExpat

    Class "abcdef" not found. error??

    One of the components is likely just missing an initialization section initialization registerclass(TComponent); You could try to put it at the end of the Form and see if it will load. Just replace TComponent with the name that is failing to load.
  15. Application lifecycle and updates should drive the decision, not disk space. Write out a timeline of 3-4 update cycles for your applications and determine if you want them to both depend on the same python embedded. Can you manage that inter-dependency through the update cycle? How it looks on the target machine is a question for your customer. As long as you are not modifying the machine path the answer is likely that they will not care. If the products mature, you can always consolidate them later.