Jump to content

vmishka

Members
  • Content Count

    10
  • Joined

  • Last visited

Everything posted by vmishka

  1. I am using Delphi 11.3 Alexandria Community Edition. I am working on an educational application to teach the 3-check chess variant. It will use Python4Delphi and the python-chess library. The python-chess library can generate an SVG image of the chessboard after each move. I am testing to see if the SVGIconImageList package, specifically the SVGIconImage component, will display the chessboard. I have a test app with an SVGIconImage, a Memo, and a Button on the form. The SVGIconImage is empty at start-up. The SVGIconImage is using Live Binding with the Memo component. The app compiles and runs correctly as a 32-bit application. I can copy and paste an SVG text into the memo and when I change the focus by clicking on the button, the chessboard is displayed. If I compile as a 64-bit application, the form is never displayed and I immediately get a run-time access violation. The System Unit, line 18878, is displayed in the IDE, "Result := (Child <> nil) and Child.InheritsFrom(Parent);" Is this because the default SVG Factory is 32-bit only? I tried using the first method described here (https://github.com/EtheaDev/SVGIconImageList/wiki/Choice-of-Factories) by adding an initialization section with "SetGlobalSVGFactory(GetSkiaSVGFactory);" but it will not compile because both SetGlobalSVGFactory and GetSkiaSVGFactory are undeclared (so, I guess I must be missing something in the uses section or I am not putting that statement in the correct place). Is there a different reason for the access violation in a 64-bit compile? Can anyone help me get this running as a 64-bit VCL application? Thank you for your help.
  2. Thank you for your response, Gary. Attached are screenshots of the Library paths. Windows 64 points to Image32\source\ just as Windows 32 does, and Skia has both a Win32\Release and a Win64\Release. How does this information help me compile and run successfully as a Win64 application?
  3. I am having a great deal of difficulty installing Python4Delphi under Delphi 10.4 and I would appreciate some help. I watched Jim McKeeth's YouTube video "Getting Started with Python4Delphi" several times, but with all due respect to Jim, it didn't help me. People who ask basic installation questions want to know step-by-step instructions on how to proceed -- SLOWLY. The person doing the training should not assume that such a person has any knowledge of installing 3rd party components. It would seem that Jim's purpose is to show how quickly and easily he can do something since he already knows how to do it. I used Delphi extensively years ago (huge project 20-25 years ago, smaller project 5 years ago) but didn't have the need to install many 3rd party components, and the ones I did install many years ago were not as complicated as this. I have followed the installation instructions at https://github.com/pyscripter/python4delphi/wiki/Installation. I cloned the repo to D:\Components\P4D using "Git CMD" (not from within the Delphi IDE like Jim seemed to do on his video). I believe that step was successful. Then, as instructed, I added the source subdirectories (D:\Components\P4D\Source, D:\Components\P4D\Source\vcl, and D:\Components\P4D\Source\fmx) to the IDE library path for Windows 64-bit (which is the target I intend to use when I write code). I did not add them to Windows 32-bit at first but did so later even though I only want to build Windows 64-bit programs. As instructed, I found P4DComponentSuite.groupproj in my "D:\Components\P4D\Pacakges\Delphi\Delphi 10.4+" directory and opened it within the Delphi IDE (please see "IDE Screenshot). I believe that I am supposed to build the project at this point (and then perhaps Install?). However, when I right-clicked in the Projects area and chose "Build..." it failed with the error "Required Package DesignIDE not found." It looked to me like something was probably missing in my library path, so I searched my drive for "DesignIDE" and found designide270.bpl in the C:\Program Files (x86)\Embarcader\Studio\21.0\bin folder and designide.dcp in the \win32\release and \win32\debug folders. I am concerned that designide270 somehow refers to Python 2.7 which is not what I want, but that is the only designide*.bpl on my system. I have Python 3.9 on my system and all of the Python libraries that I will be using need Python 3. However, I added the bin, debug, and release folders to both my Windows 64-bit library path and my Windows 32-bit library path. To do it to the Windows 32-bit library path is very confusing to me. I want to build Windows 64-bit projects only. Nothing changed if I try to Build using Windows 64-bit. Thinking that the Delphi IDE might be 32-bit and somehow I need to build this package under 32-bit, I tried that. When I try to build with a target of Windows 32-bit (the error changes to: "Can't load package Python$(Auto).bpl. The system cannot find the file specified." I don't understand the $(Auto) notation. I found Python270.bpl in my "C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl" folder and tried adding that directory to the 32-bit library path but I get the same error. Again, I am pretty sure that Python270 refers to Python 2.7 which is not what I want. I have run out of ideas. Would someone familiar with installing Python4Delphi please be so kind as to "talk" me through click-by-click how to successfully install this package so that I can build Windows 64-bit programs where the Python part is Python 3? Thank you.
  4. Hello, I haven't used Delphi in many years but need to do so now. So please consider me very new to the platform with very little knowledge of things that I am sure are second-nature to most of you. I am trying to install the Python4Delphi packages into Delphi 10.4 into the Windows 64 Target platform. I know that there is a specific forum for Python4Delphi, but this question is general and very basic and I thought it would be more appropriate here. The instructions from the Python4Delphi github wiki are: Open the "P4DComponentSuite" project group which can be found under Packages\Delphi\Delphi 10.4+ directory. Then install the dclPython, dclPythonVcl and dclPythonFmx design-time packages. There is a P4DComponentSuite.groupproj file in the directory referred to and I right-clicked on that and selected "Open" from the context menu when the IDE was open. Is that correct? (please see IDE screenshot.jpg, upper right). There are entries in the Projects area for dclPython$(auto).bpl, dclPythonVcl$(Auto).bpl, and dclPythonFmx$(Auto).bpl. If this is correct, what do I do next? At some point, when I was right-clicking something in the Projects area, the context menu contained an "Install" command and I thought that I was on the right track. However, now the "Install" command is gone (please see Context menu.jpg). When I go to the "Component|Install Packages|Add..." menu item, that doesn't seem to help because if I navigate to the appropriate directory, there are no .bpl files as such. I would greatly appreciate some simple, clear instructions on how to accomplish this basic task. Thank you in advance.
  5. vmishka

    How to install a design-time package

    Thank you emailx45. While your help did not immediately fix the problem for me (the solution turned out to be to uninstall Delphi 10.4 and install the new 10.4.2), I really appreciate the thorough explanation of how to deal with runtime and design-time components.
  6. vmishka

    Trouble installing Python4Delphi

    Thank you pyScripter. I really appreciate your help. I uninstalled 10.4 and installed 10.4.2. Then, I was able to open the groupproj, and with a target of Windows 32-bit, Build All successfully and install dclPython, dclPythonVcl, and dclPythonFmx. I will concentrate on looking at the demo projects. To make doubly sure that I don't mess anything up in the future: To arrange to develop 64-bit Windows applications using Python4Delphi, I can go back to the groupproj, change the target to Windows 64-bit for Python270.bpl, PythonVcl270.bpl, and PythonFmx270.bpl and then build each of those individually (no Build All). If I understand correctly, if that is successful, I am good to go (nothing else to install). Is that correct?
  7. vmishka

    Trouble installing Python4Delphi

    Thank you, pyscripter. I know that you are the developer and I have great respect for you. I don't want to waste your time, but I am not experienced enough in installing components to do this without click-by-click instructions. I added the folders that were mentioned in the installation wiki to the Windows 32-bit library path. I also added certain Embarcadero Studio folders to the path. Attached are screenshots of my library paths for both Windows 32-bit and Windows 64-bit. I have the Python.dproj - Projects open "P4D ComponentSuite." (see screenshot) I completely removed the 64-bit targets at this point. Every target is Windows 32-bit. Whatever I try to build, e.g., right-click on P4D Component Suite and choose Build all... or right-click on the individual lines that do not contain "dcl" and choose "Build..." I get the same error, every time - "Can't load package Python$(Auto).bpl. The system cannot find the file specified." (Complete Build readout below). At this point, the only specified .bpl file that is on my system is Python270.bpl in the "C:Users\Public\Documents\Embarcadero\Studio\21.0\Bpl" folder. (see screenshot, my search everything would find any file containing both Python and bpl). Please tell me how to proceed step-by-step, click-by-click so that I can install your fine software. Assume that I know absolutely nothing about which files to build in what order, or how to install .bpl files (because in reality, I don't know those things). Thank you. Checking project dependencies... Building Python.dproj (Debug, Win32) brcc32 command line for "Python.vrc" c:\program files (x86)\embarcadero\studio\21.0\bin\cgrc.exe -c65001 "Python.vrc" -foPython.res dcc32 command line for "Python.dpk" c:\program files (x86)\embarcadero\studio\21.0\bin\dcc32.exe -$O- -$W+ --no-config -B -Q -TX.bpl -AGenerics.Collections=System.Generics.Collections; Generics.Defaults=System.Generics.Defaults;WinTypes=Winapi.Windows;WinProcs=Winapi.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -DDEBUG -I"c:\program files (x86)\embarcadero\studio\21.0\lib\Win32\release";C:\Users\Lawrence\Documents\Embarcadero\Studio\21.0\Imports;"c:\program files (x86)\embarcadero\studio\21.0\Imports";C:\Users\Public\Documents\Embarcadero\Studio\21.0\Dcp;"c:\program files (x86)\embarcadero\studio\21.0\include"; C:\Users\Lawrence\Documents\Embarcadero\Studio\21.0\CatalogRepository\SynEdit-1.5-Sydney\source;D:\Components\P4D\Source;D:\Components\P4D\Source\vcl; D:\Components\P4D\Source\fmx;"C:\Program Files (x86)\Embarcadero\Studio\21.0\bin";"C:\Program Files (x86)\Embarcadero\Studio\21.0\lib\win32\release"; "C:\Program Files (x86)\Embarcadero\Studio\21.0\lib\win32\debug";C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl -LEC:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl -LNC:\Users\Public\Documents\Embarcadero\Studio\21.0\Dcp -NSData.Win;Datasnap.Win;Web.Win; Soap.Win;Xml.Win;Bde;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;DUnitX.Loggers.GUI;Winapi;System.Win; -O"c:\program files (x86)\embarcadero\studio\21.0\lib\Win32\release";C:\Users\Lawrence\Documents\Embarcadero\Studio\21.0\Imports;"c:\program files (x86)\embarcadero\studio\21.0\Imports";C:\Users\Public\Documents\Embarcadero\Studio\21.0\Dcp;"c:\program files (x86)\embarcadero\studio\21.0\include"; C:\Users\Lawrence\Documents\Embarcadero\Studio\21.0\CatalogRepository\SynEdit-1.5-Sydney\source;D:\Components\P4D\Source;D:\Components\P4D\Source\vcl; D:\Components\P4D\Source\fmx;"C:\Program Files (x86)\Embarcadero\Studio\21.0\bin";"C:\Program Files (x86)\Embarcadero\Studio\21.0\lib\win32\release"; "C:\Program Files (x86)\Embarcadero\Studio\21.0\lib\win32\debug";C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl -R"c:\program files (x86)\embarcadero\studio\21.0\lib\Win32\release";C:\Users\Lawrence\Documents\Embarcadero\Studio\21.0\Imports;"c:\program files (x86)\embarcadero\studio\21.0\Imports";C:\Users\Public\Documents\Embarcadero\Studio\21.0\Dcp;"c:\program files (x86)\embarcadero\studio\21.0\include"; C:\Users\Lawrence\Documents\Embarcadero\Studio\21.0\CatalogRepository\SynEdit-1.5-Sydney\source;D:\Components\P4D\Source;D:\Components\P4D\Source\vcl; D:\Components\P4D\Source\fmx;"C:\Program Files (x86)\Embarcadero\Studio\21.0\bin";"C:\Program Files (x86)\Embarcadero\Studio\21.0\lib\win32\release"; "C:\Program Files (x86)\Embarcadero\Studio\21.0\lib\win32\debug";C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl -U"c:\program files (x86)\embarcadero\studio\21.0\lib\Win32\release";C:\Users\Lawrence\Documents\Embarcadero\Studio\21.0\Imports;"c:\program files (x86)\embarcadero\studio\21.0\Imports";C:\Users\Public\Documents\Embarcadero\Studio\21.0\Dcp;"c:\program files (x86)\embarcadero\studio\21.0\include"; C:\Users\Lawrence\Documents\Embarcadero\Studio\21.0\CatalogRepository\SynEdit-1.5-Sydney\source;D:\Components\P4D\Source;D:\Components\P4D\Source\vcl; D:\Components\P4D\Source\fmx;"C:\Program Files (x86)\Embarcadero\Studio\21.0\bin";"C:\Program Files (x86)\Embarcadero\Studio\21.0\lib\win32\release"; "C:\Program Files (x86)\Embarcadero\Studio\21.0\lib\win32\debug";C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl -K00400000 --description:"Python4Delphi - Run-time Engine Package" -NBC:\Users\Public\Documents\Embarcadero\Studio\21.0\Dcp -NHC:\Users\Public\Documents\Embarcadero\Studio\21.0\hpp\Win32 Python.dpk Can't load package Python$(Auto).bpl. The system cannot find the file specified [Fatal Error] Can't load package Python$(Auto).bpl. The system cannot find the file specified
  8. I have a local HTML file on my HDD that draws a chessboard (the pieces can be moved to new squares by dragging) using a javascript library (chessboard.js). It opens and runs correctly in my Microsoft Edge Browser (Version 88.0.705.74 (Official Build - 64-bit)) when I double-click on it (see attached "Local file opens in Edge Browser.jpg"). I am using Delphi 10.4 Sydney (RAD Studio) under Windows 10. I would like to open that local file as a web page in a Delphi VCL application (64-bit) and have it function just like it does in my Edge Browser. When I compile and run the Delphi "EdgeBrowser" Sample Project from Samples\Object Pascal\VCL\WebBrowser\Edge, the Form opens but I get an error -- "Failed to initialise Edge browser control" (see attached "Delphi Sample Project Fails.jpg"). I tried the Internet Explorer Sample app, choosing use Edge if available, otherwise IE." It opened IE (I got a message saying that the browser is out of date) on the Bing home page. When I pasted in the URL address of my local file as copied from the real Edge browser where it works fine, "file:///D:/Javascript%20Chess/chessboardExample.html" it doesn't load in the IE sample project. The IE browser tries to change the file name to "http://file///D:/Javascript%20Chess/chessboardExample.html" and I get the "Can't reach this page" message. I have several questions: (1) Is there anything I can do to get the TEdgeBrowser component working so that I don't get the "failed initialization" error? (2) If and when TEdgeBrowser is working correctly, will I be able to open the local file by accessing the address that works in the real Edge browser? (3) If I can open the local file correctly, will I be able to access the Javascript variables and process them in my Delphi code (e.g., when you move chess pieces around the chessboard reports the new position in what is called "FEN notation")? If so, how do I go about getting access to the Javascript variables in Delphi? Thank you very much for any help.
  9. vmishka

    Delphi EdgeBrowser Sample Project Fails

    Thank you again, Günther. Obviously, when I comment out those two lines, I can open the local file in the TEdgeBrowser Component and the Javascript runs as expected. That just leaves me with my last question. Does anyone know how I would gain access to the data in the Javascript variables in my Delphi code so that I can process them (or is that even possible)? For example, you can see when I open the developer tools in the browser and inspect the console, there is information being logged with each move played on the board.
  10. vmishka

    Delphi EdgeBrowser Sample Project Fails

    Thank you, Günter. Getting EdgeView2 from GetIt AND installing the Edge Canary build solved the first problem. The sample project opens the TEdgeBrowser component without giving an error. Unfortunately, the 2nd problem still exists (not to mention that I don't know if I will be able to access the Javascript variables within the Delphi code even if it does work). In my normal Edge browser and in the Edge Canary build, I can paste in the location of my local file ("file:///D:/Javascript%20Chess/chessboardExample.html") and it opens and runs. In the sample application, when I paste that location into the edit box, it tries to convert the file address to an http: URL in the form of "http://file///D:/Javascript%20Chess/chessboardExample.html" and says "can't reach this page." Trying to edit the URL in the edit box back to the version that works in the normal browsers doesn't accomplish anything useful.
×