Giter Club home page Giter Club logo

gdcef's Introduction

Overview of my personal projects

Most of my projects are made in C++ and can be compiled with my, cloned as git submodule, Makefile helper (because I hate so much CMake ...) for Linux and MacOS (not for Windows) either as standalone application and/or libraries (so you can include them in your personal project).

I used to worked with Scilab because my father contributed to it. Now Scilab has passed away ... the King is dead, long live the King: Julia! Therefore my simulation projects are made in Julia and run in Jupyter notebook. AFAIK the display is broken (but this is not my fault).

I always been impressed on how compact Forth interpreters are, I tried to impelement mine as scripting langage for my project but I do not recommend you to use it.

Else I also added my student projects (Delphi Borland) and my LaTeX slides (studies and internship reports) made in years 2001--2007 (mostly for nostalgy ^^). A recurrent theme in my projects was simulation of city because of this particular project https://github.com/Lecrapouille/SimTaDyn/tree/release-EPITA-2004 mixing geographic system, spreadshet and Forth interpreter.

Chromium Embedded Framework (CEF)

System Modeling Tools

  • https://github.com/Lecrapouille/Statecharts :

    A Python script parsing PlantUML statecharts (state machine) scripts and generating the C++ code with their unit tests.

  • https://github.com/Lecrapouille/TimedPetriNetEditor :

    A graphical application and C++ library for editing (timed) petri nets, (timed) graph events and GRAFCET. This tool is coupled with (max,+) algebra and can be used with Julia.

  • https://github.com/Lecrapouille/MaxPlus.jl :

    Julia package allowing to do computations in the tropical algebra (max,+) and (min,+). An algebra where the plus and times operators are replaced by the maximum (minimum) and plus operators. This algebra is used in modeling discrete systems modeling synchronizations as linear systems. This project is a portage of the Scilab toolbox.

City based project

Predictions

C++ Libraries

Forth

Application projects

My Configs

gdcef's People

Contributors

lecrapouille avatar steacktartar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gdcef's Issues

Android Support

How realistic / doable is it, to have this run on android?

audio bus output

This is really awesome. The best CEF attempt so far :)
Is there a way to grab the audio stream from CEF and pipe it through a Godot audio bus, so that we can make it 3d positional?

Windows demo crashing immediately on play

Hey, great project!

I tried compiling this for windows and linux. Linux worked great, and I was able to run the sample projects by following the documentation.

For windows, compilation seems to finish successfully, but when running the sample project, it exits immediately as soon as I press "run", with no errors printed to the console. I've tried using different versions of godot, and compiling from previous releases, but I'm getting the same result.

Any ideas what I am missing?

wget returning 404 on valid requests in python3

For whatever reason the much more common "wget" module for python is returning 404s when attempting to download the cef binaries even though the URLs are definitely correct.

It may be worth noting in the README, as per this Stack Overflow Question, using "python3-wget" resolves the issue without having to change anything in the build.py

Please add support for Godot-4.0

I modified MODULE_TARGET = "release" and GODOT_CPP_TARGET = "release" to MODULE_TARGET = "template_release" and GODOT_CPP_TARGET = "template_release" (It won't even work if I don't) ,After that it outputs many errors
errors

FileNotFoundError on compile

  1. I am confident that all dependencies are met, I have python 3.11, vs, cmake, git and ninja
  2. I ran py -m pip install -r requirements.txt
  3. I opened x64 native tools, and cd'd into the gdcef directory
  4. I then ran py build.py from the x64 native tools terminal
  5. ERROR

