Giter Club home page Giter Club logo

Comments (11)

Lecrapouille avatar Lecrapouille commented on July 20, 2024 1

@XenonSheng thank you for your feedback. I'll update the README indicating the win SDK and in 1st time move "scons" as variable: it will be easier to rename it.

from gdcef.

Lecrapouille avatar Lecrapouille commented on July 20, 2024 1

@XenonSheng ah ok, you meant Godot export to reach something like this http://chreage.befuse.com/content/WEBGL/ChreageAlpha0-3/index.html (try to reach a river to open a webpage) ? For HTML5, while I have not tested, the answer is: no you cannot! You can try on Unity side: https://developer.vuplex.com/webview/overview

This is because how CEF is made internally and compiled. CEF starts many fork of itself as independent processes that communicate together (ie rendering process ...). I'm not sure if this is managed correctly with the web virtual machine. To start these processes, CEF uses command lines main(argc, argv). In the case of my project, I could not modify Godot guts to start CEF inside the Godot main function because 1/ Godot also uses command line, so they may be conflicting (while I have tried in practice without problem) and 2/ I cannot offer pull requests to Godot team with a Godot hybrid with CEF, the dev teams will laugh at me :D As consequence I followed what CEF doc says: start a second minor CEF application that will manage the command line. Therefore, this is possible with HTML5 export.

In addition, CEF seems using LGPL third part libraries, CEF cannot be compiled other than shared library, else these licenses will contaminate your application. So you have to modify CEF to be compiled for your case, which can take > 4 hours and +60 GB of hard disk (I tried this is too much effort) so I do not recommend you. That is why I'm downloading prebuild CEF.

By the way CEF is not working for ios, Android.

from gdcef.

Lecrapouille avatar Lecrapouille commented on July 20, 2024 1

@XenonSheng On Linux /usr/bin/scons is a python script calling scons but I did not understand what this script does. I made anyway a variable for more flexibility.

from gdcef.

Lecrapouille avatar Lecrapouille commented on July 20, 2024 1

I close this ticket but feel free to continue the talk.
@raphipod I have made some updates in the case you are interested.

from gdcef.

Lecrapouille avatar Lecrapouille commented on July 20, 2024

@XenonSheng hi ! Has scons been installed correctly (or path to scons correctly set) ? If you redo manualy theses commands (defines here https://github.com/Lecrapouille/gdcef/blob/master/addons/gdcef/build.py#L364-L366), what they return ?

  • cd <GODOT_CPP_API_PATH>
  • scons platform=windows target=<GODOT_CPP_TARGET>

Pathes are defined here

GODOT_CPP_API_PATH = os.path.join(THIRDPARTY_GODOT_PATH, "cpp")

from gdcef.

XenonSheng avatar XenonSheng commented on July 20, 2024

@Lecrapouille I'm not sure where the scons.exe or scons.bat file is located... I tried to google up where is this file but unfortunately cannot find the answer. The only way to use Scons, is by using this command python -m SCons where SCons is case-sensitive. And try run python -m SCons platform=windows target=<GODOT_CPP_TARGET> where GODOT_CPP_TARGET = release and Build Success with bin\libgodot-cpp.windows.release.64.lib.

but after that, i tried to rerun the build.py again... still getting the same error.

FYI, I also downloaded the latest (4.5.2) SCons zip file from https://scons.org/pages/download.html. There is no scons.bat or scons.exe file inside the folder. From SCons README said, it should be in C:\Users\me\AppData\Roaming\Python\Python310\Scripts. But don't have....

from gdcef.

XenonSheng avatar XenonSheng commented on July 20, 2024

After I changed to run(["python","-m", "SCons", "platform=windows", "target=" + GODOT_CPP_TARGET,"--jobs=" + NPROC], check=True) for my own case, i got another error.

C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\fileapi.h(1105,10): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_message_router.cc) [C:\Users\XXX\Downloads\gdcef-master\gd
cef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9118,11): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_message_router.cc) [C:\Users\XXX\Downloads\gdcef-master\gd
cef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\fileapi.h(1105,10): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_resource_manager.cc) [C:\Users\XXX\Downloads\gdcef-master\
gdcef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\fileapi.h(1105,10): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_scoped_temp_dir.cc) [C:\Users\XXX\Downloads\gdcef-master\g
dcef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9118,11): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_resource_manager.cc) [C:\Users\XXX\Downloads\gdcef-master\
gdcef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\fileapi.h(1105,10): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_stream_resource_handler.cc) [C:\Users\XXX\Downloads\gdcef-
master\gdcef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\fileapi.h(1105,10): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\libcef_dll_wrapper.cc) [C:\Users\XXX\Downloads\gdcef-master\gd
cef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9118,11): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_scoped_temp_dir.cc) [C:\Users\XXX\Downloads\gdcef-master\g
dcef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\fileapi.h(1105,10): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_xml_object.cc) [C:\Users\XXX\Downloads\gdcef-master\gdcef-
master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9118,11): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_stream_resource_handler.cc) [C:\Users\XXX\Downloads\gdcef-
master\gdcef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9118,11): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\libcef_dll_wrapper.cc) [C:\Users\XXX\Downloads\gdcef-master\gd
cef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9118,11): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_xml_object.cc) [C:\Users\XXX\Downloads\gdcef-master\gdcef-
master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\fileapi.h(1105,10): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_zip_archive.cc) [C:\Users\XXX\Downloads\gdcef-master\gdcef
-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9118,11): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\cef_zip_archive.cc) [C:\Users\XXX\Downloads\gdcef-master\gdcef
-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\fileapi.h(1105,10): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\libcef_dll_wrapper2.cc) [C:\Users\XXX\Downloads\gdcef-master\g
dcef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9118,11): error C2061: syntax error: identifie
r 'FILE_INFO_BY_HANDLE_CLASS' (compiling source file C:\Users\XXX\Downloads\gdcef-master\gdcef-master\addons\
gdcef\thirdparty\cef_binary\libcef_dll\wrapper\libcef_dll_wrapper2.cc) [C:\Users\XXX\Downloads\gdcef-master\g
dcef-master\addons\gdcef\thirdparty\cef_binary\libcef_dll_wrapper\libcef_dll_wrapper.vcxproj]
Traceback (most recent call last):
  File "C:\Users\xxx\Downloads\gdcef-master\gdcef-master\addons\gdcef\build.py", line 481, in <module>
    compile_cef()
  File "C:\Users\xxx\Downloads\gdcef-master\gdcef-master\addons\gdcef\build.py", line 278, in compile_cef
    run(["cmake", "--build", ".", "--config", CEF_TARGET], check=True)
  File "C:\Python311\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.

