Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cefpython123 #669

Merged
merged 33 commits into from
Feb 17, 2025
Merged

Cefpython123 #669

merged 33 commits into from
Feb 17, 2025

Conversation

linesight
Copy link
Contributor

Added cef 123 support for python 3.10 and 3.11 at windows
Some of the fix is coming from https://github.com/llcc01/cefpython

qt.py example added pyqt6 support
addressing #652

linesight and others added 16 commits January 27, 2024 20:59
Fixes: cztomczak#546

Had to include harfbuzz manually as newer Pango change this.
See:
    eiskaltdcpp/eiskaltdcpp#413
    https://gitlab.gnome.org/GNOME/pango/-/issues/387

Also had to add `-Wno-deprecated-declarations` to get this to compile because
of the following errors that didn't seem to be coming from this code directly:

    warning: ‘GTimeVal’ is deprecated: Use 'GDateTime' instead
    warning: ‘GTypeDebugFlags’ is deprecated
…k#484).

These callbacks were never called previously.

Rename --no-run-examples flag to --unittests in build scripts.
@WoolenWang
Copy link

when this can merge and publish one package? users are waiting

@WoolenWang
Copy link

@cztomczak

@SoprachevAK
Copy link

Thanks for the port to 123. I think that this repository is no longer supported.
You did a great job and could post an unofficial release like this

Or may be wright small build instruction. I try build your fork with prebuilt-cef and automate.py script, but got errors.
I use visual studio 2022 community, python 3.7.7.

I download and unpack to build folder cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64 by spotify (Standard Distribution)
Then run python ..\tools\automate.py --prebuilt-cef

And got this:

Output
[automate.py] Build cef projects...
[automate.py] Create build_cefclient/ dir in cef_binary*/ dir
[automate.py] Build cefclient, cefsimple, ceftests
[automate.py] Running 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat amd64 && cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..' in 'C:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64\build_cefclient'...
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.10.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
-- The C compiler identification is MSVC 19.40.33811.0
-- The CXX compiler identification is MSVC 19.40.33811.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features       
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info    
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at cmake/cef_variables.cmake:629 (message):
  ATL is not supported by your VC installation.
Call Stack (most recent call first):
  cmake/FindCEF.cmake:38 (include)
  CMakeLists.txt:210 (find_package)


-- *** CEF CONFIGURATION SETTINGS ***
-- Generator:                    Ninja
-- Platform:                     Windows
-- Project architecture:         x86_64
-- Build type:                   Release
-- Binary distribution root:     C:/Users/Andrei/Desktop/newcef/cefpython/build/cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64
-- Visual Studio ATL support:    OFF
-- CEF sandbox:                  ON
-- Standard libraries:           comctl32.lib;gdi32.lib;rpcrt4.lib;shlwapi.lib;ws2_32.lib;Advapi32.lib;dbghelp.lib;Delayimp.lib;ntdll.lib;OleAut32.lib;PowrProf.lib;Propsys.lib;psapi.lib;SetupAPI.lib;Shell32.lib;Shcore.lib;Userenv.lib;version.lib;wbemuuid.lib;WindowsApp.lib;winmm.lib
-- Compile defines:              __STDC_CONSTANT_MACROS;__STDC_FORMAT_MACROS;WIN32;_WIN32;_WINDOWS;UNICODE;_UNICODE;WINVER=0x0A00;_WIN32_WINNT=0x0A00;NTDDI_VERSION=NTDDI_WIN10_FE;NOMINMAX;WIN32_LEAN_AND_MEAN;_HAS_EXCEPTIONS=0;PSAPI_VERSION=1;CEF_USE_SANDBOX
-- Compile defines (Debug):      _HAS_ITERATOR_DEBUGGING=0
-- Compile defines (Release):    NDEBUG;_NDEBUG
-- C compile flags:              /MP;/Gy;/GR-;/W4;/WX;/wd4100;/wd4127;/wd4244;/wd4324;/wd4481;/wd4512;/wd4701;/wd4702;/wd4996;/Zi
-- C compile flags (Debug):      /MTd;/RTC1;/Od
-- C compile flags (Release):    /MT;/O2;/Ob2;/GF
-- C++ compile flags:            /MP;/Gy;/GR-;/W4;/WX;/wd4100;/wd4127;/wd4244;/wd4324;/wd4481;/wd4512;/wd4701;/wd4702;/wd4996;/Zi /std:c++17
-- C++ compile flags (Debug):    /MTd;/RTC1;/Od
-- C++ compile flags (Release):  /MT;/O2;/Ob2;/GF
-- Exe link flags:                /MANIFEST:NO;/LARGEADDRESSAWARE;/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll;/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll;/DELAYLOAD:api-ms-win-core-winrt-string-l1-1-0.dll;/DELAYLOAD:advapi32.dll;/DELAYLOAD:comctl32.dll;/DELAYLOAD:comdlg32.dll;/DELAYLOAD:credui.dll;/DELAYLOAD:cryptui.dll;/DELAYLOAD:d3d11.dll;/DELAYLOAD:d3d9.dll;/DELAYLOAD:dwmapi.dll;/DELAYLOAD:dxgi.dll;/DELAYLOAD:dxva2.dll;/DELAYLOAD:esent.dll;/DELAYLOAD:gdi32.dll;/DELAYLOAD:hid.dll;/DELAYLOAD:imagehlp.dll;/DELAYLOAD:imm32.dll;/DELAYLOAD:msi.dll;/DELAYLOAD:netapi32.dll;/DELAYLOAD:ncrypt.dll;/DELAYLOAD:ole32.dll;/DELAYLOAD:oleacc.dll;/DELAYLOAD:propsys.dll;/DELAYLOAD:psapi.dll;/DELAYLOAD:rpcrt4.dll;/DELAYLOAD:rstrtmgr.dll;/DELAYLOAD:setupapi.dll;/DELAYLOAD:shell32.dll;/DELAYLOAD:shlwapi.dll;/DELAYLOAD:uiautomationcore.dll;/DELAYLOAD:urlmon.dll;/DELAYLOAD:user32.dll;/DELAYLOAD:usp10.dll;/DELAYLOAD:uxtheme.dll;/DELAYLOAD:wer.dll;/DELAYLOAD:wevtapi.dll;/DELAYLOAD:wininet.dll;/DELAYLOAD:winusb.dll;/DELAYLOAD:wsock32.dll;/DELAYLOAD:wtsapi32.dll;/STACK:0x800000
-- Exe link flags (Debug):       /DEBUG
-- Exe link flags (Release):
-- Shared link flags:
-- Shared link flags (Debug):    /DEBUG
-- Shared link flags (Release):
-- CEF Binary files:             chrome_elf.dll;d3dcompiler_47.dll;libcef.dll;libEGL.dll;libGLESv2.dll;snapshot_blob.bin;v8_context_snapshot.bin;vk_swiftshader.dll;vk_swiftshader_icd.json;vulkan-1.dll;dxil.dll;dxcompiler.dll
-- CEF Resource files:           chrome_100_percent.pak;chrome_200_percent.pak;resources.pak;icudtl.dat;locales
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
CMake Warning at CMakeLists.txt:254 (message):
  Doxygen must be installed to generate API documentation.


