Linking a new CEF build to JCEF

Having problems with building or using the JCEF Java binding? Ask your questions here.

Linking a new CEF build to JCEF

Postby KatrinaS » Sun Jan 21, 2024 8:50 am

So I got a fresh win 11 workstation, installed the required prerequisites (I was a bit sad because the system was as fresh as a daisy and I was making it 'dirty' :lol:) and after following the instructions 99.99% verbatim (just changed c:\code to c:\Code\,,,) did the manual build, and for the first time ever I got a CEF release build out of it :o :D Man I can't believe what was causing it to fail on my old Betsy :lol: Anyway...

Got and ran cefclient.exe, and bing it works :)

The only thing that's not making anything currently is the Manual Packaging (just getting the instantly closing cmd.exe console) but I'm sure / hopes I'll get to the bottom of it / muddle through (probably just something about where I'm creating a .bat file) :D

So you know the JCEF has the CMakeLists.txt and it downloads the Tar,, well how would I go about rather than doing that download how can I link / put / whatever the output of the CEF build process in to the JCEF build (without hackily just dropping the CEF build bits into a random unpacked Tar's folder and perhaps causing chaos)? How would I do that bearing in mind that my Python knowledge is non-existent and my C/++ is rudimentary (just enough to build JNI Dlls)? :)
KatrinaS
Mentor
 
Posts: 83
Joined: Tue Jul 04, 2023 6:30 pm

Re: Linking a new CEF build to JCEF

Postby KatrinaS » Sun Jan 21, 2024 11:57 am

Here's what I'm currently thinking :

1. Get the manual packaging sorted.
2. Package it to the JCEF third_party folder (rather than to, err, wherever it gets put when it default works, dunno).
3. Update / edit CMakeLists.txt pointing at the new Zip / Tar / 7z. Editing the extension to suit (it doesn't download if it's already there).
4. Comment out the SHA download bit in CMakeLists.txt and just returning okay (0 or whatever) from it.
5. It'll continue to unpack like it normally would.
6. Compile and 'bing' job done. :)
7. Then laugh maniacally at all the SeCuRiTy tHrEaTs I've introduced (not really, it's never going to be used to browse the web as such). :D
KatrinaS
Mentor
 
Posts: 83
Joined: Tue Jul 04, 2023 6:30 pm

Re: Linking a new CEF build to JCEF

Postby magreenblatt » Sun Jan 21, 2024 12:24 pm

It should be enough to place the extracted binary distribution at the usual location in the third_party directory and update CMakeLists.txt version to match.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Linking a new CEF build to JCEF

Postby KatrinaS » Sun Jan 21, 2024 12:48 pm

Oh good, I'll see what the Manual Packaging turns out like (think I just need to install 7zip or something, dunno what creates the Tar things) and like just copy it in and give it a go :)
KatrinaS
Mentor
 
Posts: 83
Joined: Tue Jul 04, 2023 6:30 pm

Re: Linking a new CEF build to JCEF

Postby magreenblatt » Sun Jan 21, 2024 1:34 pm

You don’t need to create an archive if it’s a local build (pass ‘--no-archive’ to make_distrib.py)
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Linking a new CEF build to JCEF

Postby KatrinaS » Sun Jan 21, 2024 2:02 pm

magreenblatt wrote:You don’t need to create an archive if it’s a local build (pass ‘--no-archive’ to make_distrib.py)


Ahhhhh :D After a cursory I did see there were some arguments,, I'll add that and see what appears this time :) And then just put this output in 'Release', but this folder is currently inside a download extracted folder, I'm using VS22, and it works fine / in the like folder view, is there anything I need to comment out in CMakeLists.txt so to make it look just in this new 'Release' folder? I know that tinkering with the VS generated project files in say notepad just corrupts its cache or something :)
KatrinaS
Mentor
 
Posts: 83
Joined: Tue Jul 04, 2023 6:30 pm

Re: Linking a new CEF build to JCEF

Postby magreenblatt » Sun Jan 21, 2024 2:44 pm

The make_distrib script will create a directory named something like cef_binary_120.2.7+g4bc6a59+chromium-120.0.6099.234_windows64. Copy that whole directory to the correct third_party location (same location as if you downloaded the distribution normally).
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Linking a new CEF build to JCEF

Postby KatrinaS » Sun Jan 21, 2024 2:59 pm

Okay *thumbs up*. Oh,, I put the run .py in a .bat file, where should this go, I mean where's the best place, just in 'c:\code' will do? :)
KatrinaS
Mentor
 
Posts: 83
Joined: Tue Jul 04, 2023 6:30 pm

Re: Linking a new CEF build to JCEF

Postby KatrinaS » Sun Jan 21, 2024 3:25 pm

I've put a 'create.bat' in C:\Code :

cd C:\Code\chromium_git\chromium\src\cef\tools
./make_distrib.bat --ninja-build --no-archive

Nothing but a cmd.exe console flash happens :cry: Maybe it's being created but I just don't know where,, I did see such a likely suspect folder once but I can't find it now :roll: :lol:
KatrinaS
Mentor
 
Posts: 83
Joined: Tue Jul 04, 2023 6:30 pm

Re: Linking a new CEF build to JCEF

Postby magreenblatt » Sun Jan 21, 2024 4:39 pm

Run it from a cmd.exe window so you can see the output. If your build is 64-bit you need to add ‘--x64-build’.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Next

Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 157 guests