from gdcef.

XenonSheng avatar XenonSheng commented on July 20, 2024

I'm able to build GDCEF successfully. For previous error, it is required to install Windows SDK (10.0.20348.0) in Visual Studio.
image

For SCons path issue, so far still cannot set env path for it since still cannot find the exe/bat file... Alternatively for my case, I update these two lines with python -m SCons

gdcef/addons/gdcef/build.py

Lines 365 to 366 in fd14a14

run(["scons", "platform=windows", "target=" + GODOT_CPP_TARGET,
"--jobs=" + NPROC], check=True)

gdcef/addons/gdcef/build.py

Lines 382 to 386 in fd14a14

run(["scons", "api_path=" + GODOT_CPP_API_PATH,
"cef_artifacts_folder=\\\"" + CEF_ARTIFACTS_FOLDER + "\\\"",
"build_path=" + CEF_ARTIFACTS_BUILD_PATH,
"target=" + MODULE_TARGET, "--jobs=" + NPROC,
"platform=" + plateform], check=True)

And @Lecrapouille, Thanks for assist XD

from gdcef.

XenonSheng avatar XenonSheng commented on July 20, 2024

@Lecrapouille Sorry for asking a question which is not related to this issue. May I know is there a way to have a webview for HTML5 export? like how GDCEF works for Windows and Linux. But how about HTML5?
I tried to export to HTML5 but got an error said no lib found for this platform as I know it is an expected result.

from gdcef.

Lecrapouille avatar Lecrapouille commented on July 20, 2024

@XenonSheng sorry I'm not sure to understand you! Are you looking for a way to download the current page your are watching ? Currently my Godot API does not allow exporting pages but I'm pretty sure the CEF has an API for this. Something like https://magpcss.org/ceforum/viewtopic.php?f=6&t=10500 ? Let open a new ticket I'll see if I can add it.

from gdcef.

XenonSheng avatar XenonSheng commented on July 20, 2024

@Lecrapouille Sorry for any misunderstanding. What I mean here for HTML5 export is this
image
Usually in web, we use <iframe> tags. For example, https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_iframe.
But I dont think Godot Editor allow to add <iframe> /html tags in a Node2D(?) So, do you know any way to achieve that? With/Without using CEF, I also ok with it.

from gdcef.

Related Issues (20)

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.