-- Configuring done (1.6s)
-- Generating done (0.3s)
-- Build files have been written to: C:/Users/Andrei/Desktop/newcef/cefpython/build/cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64/build_cefclient
[automate.py] OK
[automate.py] Running 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat amd64 && ninja -j 8 cefclient cefsimple ceftests' in 'C:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64\build_cefclient'...
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.10.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
[1/388] Building CXX object libcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_atomic_flag.cc.obj
FAILED: libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/base/cef_atomic_flag.cc.obj 
C:\PROGRA~1\MICROS~4\2022\COMMUN~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\cl.exe  /nologo /TP -DCEF_USE_SANDBOX -DNDEBUG -DNOMINMAX -DNTDDI_VERSION=NTDDI_WIN10_FE -DPSAPI_VERSION=1 -DUNICODE -DWIN32 -DWIN32_LEAN_AND_MEAN -DWINVER=0x0A00 -DWRAPPING_CEF_SHARED -D_HAS_EXCEPTIONS=0 -D_NDEBUG -D_UNICODE -D_WIN32 -D_WIN32_WINNT=0x0A00 -D_WINDOWS 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -IC:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64 -MD /MP /Gy /GR- /W4 /WX /wd4100 /wd4127 /wd4244 /wd4324 /wd4481 /wd4512 /wd4701 /wd4702 /wd4996 /Zi /std:c++17 /MT /O2 /Ob2 /GF /showIncludes /Folibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_atomic_flag.cc.obj /Fdlibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\libcef_dll_wrapper.pdb /FS -c C:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64\libcef_dll\base\cef_atomic_flag.cc
cl : Command line warning D9025 : overriding '/MD' with '/MT'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\fileapi.h(1105): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(9118): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
[2/388] Building CXX object libcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_callback_helpers.cc.obj
FAILED: libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/base/cef_callback_helpers.cc.obj
C:\PROGRA~1\MICROS~4\2022\COMMUN~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\cl.exe  /nologo /TP -DCEF_USE_SANDBOX -DNDEBUG -DNOMINMAX -DNTDDI_VERSION=NTDDI_WIN10_FE -DPSAPI_VERSION=1 -DUNICODE -DWIN32 -DWIN32_LEAN_AND_MEAN -DWINVER=0x0A00 -DWRAPPING_CEF_SHARED -D_HAS_EXCEPTIONS=0 -D_NDEBUG -D_UNICODE -D_WIN32 -D_WIN32_WINNT=0x0A00 -D_WINDOWS 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -IC:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64 -MD /MP /Gy /GR- /W4 /WX /wd4100 /wd4127 /wd4244 /wd4324 /wd4481 /wd4512 /wd4701 /wd4702 /wd4996 /Zi /std:c++17 /MT /O2 /Ob2 /GF /showIncludes /Folibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_callback_helpers.cc.obj /Fdlibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\libcef_dll_wrapper.pdb /FS -c C:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64\libcef_dll\base\cef_callback_helpers.cc
cl : Command line warning D9025 : overriding '/MD' with '/MT'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\fileapi.h(1105): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(9118): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
[3/388] Building CXX object libcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_lock_impl.cc.obj
FAILED: libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/base/cef_lock_impl.cc.obj
C:\PROGRA~1\MICROS~4\2022\COMMUN~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\cl.exe  /nologo /TP -DCEF_USE_SANDBOX -DNDEBUG -DNOMINMAX -DNTDDI_VERSION=NTDDI_WIN10_FE -DPSAPI_VERSION=1 -DUNICODE -DWIN32 -DWIN32_LEAN_AND_MEAN -DWINVER=0x0A00 -DWRAPPING_CEF_SHARED -D_HAS_EXCEPTIONS=0 -D_NDEBUG -D_UNICODE -D_WIN32 -D_WIN32_WINNT=0x0A00 -D_WINDOWS 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -IC:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64 -MD /MP /Gy /GR- /W4 /WX /wd4100 /wd4127 /wd4244 /wd4324 /wd4481 /wd4512 /wd4701 /wd4702 /wd4996 /Zi /std:c++17 /MT /O2 /Ob2 /GF /showIncludes /Folibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_lock_impl.cc.obj /Fdlibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\libcef_dll_wrapper.pdb /FS -c C:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64\libcef_dll\base\cef_lock_impl.cc
cl : Command line warning D9025 : overriding '/MD' with '/MT'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\fileapi.h(1105): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(9118): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
[4/388] Building CXX object libcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\shutdown_checker.cc.obj
cl : Command line warning D9025 : overriding '/MD' with '/MT'
[5/388] Building CXX object libcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_callback_internal.cc.obj
FAILED: libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/base/cef_callback_internal.cc.obj
C:\PROGRA~1\MICROS~4\2022\COMMUN~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\cl.exe  /nologo /TP -DCEF_USE_SANDBOX -DNDEBUG -DNOMINMAX -DNTDDI_VERSION=NTDDI_WIN10_FE -DPSAPI_VERSION=1 -DUNICODE -DWIN32 -DWIN32_LEAN_AND_MEAN -DWINVER=0x0A00 -DWRAPPING_CEF_SHARED -D_HAS_EXCEPTIONS=0 -D_NDEBUG -D_UNICODE -D_WIN32 -D_WIN32_WINNT=0x0A00 -D_WINDOWS 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -IC:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64 -MD /MP /Gy /GR- /W4 /WX /wd4100 /wd4127 /wd4244 /wd4324 /wd4481 /wd4512 /wd4701 /wd4702 /wd4996 /Zi /std:c++17 /MT /O2 /Ob2 /GF /showIncludes /Folibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_callback_internal.cc.obj /Fdlibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\libcef_dll_wrapper.pdb /FS -c C:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64\libcef_dll\base\cef_callback_internal.cc
cl : Command line warning D9025 : overriding '/MD' with '/MT'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\fileapi.h(1105): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(9118): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
[6/388] Building CXX object libcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_lock.cc.obj
FAILED: libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/base/cef_lock.cc.obj
C:\PROGRA~1\MICROS~4\2022\COMMUN~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\cl.exe  /nologo /TP -DCEF_USE_SANDBOX -DNDEBUG -DNOMINMAX -DNTDDI_VERSION=NTDDI_WIN10_FE -DPSAPI_VERSION=1 -DUNICODE -DWIN32 -DWIN32_LEAN_AND_MEAN -DWINVER=0x0A00 -DWRAPPING_CEF_SHARED -D_HAS_EXCEPTIONS=0 -D_NDEBUG -D_UNICODE -D_WIN32 -D_WIN32_WINNT=0x0A00 -D_WINDOWS 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -IC:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64 -MD /MP /Gy /GR- /W4 /WX /wd4100 /wd4127 /wd4244 /wd4324 /wd4481 /wd4512 /wd4701 /wd4702 /wd4996 /Zi /std:c++17 /MT /O2 /Ob2 /GF /showIncludes /Folibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_lock.cc.obj /Fdlibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\libcef_dll_wrapper.pdb /FS -c C:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64\libcef_dll\base\cef_lock.cc
cl : Command line warning D9025 : overriding '/MD' with '/MT'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\fileapi.h(1105): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(9118): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
[7/388] Building CXX object libcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\transfer_util.cc.obj
cl : Command line warning D9025 : overriding '/MD' with '/MT'
[8/388] Building CXX object libcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_logging.cc.obj
FAILED: libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/base/cef_logging.cc.obj
C:\PROGRA~1\MICROS~4\2022\COMMUN~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\cl.exe  /nologo /TP -DCEF_USE_SANDBOX -DNDEBUG -DNOMINMAX -DNTDDI_VERSION=NTDDI_WIN10_FE -DPSAPI_VERSION=1 -DUNICODE -DWIN32 -DWIN32_LEAN_AND_MEAN -DWINVER=0x0A00 -DWRAPPING_CEF_SHARED -D_HAS_EXCEPTIONS=0 -D_NDEBUG -D_UNICODE -D_WIN32 -D_WIN32_WINNT=0x0A00 -D_WINDOWS 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -IC:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64 -MD /MP /Gy /GR- /W4 /WX /wd4100 /wd4127 /wd4244 /wd4324 /wd4481 /wd4512 /wd4701 /wd4702 /wd4996 /Zi /std:c++17 /MT /O2 /Ob2 /GF /showIncludes /Folibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_logging.cc.obj /Fdlibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\libcef_dll_wrapper.pdb /FS -c C:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64\libcef_dll\base\cef_logging.cc
cl : Command line warning D9025 : overriding '/MD' with '/MT'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\fileapi.h(1105): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(9118): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "..\tools\automate.py", line 1105, in <module>
    main()
  File "..\tools\automate.py", line 151, in main
    prebuilt_cef()
  File "..\tools\automate.py", line 295, in prebuilt_cef
    build_cef_projects()
  File "..\tools\automate.py", line 444, in build_cef_projects
    run_command(command, build_cefclient_dir)
  File "..\tools\automate.py", line 969, in run_command
    return subprocess.check_call(args, cwd=working_dir, env=env, shell=shell)
  File "C:\Users\Andrei\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Program Files\\Microsof

