Page 1 of 1
Where do I go wrong...?
Posted: Fri May 08, 2020 4:40 pm
by dvhooren
I have a problem in getting the TChromium component
1) downloaded
https://github.com/salvadordf/CEF4Delphi.git
2) unzipped in directory
3) opened Delphi 10.3.3
4) loaded
..\CEF\CEF4Delphi-master\packages\CEF4Delphi.dproj
5) switched platform to 64 bit
6) BUILD
7) the BPL file is created and stored in
C:\Users\Public\Documents\Embarcadero\Studio\20.0\Bpl\Win64\CEF4Delphi.bpl
8) BPL file is 1.6 Mb.
Then I opened my big project in which I want to embed the TChromium component
9) Open my project
10) add
..\\CEF\CEF4Delphi-master\source
to the searchpath
11) Install package so I can put the TChromium component in a panel.
Select the BPL which was compiled in step 7
Can't load package Error occurs ... is not a valid win32 application
Who knows where I miss something?
Re: Where do I go wrong...?
Posted: Fri May 08, 2020 5:18 pm
by salvadordf
Hi Danny,
Sorry for moving this conversation to this forum but I use Facebook mostly from my phone and it's much more comfortable to write in a normal PC keyboard.
If you have DCEF3 or any other version of CEF4Delphi I would uninstall all of them first to be safe.
Follow these steps :
- Run Delphi / Rad Studio.
- Uninstall DCEF3 or any other old CEF4Delphi package in the IDE.
- Open the Tools->Options menu in Delphi and make sure that the "Library path" for 32 bits and 64 bits does NOT include any DCEF3 directory.
- Close Delphi / Rad Studio.
- Delete the BPL and DCU files created by DCEF3 and CEF4Delphi in C:\Users\Public\Documents\Embarcadero\Studio\<Delphi_version>\
- Run Delphi / Rad Studio.
- Open the CEF4Delphi.dproj file.
- Make sure the 32 bits option is selected in the "Target platforms".
- Click on the Build option in the Project manager.
- Click on the Install option in the Project manager. (This step was missing in your list)
- Select the 64 bit option in the "Target platforms".
- Click on the Build option again in the Project manager.
After that, download the 64 bits version of the CEF binaries. Use the link to the CEF binaries found in the "Readme.md" file.
Decompress the CEF binaries and copy the contents of the "Release" and "Resources" folders into the "bin" folder of CEF4Delphi.
It should look like this :
Now you can open the "SimpleBrowser" demo and build it. The EXE will be created inside the "bin" folder. Run the demo to see that it loads google correctly.
You will be able to use the CEF4Delphi components and copy the code from the demos to your application only when you reach this point.
Re: Where do I go wrong...?
Posted: Sun May 10, 2020 10:41 am
by dvhooren
Hi,
Thanks for this answer. These are clear steps to follow which I will go through today.
Question. You write Target Platform shold be 32 bit. My application is 64 bit.
Can I also select the target platform as 64 bit?
Re: Where do I go wrong...?
Posted: Sun May 10, 2020 10:58 am
by salvadordf
You can create 32 and 64 bits applications with CEF4Delphi but you need to build the components for both platforms in order to install them in Delphi and use them in your 64 bit application.
As you can see, the previous guide include the building steps for both platforms.
Follow the steps and you'll be able to test the demos and use the components in your application.