C:\Users\Kian W\Downloads\gdcef\addons\gdcef>py build.py
←[32m[INFO] Checking cmake version ...←[00m
Microsoft (R) C/C++ Optimizing Compiler Version 19.35.32215 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

win.cc
Microsoft (R) Incremental Linker Version 14.35.32215.0
Copyright (C) Microsoft Corporation. All rights reserved.

/out:win.exe
win.obj
[INFO] MS C++ Compiler OK
[INFO] Compiling Godot C++ API (inside C:\Users\Kian W\Downloads\gdcef\addons\gdcef\thirdparty\godot-3.5\cpp) ...
Traceback (most recent call last):
File "C:\Users\Kian W\Downloads\gdcef\addons\gdcef\build.py", line 479, in
compile_godot_cpp()
File "C:\Users\Kian W\Downloads\gdcef\addons\gdcef\build.py", line 365, in compile_godot_cpp
run(["scons", "platform=windows", "target=" + GODOT_CPP_TARGET,
File "C:\Users\Kian W\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Kian W\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1024, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\Kian W\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1493, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified

any ideas, I got this to compile on ubuntu wsl, but that only generates linux files ?

godot-4 branch: Stopping debug mode in editor often does not close gdcefSubProcess.exe on Windows 11

I just discovered that running gdcef on windows 11 from the editor and subsequently stopping the debug run often results in the browser background process to not close at all.

This behaviour seems to be unconsistent from what I do with the open browser inside the godot run window.

I had an instance of this problem where after even some failed runs on godot, due to code errors, there were 5 ghost browser processes using almost all of my cpu.
I had to kill them one by one on the task manager.

Shouldn't be there, inside the browser process, a ping system which checks if the godot process that created it is still alive to prevent edge cases?

I was trying things out on the 2D demo project.

image

build.py won't finish

Upon downloading the newest Cef build, extracting it, the build.py script wants to compile "Godot CEF module", but it fails:

[INFO] Compiling Godot CEF module C:\Users\raphi\Documents\DEV\GDCef\gdcef
scons: Reading SConscript files ...

scons: *** Path for option api_path does not exist: .\godot-cpp\
File "C:\Users\raphi\Documents\DEV\GDCef\gdcef\SConstruct", line 53, in <module>
  File "C:\Users\raphi\Documents\DEV\GDCef\build.py", line 342, in <module>
    compile_gdnative_cef(GDCEF_PATH)
  File "C:\Users\raphi\Documents\DEV\GDCef\build.py", line 324, in compile_gdnative_cef
    gdnative_scons_cmd("windows")
  File "C:\Users\raphi\Documents\DEV\GDCef\build.py", line 309, in gdnative_scons_cmd
    run(["scons", "api_path=" + GODOT_CPP_API_PATH,
  File "C:\Users\raphi\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['scons', 'api_path=.\\godot-cpp\\', 'build_path=C:\\Users\\raphi\\Documents\\DEV\\GDCef\\example\\build', 'target=release', '--jobs=12', 'arch=x86_64', 'platform=windows']' returned non-zero exit status 2.

Scons is installed, I installed it with the requirements.txt via pip.

File structure is my personal fork of gdcef.

My wild guess is it that I need the special environment variables from Stigmee, am I wrong?

I really want to get this to compile completely because a web browser in Godot is just awesome!

Nonexistent function 'initialize' when running demos

I've successfully run the build.py and copied the build folder into the project directory. However, when I open the project in Godot 3.5 and click Play (F5) I get the error:

Invalid call. Nonexistent function 'initialize' in base 'Node'.

In the "2D" demo project, line 177 in CEF.gd is referred to. I've also tried running the "HelloCEF" project and received the same error. Am I missing something?

Unable to build the extension for Godot 4 on Windows 11 machine

Hi.

I followed meticulously many times the installation process found here and here, but not once I was able to build the Godot extension.

I can't copy and past the entire stack trace since it's really too long, so this is the last part of stack trace I get:

C:\Users\loren\Desktop\Godot Projects\GDCEF Test\addons\gdcef\thirdparty\cef_binary\tests\ceftests\Release\ceftests.exe
 : fatal error LNK1169: rilevato uno o più simboli definiti più volte [C:\Users\loren\Desktop\Godot Projects\GDCEF Test
\addons\gdcef\thirdparty\cef_binary\tests\ceftests\ceftests.vcxproj]
Traceback (most recent call last):
  File "C:\Users\loren\Desktop\Godot Projects\GDCEF Test\addons\gdcef\build.py", line 500, in <module>
    compile_cef()
  File "C:\Users\loren\Desktop\Godot Projects\GDCEF Test\addons\gdcef\build.py", line 294, in compile_cef
    run(["cmake", "--build", ".", "--config", CEF_TARGET], check=True)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.496.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release']' returned non-zero exit status 1.

I would like to point out that the third line of the installation process ./build.py doesn't work on my machine and I had to fix it to python3 ./build.py.

If you need to know more details, just ask.
Thank you in advance.

Looking for MacOs and/or Godot and/or CEF developer

Currently:

Helps wanted :)

error: "Can't open dynamic library: cef_artifacts/libgdcef.dll" when execute a build for windows platform

OS: windows 11
Godot version: 4.2.1

Description: gdcef extension works fine on godot editor, but when I try to export for windows, an execute the build, I get this error stack

ERROR: Can't open dynamic library: cef_artifacts/libgdcef.dll. Error: Error 126: The specified module could not be found..
   at: (platform/windows/os_windows.cpp:394)
ERROR: GDExtension dynamic library not found: cef_artifacts/libgdcef.dll
   at: open_library (core/extension/gdextension.cpp:719)
ERROR: Failed loading resource: res://libs/gdcef.gdextension. Make sure resources have been imported by opening the project in the editor at least once.
   at: (core/io/resource_loader.cpp:274)
ERROR: Error loading extension: res://libs/gdcef.gdextension
   at: (core/extension/gdextension_manager.cpp:234)

image

this is how looks in editor, vs windows build
image

this is how looks the windows build folder: (I added "cef_artifacts" folder manually)
image

Windows CEF crashing on play

First off thanks for the amazing project,
I have a similar issue to this but it has a unique cause.
The web view works when run within its own scene but when put as a child of another scene it crashes with no errors present.
This is the image of the web view scene:
image
and this is the structure of the other scene:
image
No matter the scene I place it in, as long as it is a child of another node, it will crash. I also tried copying a known working project and it still crashes but the demos work.
Here is what my log file is reporting:

[0214/104650.053:WARNING:browser_info.cc(300)] Returning a speculative frame for 25769803781 [6,5]
[0214/104650.742:WARNING:browser_info.cc(300)] Returning a speculative frame for 25769803781 [6,5]
[0214/104650.743:WARNING:browser_info.cc(300)] Returning a speculative frame for 25769803781 [6,5]
[0214/104650.743:WARNING:browser_info.cc(300)] Returning a speculative frame for 25769803781 [6,5]
[0214/104650.743:WARNING:browser_info.cc(300)] Returning a speculative frame for 25769803781 [6,5]
[0214/104700.493:WARNING:sqlite_persistent_store_backend_base.cc(163)] Failed to post task from FlushAndNotifyInBackground@net\extras\sqlite\sqlite_persistent_store_backend_base.cc:211 to client_task_runner_.
[0214/104700.494:WARNING:sqlite_persistent_store_backend_base.cc(163)] Failed to post task from FlushAndNotifyInBackground@net\extras\sqlite\sqlite_persistent_store_backend_base.cc:211 to client_task_runner_.
[0214/111540.506:WARNING:browser_info.cc(300)] Returning a speculative frame for 25769803781 [6,5]
[0214/111540.507:WARNING:browser_info.cc(300)] Returning a speculative frame for 25769803781 [6,5]
[0214/111540.507:WARNING:browser_info.cc(300)] Returning a speculative frame for 25769803781 [6,5]
[0214/111540.507:WARNING:browser_info.cc(300)] Returning a speculative frame for 25769803781 [6,5]
[0214/111540.574:WARNING:browser_info.cc(300)] Returning a speculative frame for 25769803781 [6,5]
[0214/111617.191:WARNING:dns_config_service_win.cc(584)] Failed to read DnsConfig.
[0214/111617.195:WARNING:dns_config_service_win.cc(584)] Failed to read DnsConfig.
[0214/111714.402:WARNING:frame_impl.cc(460)] SendCommandWithResponse sent to detached frame 17179869185 [4,1] will be ignored
[0214/111714.407:ERROR:interface_endpoint_client.cc(690)] Message 0 rejected by interface blink.mojom.WidgetHost
[0214/111739.085:ERROR:gpu_init.cc(537)] Passthrough is not supported, GL is disabled, ANGLE is 
[0214/112524.558:ERROR:gpu_init.cc(537)] Passthrough is not supported, GL is disabled, ANGLE is 

If the issue is from my end, any help would be highly appreciated.

Compile the add-on with Godot

Is it possible if you compile this add-on with Godot as a module, so that I can use it without installing external programs?

New tab links open a new OS window

When GDCef encounters a link that tries to open a new tab, it opens these links in new window on your OS, not in the game environment

Example: Try to click on the "Visit W3Schools.com!" link on this page

I tried to look into this, and it seems like it should be possible to override this by implementing the OnBeforePopup function. So far it hasn't worked for me, but I'll try to take another look at it later (unless someone else finds the fix first)

Build Error for GDCEF

Hi, I'm using Godot 3.5.2. I'm now trying to run the demos to test around how it works for this WebView. Currently having build error. May I know what's the problem? I do follow the installation guideline, but not sure why getting this error...

Platform: Windows 10
Python version: 3.11.4
CMake version: 3.27.0
x64 Native Tools Command Prompt for VS 2022 (Run as Admin)

Error said it cannot find the file specified.

C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\gdcef>python ./build.py
←[32m[INFO] Checking cmake version ...←[00m
Microsoft (R) C/C++ Optimizing Compiler Version 19.36.32537 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

win.cc
Microsoft (R) Incremental Linker Version 14.36.32537.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:win.exe
win.obj
[INFO] MS C++ Compiler OK
[INFO] Clone cpp wrapper for Godot 3.5 into C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\gdcef\thirdparty\godot-3.5\cpp
Cloning into 'C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\gdcef\thirdparty\godot-3.5\cpp'...
remote: Enumerating objects: 7998, done.
remote: Counting objects: 100% (802/802), done.
remote: Compressing objects: 100% (158/158), done.
remote: Total 7998 (delta 695), reused 666 (delta 643), pack-reused 7196
13.62 MiB/s
Receiving objects: 100% (7998/7998), 9.55 MiB | 12.28 MiB/s, done.
Resolving deltas: 100% (5058/5058), done.
Submodule 'godot-headers' (https://github.com/godotengine/godot-headers) registered for path 'godot-headers'
Cloning into 'C:/Users/XXX/Downloads/gdcef-master/gdcef-master/addons/gdcef/thirdparty/godot-3.5/cpp/godot-headers'...
remote: Enumerating objects: 1032, done.
remote: Counting objects: 100% (208/208), done.
remote: Compressing objects: 100% (76/76), done.
remote: Total 1032 (delta 131), reused 167 (delta 114), pack-reused 824
Receiving objects: 100% (1032/1032), 3.14 MiB | 16.59 MiB/s, done.
Resolving deltas: 100% (660/660), done.
Submodule path 'godot-headers': checked out '9e4dd67f928d7ae4e8d8bd77dce2219065a30b9a'
[INFO] Compiling Godot C++ API (inside C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\gdcef\thirdparty\godot-3.5\cpp) ...
Traceback (most recent call last):
  File "C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\gdcef\build.py", line 479, in <module>
    compile_godot_cpp()
  File "C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\gdcef\build.py", line 365, in compile_godot_cpp
    run(["scons", "platform=windows", "target=" + GODOT_CPP_TARGET,
  File "C:\Python311\Lib\subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Python311\Lib\subprocess.py", line 1538, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified

Appreciate if anyone can assist XD

User-configutable resource directory

Right now, the CEF resources directory is hard-coded to be at /build in the godot project root. This probably doesn't make sense for most projects. And it is especially problematic for multi-platform projects, since each OS needs to read a different set of resources, which can't all be stored in the same folder.

One solution would be to allow the user to pass in a directory as part of the library initialization process

LD_LIBRARY_PATH

Missing in the paragraph:

Workaround: For Linux, for the moment, Stigmee does not find correctly the libcef.so while indicated in the gdnlib file. So for the moment:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$WORKSPACE_STIGMEE/stigmee/build

Missing information

In API section missing telling that create_browser create browsers as Godot child node in the Scenegraph.

Noob install Demo not working, Godot 4 & 3

Hi,
0. Windows 10 x64

  1. Download ZIP
  2. Extract
  3. Godot Import from "project.godot" from: HelloCEF, 2D or 3D
  4. PLAY, and all 3 this Message and break!
  5. ERROR: Invalid call: Nonexistent function "initialize" in Base "Node"
  6. E 0:00:00:0623 instantiate: Cannot get class 'GDCef'.
    <C++-Fehler> Parameter "ti" is null.
    <C++-Quelle> core/object/class_db.cpp:358 @ instantiate()
  7. W 0:00:00:0623 instantiate: Node CEF of type GDCef cannot be created. A placeholder will be created instead.
    <C++-Quelle> scene/resources/packed_scene.cpp:254 @ instantiate()

Copy/paste in Godot input text makes the application freezing

  • When selecting a paragraph with the mouse, then doing browser->GetMainFrame()->Copy() then pasting inside a text editor (or echo | cat -e) it gives the text with 3 consecutive '\n' instead of 1.

  • When doing the same thing (browser->GetMainFrame()->Paste()) inside a GitHub input text, it works (\n are removed). But if I paste it for either in a Godot input text or getting the Godot clipboard, then my CEF application is freezing.

  • In Godot when pressing keys they can repeat actions, I noticed this called many times browser->GetMainFrame()->Copy() with consequence it cumulates the selected text.

I think there is possible memory corruption with browser->GetMainFrame()->Copy()

Add Godot smoke test

The recent GitHub actions CI are a great start. But it would be helpful if we attempt to run the demo apps using the compiled library, to make sure everything loads correctly. This will help catch regressions going forward

Something like Gut could be helpful for this

Need to pass modifiers in all mouse events

Hey hey,

I haven't actually used your plugin, but I used your source as reference for integrating CEF into my project - thanks !
I have loaded mapbox in the embedded browser, and I noticed I couldn't drag the map, and it was zooming at 0,0 with the wheel : the issue was that CefMouseEvent::modifiers must be filled for each mouse event (click, move, wheel). So I'm pretty sure you have the same issue with this plugin. You need to save the modifiers in GDBrowserView and pass them in each m_browser->GetHost()->SendMouse*() in browser_io.cpp.

Cheers

Widevine support?

Hello! I have managed to get this extension built and running with godot 3.5, but was wondering if there is some way to get widevine CDM support?
I am currently testing on windows 10.
I have tried to follow the instructions here to get the latest dll and place it in the appropriate folder and nothing happened.
I have also found this however I don't think I can pass in "enable-widevine-cdm" as a config argument for this?

Any help or insight would be appreciated 😄

Upload compiled library artifacts as part of CI

It would be helpful to provide compiled versions of the library in the repo, either on each build, or on tagged releases.

Possible issues:

  • are there licensing issues to worry about by providing the binaries?
  • are there any costs for hosting the files?

License

Thank you very much for taking this over. It looks terrific, and I'm excited to use it.

Have you communicated with the original authors about relicensing the code? Unfortunately it isn't possible to go from GPL -> MIT without the consent of the copyright holder. Would you like me to reach out to see if they're open to the change?

No SConstruct file found

[INFO] MS C++ Compiler OK
[INFO] Compiling Godot C++ API (inside C:\Users\PC\Desktop\Browser\thirdparty\godot-3.5\cpp) ...

scons: *** No SConstruct file found.
File "D:\Program Files\Python310\lib\site-packages\SCons\Script\Main.py", line 945, in _main
Traceback (most recent call last):
  File "C:\Users\PC\Desktop\Browser\build.py", line 465, in <module>
    compile_godot_cpp()
  File "C:\Users\PC\Desktop\Browser\build.py", line 361, in compile_godot_cpp
    run(["scons", "platform=windows", "target=" + GODOT_CPP_TARGET,
  File "D:\Program Files\Python310\lib\subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['scons', 'platform=windows', 'target=release', '--jobs=4']' returned non-zero exit status 2.

When I try to build im getting this error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.