if you have any suggestion I will be grateful

@linesight
Copy link
Contributor Author

Thanks for the port to 123. I think that this repository is no longer supported. You did a great job and could post an unofficial release like this

Or may be wright small build instruction. I try build your fork with prebuilt-cef and automate.py script, but got errors. I use visual studio 2022 community, python 3.7.7.

I download and unpack to build folder cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64 by spotify (Standard Distribution) Then run python ..\tools\automate.py --prebuilt-cef

And got this:

Output

[automate.py] Build cef projects...
[automate.py] Create build_cefclient/ dir in cef_binary*/ dir
[automate.py] Build cefclient, cefsimple, ceftests
[automate.py] Running 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat amd64 && cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..' in 'C:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64\build_cefclient'...
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.10.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
-- The C compiler identification is MSVC 19.40.33811.0
-- The CXX compiler identification is MSVC 19.40.33811.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features       
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info    
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at cmake/cef_variables.cmake:629 (message):
  ATL is not supported by your VC installation.
Call Stack (most recent call first):
  cmake/FindCEF.cmake:38 (include)
  CMakeLists.txt:210 (find_package)


-- *** CEF CONFIGURATION SETTINGS ***
-- Generator:                    Ninja
-- Platform:                     Windows
-- Project architecture:         x86_64
-- Build type:                   Release
-- Binary distribution root:     C:/Users/Andrei/Desktop/newcef/cefpython/build/cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64
-- Visual Studio ATL support:    OFF
-- CEF sandbox:                  ON
-- Standard libraries:           comctl32.lib;gdi32.lib;rpcrt4.lib;shlwapi.lib;ws2_32.lib;Advapi32.lib;dbghelp.lib;Delayimp.lib;ntdll.lib;OleAut32.lib;PowrProf.lib;Propsys.lib;psapi.lib;SetupAPI.lib;Shell32.lib;Shcore.lib;Userenv.lib;version.lib;wbemuuid.lib;WindowsApp.lib;winmm.lib
-- Compile defines:              __STDC_CONSTANT_MACROS;__STDC_FORMAT_MACROS;WIN32;_WIN32;_WINDOWS;UNICODE;_UNICODE;WINVER=0x0A00;_WIN32_WINNT=0x0A00;NTDDI_VERSION=NTDDI_WIN10_FE;NOMINMAX;WIN32_LEAN_AND_MEAN;_HAS_EXCEPTIONS=0;PSAPI_VERSION=1;CEF_USE_SANDBOX
-- Compile defines (Debug):      _HAS_ITERATOR_DEBUGGING=0
-- Compile defines (Release):    NDEBUG;_NDEBUG
-- C compile flags:              /MP;/Gy;/GR-;/W4;/WX;/wd4100;/wd4127;/wd4244;/wd4324;/wd4481;/wd4512;/wd4701;/wd4702;/wd4996;/Zi
-- C compile flags (Debug):      /MTd;/RTC1;/Od
-- C compile flags (Release):    /MT;/O2;/Ob2;/GF
-- C++ compile flags:            /MP;/Gy;/GR-;/W4;/WX;/wd4100;/wd4127;/wd4244;/wd4324;/wd4481;/wd4512;/wd4701;/wd4702;/wd4996;/Zi /std:c++17
-- C++ compile flags (Debug):    /MTd;/RTC1;/Od
-- C++ compile flags (Release):  /MT;/O2;/Ob2;/GF
-- Exe link flags:                /MANIFEST:NO;/LARGEADDRESSAWARE;/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll;/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll;/DELAYLOAD:api-ms-win-core-winrt-string-l1-1-0.dll;/DELAYLOAD:advapi32.dll;/DELAYLOAD:comctl32.dll;/DELAYLOAD:comdlg32.dll;/DELAYLOAD:credui.dll;/DELAYLOAD:cryptui.dll;/DELAYLOAD:d3d11.dll;/DELAYLOAD:d3d9.dll;/DELAYLOAD:dwmapi.dll;/DELAYLOAD:dxgi.dll;/DELAYLOAD:dxva2.dll;/DELAYLOAD:esent.dll;/DELAYLOAD:gdi32.dll;/DELAYLOAD:hid.dll;/DELAYLOAD:imagehlp.dll;/DELAYLOAD:imm32.dll;/DELAYLOAD:msi.dll;/DELAYLOAD:netapi32.dll;/DELAYLOAD:ncrypt.dll;/DELAYLOAD:ole32.dll;/DELAYLOAD:oleacc.dll;/DELAYLOAD:propsys.dll;/DELAYLOAD:psapi.dll;/DELAYLOAD:rpcrt4.dll;/DELAYLOAD:rstrtmgr.dll;/DELAYLOAD:setupapi.dll;/DELAYLOAD:shell32.dll;/DELAYLOAD:shlwapi.dll;/DELAYLOAD:uiautomationcore.dll;/DELAYLOAD:urlmon.dll;/DELAYLOAD:user32.dll;/DELAYLOAD:usp10.dll;/DELAYLOAD:uxtheme.dll;/DELAYLOAD:wer.dll;/DELAYLOAD:wevtapi.dll;/DELAYLOAD:wininet.dll;/DELAYLOAD:winusb.dll;/DELAYLOAD:wsock32.dll;/DELAYLOAD:wtsapi32.dll;/STACK:0x800000
-- Exe link flags (Debug):       /DEBUG
-- Exe link flags (Release):
-- Shared link flags:
-- Shared link flags (Debug):    /DEBUG
-- Shared link flags (Release):
-- CEF Binary files:             chrome_elf.dll;d3dcompiler_47.dll;libcef.dll;libEGL.dll;libGLESv2.dll;snapshot_blob.bin;v8_context_snapshot.bin;vk_swiftshader.dll;vk_swiftshader_icd.json;vulkan-1.dll;dxil.dll;dxcompiler.dll
-- CEF Resource files:           chrome_100_percent.pak;chrome_200_percent.pak;resources.pak;icudtl.dat;locales
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
CMake Warning at CMakeLists.txt:254 (message):
  Doxygen must be installed to generate API documentation.


-- Configuring done (1.6s)
-- Generating done (0.3s)
-- Build files have been written to: C:/Users/Andrei/Desktop/newcef/cefpython/build/cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64/build_cefclient
[automate.py] OK
[automate.py] Running 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat amd64 && ninja -j 8 cefclient cefsimple ceftests' in 'C:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64\build_cefclient'...
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.10.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
[1/388] Building CXX object libcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_atomic_flag.cc.obj
FAILED: libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/base/cef_atomic_flag.cc.obj 
C:\PROGRA~1\MICROS~4\2022\COMMUN~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\cl.exe  /nologo /TP -DCEF_USE_SANDBOX -DNDEBUG -DNOMINMAX -DNTDDI_VERSION=NTDDI_WIN10_FE -DPSAPI_VERSION=1 -DUNICODE -DWIN32 -DWIN32_LEAN_AND_MEAN -DWINVER=0x0A00 -DWRAPPING_CEF_SHARED -D_HAS_EXCEPTIONS=0 -D_NDEBUG -D_UNICODE -D_WIN32 -D_WIN32_WINNT=0x0A00 -D_WINDOWS 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -IC:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64 -MD /MP /Gy /GR- /W4 /WX /wd4100 /wd4127 /wd4244 /wd4324 /wd4481 /wd4512 /wd4701 /wd4702 /wd4996 /Zi /std:c++17 /MT /O2 /Ob2 /GF /showIncludes /Folibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_atomic_flag.cc.obj /Fdlibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\libcef_dll_wrapper.pdb /FS -c C:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64\libcef_dll\base\cef_atomic_flag.cc
cl : Command line warning D9025 : overriding '/MD' with '/MT'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\fileapi.h(1105): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(9118): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
[2/388] Building CXX object libcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_callback_helpers.cc.obj
FAILED: libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/base/cef_callback_helpers.cc.obj
C:\PROGRA~1\MICROS~4\2022\COMMUN~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\cl.exe  /nologo /TP -DCEF_USE_SANDBOX -DNDEBUG -DNOMINMAX -DNTDDI_VERSION=NTDDI_WIN10_FE -DPSAPI_VERSION=1 -DUNICODE -DWIN32 -DWIN32_LEAN_AND_MEAN -DWINVER=0x0A00 -DWRAPPING_CEF_SHARED -D_HAS_EXCEPTIONS=0 -D_NDEBUG -D_UNICODE -D_WIN32 -D_WIN32_WINNT=0x0A00 -D_WINDOWS 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -IC:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64 -MD /MP /Gy /GR- /W4 /WX /wd4100 /wd4127 /wd4244 /wd4324 /wd4481 /wd4512 /wd4701 /wd4702 /wd4996 /Zi /std:c++17 /MT /O2 /Ob2 /GF /showIncludes /Folibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_callback_helpers.cc.obj /Fdlibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\libcef_dll_wrapper.pdb /FS -c C:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64\libcef_dll\base\cef_callback_helpers.cc
cl : Command line warning D9025 : overriding '/MD' with '/MT'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\fileapi.h(1105): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(9118): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
[3/388] Building CXX object libcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_lock_impl.cc.obj
FAILED: libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/base/cef_lock_impl.cc.obj
C:\PROGRA~1\MICROS~4\2022\COMMUN~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\cl.exe  /nologo /TP -DCEF_USE_SANDBOX -DNDEBUG -DNOMINMAX -DNTDDI_VERSION=NTDDI_WIN10_FE -DPSAPI_VERSION=1 -DUNICODE -DWIN32 -DWIN32_LEAN_AND_MEAN -DWINVER=0x0A00 -DWRAPPING_CEF_SHARED -D_HAS_EXCEPTIONS=0 -D_NDEBUG -D_UNICODE -D_WIN32 -D_WIN32_WINNT=0x0A00 -D_WINDOWS 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -IC:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64 -MD /MP /Gy /GR- /W4 /WX /wd4100 /wd4127 /wd4244 /wd4324 /wd4481 /wd4512 /wd4701 /wd4702 /wd4996 /Zi /std:c++17 /MT /O2 /Ob2 /GF /showIncludes /Folibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_lock_impl.cc.obj /Fdlibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\libcef_dll_wrapper.pdb /FS -c C:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64\libcef_dll\base\cef_lock_impl.cc
cl : Command line warning D9025 : overriding '/MD' with '/MT'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\fileapi.h(1105): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(9118): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
[4/388] Building CXX object libcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\shutdown_checker.cc.obj
cl : Command line warning D9025 : overriding '/MD' with '/MT'
[5/388] Building CXX object libcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_callback_internal.cc.obj
FAILED: libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/base/cef_callback_internal.cc.obj
C:\PROGRA~1\MICROS~4\2022\COMMUN~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\cl.exe  /nologo /TP -DCEF_USE_SANDBOX -DNDEBUG -DNOMINMAX -DNTDDI_VERSION=NTDDI_WIN10_FE -DPSAPI_VERSION=1 -DUNICODE -DWIN32 -DWIN32_LEAN_AND_MEAN -DWINVER=0x0A00 -DWRAPPING_CEF_SHARED -D_HAS_EXCEPTIONS=0 -D_NDEBUG -D_UNICODE -D_WIN32 -D_WIN32_WINNT=0x0A00 -D_WINDOWS 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -IC:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64 -MD /MP /Gy /GR- /W4 /WX /wd4100 /wd4127 /wd4244 /wd4324 /wd4481 /wd4512 /wd4701 /wd4702 /wd4996 /Zi /std:c++17 /MT /O2 /Ob2 /GF /showIncludes /Folibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_callback_internal.cc.obj /Fdlibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\libcef_dll_wrapper.pdb /FS -c C:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64\libcef_dll\base\cef_callback_internal.cc
cl : Command line warning D9025 : overriding '/MD' with '/MT'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\fileapi.h(1105): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(9118): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
[6/388] Building CXX object libcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_lock.cc.obj
FAILED: libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/base/cef_lock.cc.obj
C:\PROGRA~1\MICROS~4\2022\COMMUN~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\cl.exe  /nologo /TP -DCEF_USE_SANDBOX -DNDEBUG -DNOMINMAX -DNTDDI_VERSION=NTDDI_WIN10_FE -DPSAPI_VERSION=1 -DUNICODE -DWIN32 -DWIN32_LEAN_AND_MEAN -DWINVER=0x0A00 -DWRAPPING_CEF_SHARED -D_HAS_EXCEPTIONS=0 -D_NDEBUG -D_UNICODE -D_WIN32 -D_WIN32_WINNT=0x0A00 -D_WINDOWS 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -IC:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64 -MD /MP /Gy /GR- /W4 /WX /wd4100 /wd4127 /wd4244 /wd4324 /wd4481 /wd4512 /wd4701 /wd4702 /wd4996 /Zi /std:c++17 /MT /O2 /Ob2 /GF /showIncludes /Folibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_lock.cc.obj /Fdlibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\libcef_dll_wrapper.pdb /FS -c C:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64\libcef_dll\base\cef_lock.cc
cl : Command line warning D9025 : overriding '/MD' with '/MT'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\fileapi.h(1105): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(9118): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
[7/388] Building CXX object libcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\transfer_util.cc.obj
cl : Command line warning D9025 : overriding '/MD' with '/MT'
[8/388] Building CXX object libcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_logging.cc.obj
FAILED: libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/base/cef_logging.cc.obj
C:\PROGRA~1\MICROS~4\2022\COMMUN~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\cl.exe  /nologo /TP -DCEF_USE_SANDBOX -DNDEBUG -DNOMINMAX -DNTDDI_VERSION=NTDDI_WIN10_FE -DPSAPI_VERSION=1 -DUNICODE -DWIN32 -DWIN32_LEAN_AND_MEAN -DWINVER=0x0A00 -DWRAPPING_CEF_SHARED -D_HAS_EXCEPTIONS=0 -D_NDEBUG -D_UNICODE -D_WIN32 -D_WIN32_WINNT=0x0A00 -D_WINDOWS 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -IC:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64 -MD /MP /Gy /GR- /W4 /WX /wd4100 /wd4127 /wd4244 /wd4324 /wd4481 /wd4512 /wd4701 /wd4702 /wd4996 /Zi /std:c++17 /MT /O2 /Ob2 /GF /showIncludes /Folibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\base\cef_logging.cc.obj /Fdlibcef_dll_wrapper\CMakeFiles\libcef_dll_wrapper.dir\libcef_dll_wrapper.pdb /FS -c C:\Users\Andrei\Desktop\newcef\cefpython\build\cef_binary_123.0.7+g6a21509+chromium-123.0.6312.46_windows64\libcef_dll\base\cef_logging.cc
cl : Command line warning D9025 : overriding '/MD' with '/MT'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\fileapi.h(1105): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(9118): error C2061: syntax error: identifier 'FILE_INFO_BY_HANDLE_CLASS'
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "..\tools\automate.py", line 1105, in <module>
    main()
  File "..\tools\automate.py", line 151, in main
    prebuilt_cef()
  File "..\tools\automate.py", line 295, in prebuilt_cef
    build_cef_projects()
  File "..\tools\automate.py", line 444, in build_cef_projects
    run_command(command, build_cefclient_dir)
  File "..\tools\automate.py", line 969, in run_command
    return subprocess.check_call(args, cwd=working_dir, env=env, shell=shell)
  File "C:\Users\Andrei\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Program Files\\Microsof

if you have any suggestion I will be grateful

Are you able to use newer windows 10 sdk? This thread also suggests newer win10 sdk https://www.magpcss.org/ceforum/viewtopic.php?f=6&t=19436
As a reference, my machine has 10.0.22621.0 sdk version.

@SoprachevAK
Copy link

As a reference, my machine has 10.0.22621.0 sdk version.

Thank you! This version helped me. With this lib compiled and works.

Copy link
Owner

@cztomczak cztomczak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution @linesight. You can find my code comments attached to this review.

pyBrowser.GetMainFrame().SendProcessMessage(cef_types.PID_RENDERER,
0, "DoJavascriptBindings", [{
mainFrame = pyBrowser.GetMainFrame()
if mainFrame.IsValid():
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we print a log message when frame is invalid?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a strong preference log or not log when frame is invalid

@cztomczak
Copy link
Owner

Also @linesight , why does GitHub show me "This branch has conflicts that must be resolved" message?

@linesight
Copy link
Contributor Author

I think I have addressed most (if not all ) techinical feedback from @cztomczak , really appreciate you also double check at upstream cef
Some feedback such as exposing new cef's API is nice to do, but to me, it seems to fall out of the my original scope of this pull request, I would like to consider a separate task for such enhancement.
If this technical pull request is accepted, I would make a follow-up/new pull request for the migration guide update (sorry, updating doc is too time consuming and a bit distracting while fixing technical issue, I would rather a seperate effort for doc)

@@ -11,10 +11,10 @@ cdef dict g_pyFrames = {}
# it shouldn't be kept global anymore.
cdef list g_unreferenced_frames = [] # [str unique identifier, ..]

cdef object GetUniqueFrameId(int browserId, object frameId):
return str(browserId) +"#"+ str(frameId)
cdef str GetUniqueFrameId(int browserId, py_string frameId):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess previously it used object because of py2 <> py3 string differences. Hmm now we use Py2 in cython and Py3 for apps and this works fine?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

frameId is now of py_string , to align with how current upstream cef123 is treating frame id as a string, see
chromiumembedded/cef@2f1e782
I don't have histocial knowledge why object type was used, but I guess it was due to old frame id being int64_t type, didn't have nice or convenient mapping in cython

as frameId is now of string type, it is natural to change to function GetUniqueFrameId return type to string as well. More specifc type is, in general, more preferred than general type object.

For "Py2 in cython" comment, I think you are referring to

"language_level": 2,

still being used in cython_setup.py

I noticed this line at the beginning of development of this pull request, I tried to get rid of this line at first, then I met warning

cythoning cefpython_py311.pyx to cefpython_py311.cpp
D:\workspace\cefpython\venv311\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: D:\workspace\cefpython\build\build_cefpython\cefpython_py311.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)

I didn't mean to introduce extra warning, then I put this language_level line back. How cython deals with this language_level internally isn't my primrary concern. Suppose you use python3 to execute this build instruction and example code, things work fine

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

language_level can be set to 2 or 3 or even 3str. Changing it would require extensive testing of all APIs to make sure nothing got broken.

language_level (2/3/3str), default=None
Globally set the Python language level to be used for module compilation. Default is None, indicating compatibility with Python 3 in Cython 3.x and with Python 2 in Cython 0.x. To enable Python 3 source code semantics, set this to 3 (or 3str) at the start of a module or pass the “-3” or “–3str” command line options to the compiler. For Python 2 semantics, use 2 and “-2” accordingly. Before Cython 3.1, the 3str option enabled Python 3 semantics but did not change the str type and unprefixed string literals to unicode when the compiled code runs in Python 2.x. In Cython 3.1, 3str is an alias for 3. Language level 2 ignores x: int type annotations due to the int/long ambiguity. Note that cimported files inherit this setting from the module being compiled, unless they explicitly set their own language level. Included source files always inherit this setting.

Ref:

Copy link
Owner

@cztomczak cztomczak Feb 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In requirements.txt Cython version is Cython == 0.29.36. That version supports only language level 2 (Python 2).
I just checked and see latest version is Cython 3.0.12 which supports language level 3 and 3str:
https://github.com/cython/cython/releases

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Cython i recall much confusion with str/unicode types. When you define function returning str type it really is Python 2 byte string from what I recall. To return unicode string I think that;s the reason for object type - when project had to support both Python 2 and Python 3. I'm not sure now, but it was all confusing.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More on Cython strings: https://cython.readthedocs.io/en/stable/src/tutorial/strings.html

Cython supports four Python string types: bytes, str, unicode and basestring...

A nice read 😊

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing cython language level might change how strings are handled, or other things I don't know. I dont recommend changing it without re-testing of all APIs. Our unit tests are limited.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the detailed info. For the line of code in question, do you prefer me changing back to

cdef object GetUniqueFrameId(int browserId, str frameId):

or we can live with

cdef str GetUniqueFrameId(int browserId, py_string frameId):

?
I don't have strong preference of either way, I just slightly prefer str over object

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a cdef, so internal function. It doesn't much matter here. What matters is what you expose to Python API - a byte string or unicode string - we should be consistent with the rest of the API.

@@ -80,7 +80,7 @@
ALLOW_PARTIAL = False

# Python versions
SUPPORTED_PYTHON_VERSIONS = [(2, 7), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8), (3, 9)]
SUPPORTED_PYTHON_VERSIONS = [(2, 7), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8), (3, 9), (3, 10), (3, 11)]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should drop support Python 2.7. Also old Python 3 version such as 3.4, 3.5, 3.6.... we don't need that. We should only support latest popular Py 3 versions.

Copy link
Owner

@cztomczak cztomczak Feb 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for information. This PR is about CEF upgrade. Support in regards to Python versions is a separate issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the info.

@cztomczak
Copy link
Owner

@linesight Thank you for your work on this PR. I added a few comments, we're almost good to merge. I can accept a separate PR for documentation changes.

Are all supported examples working fine?
My Windows machine is currently broken, can't test.

@linesight
Copy link
Contributor Author

@linesight Thank you for your work on this PR. I added a few comments, we're almost good to merge. I can accept a separate PR for documentation changes.

Are all supported examples working fine? My Windows machine is currently broken, can't test.

I have checked all example python scripts, including those snippets, they are good to run, with below limitation -

(venv311) D:\workspace\cefpython\build>pip install pyGObject
Collecting pyGObject
  Downloading pygobject-3.50.0.tar.gz (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 6.2 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [23 lines of output]
      + meson setup C:\Users\opopp\AppData\Local\Temp\pip-install-3u6vlyb1\pygobject_5717a74cecbb4a6ab467f21fd17595fa C:\Users\opopp\AppData\Local\Temp\pip-install-3u6vlyb1\pygobject_5717a74cecbb4a6ab467f21fd17595fa\.mesonpy-4asek4sk -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md -Dtests=false -Dwheel=true --wrap-mode=nofallback --native-file=C:\Users\opopp\AppData\Local\Temp\pip-install-3u6vlyb1\pygobject_5717a74cecbb4a6ab467f21fd17595fa\.mesonpy-4asek4sk\meson-python-native-file.ini
      The Meson build system
      Version: 1.7.0
      Source dir: C:\Users\opopp\AppData\Local\Temp\pip-install-3u6vlyb1\pygobject_5717a74cecbb4a6ab467f21fd17595fa
      Build dir: C:\Users\opopp\AppData\Local\Temp\pip-install-3u6vlyb1\pygobject_5717a74cecbb4a6ab467f21fd17595fa\.mesonpy-4asek4sk
      Build type: native build
      Project name: pygobject
      Project version: 3.50.0
      C compiler for the host machine: cl (msvc 19.41.34123 "Microsoft (R) C/C++ Optimizing Compiler Version 19.41.34123 for x64")
      C linker for the host machine: link link 14.41.34123.0
      Host machine cpu family: x86_64
      Host machine cpu: x86_64
      Program python3 found: YES (D:\workspace\cefpython\venv311\Scripts\python.exe)
      Run-time dependency python found: YES 3.11
      Found pkg-config: YES (C:\msys64\ucrt64\bin\pkg-config.EXE) 2.2.0
      Found CMake: C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.EXE (3.29.5)
      Run-time dependency gobject-introspection-1.0 found: NO (tried pkgconfig and cmake)
      Not looking for a fallback subproject for the dependency gobject-introspection-1.0 because:
      Use of fallback dependencies is disabled.

      ..\meson.build:31:9: ERROR: Dependency 'gobject-introspection-1.0' is required but not found.

      A full log can be found at C:\Users\opopp\AppData\Local\Temp\pip-install-3u6vlyb1\pygobject_5717a74cecbb4a6ab467f21fd17595fa\.mesonpy-4asek4sk\meson-logs\meson-log.txt
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

so I am not able to confidently say they are good. Given my intent is windows focus, gtk isn't a popular GUI framework at windows, I would like to defer gtk investigation until cefpython-on-linux starts

@cztomczak
Copy link
Owner

That's okay. As I understand this PR is for Windows support.
Regarding cookies - please create an issue in the tracker with a label v123 or somerthing.
I will merge this.
Thank you!

@cztomczak cztomczak merged commit 12ef37c into cztomczak:master Feb 17, 2025
@cztomczak cztomczak mentioned this pull request Feb 17, 2025
@cztomczak
Copy link
Owner

We should also updated Build Instructions: https://github.com/cztomczak/cefpython/blob/master/docs/Build-instructions.md

@cztomczak
Copy link
Owner

This PR was reverted. Please send changes to cefpython123 branch,.

@cztomczak
Copy link
Owner

@linesight Also please squash your commits into one big commit with a title like "Update CEF to version 123.0.7 with Chromium-123.0.6312.46 (Windows tested)". If you don't squash, I can squash it and merge, but then I don't know how you will be credited in the GitHub Contributors view (Insights tab).

@cztomczak
Copy link
Owner

Also documentation should be in one PR or another PR, but let's not mix in both PRs.

I can merge when I have an opportunity to test on a Windows machine.

@linesight
Copy link
Contributor Author

As there has been multiple dicussions and multiple git commits at my branch to address each feedback, it is way too much effort to squash my commit at my branch on my side. I want my branch to preserve my original git commit history. It is better you squash it during merge. Or you can configure the pull request setting at your depot to allow squash merging.
https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants