差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン 次のリビジョン両方とも次のリビジョン | ||
linux:chromium:cef [2019/02/13 22:40] – [ビルド] ともやん | linux:chromium:cef [2019/05/14 18:06] – [Sample の実行] ともやん | ||
---|---|---|---|
行 1: | 行 1: | ||
====== Chromium Embedded Framework ====== | ====== Chromium Embedded Framework ====== | ||
- | Chromium Embedded Framework(CEF)は、Chromiumベースのブラウザを他のアプリケーションに埋め込むための単純なフレームワークである。\\ | + | Chromium Embedded Framework(CEF) は、Chromiumベースのブラウザを他のアプリケーションに埋め込むための単純なフレームワークである。\\ |
===== フレームワークのダウンロード ===== | ===== フレームワークのダウンロード ===== | ||
行 33: | 行 33: | ||
Makefile を生成する。 | Makefile を生成する。 | ||
< | < | ||
- | $ cd cef_binary_3.3626.1886.g162fdec_linux64 | + | $ cd cef_binary_74.1.16+ge20b240+chromium-74.0.3729.131_linux64/ |
- | $ cmake -G "Unix Makefiles" | + | $ mkdir build && cd build |
+ | $ cmake -G "Unix Makefiles" | ||
</ | </ | ||
<WRAP prewrap 100%> | <WRAP prewrap 100%> | ||
< | < | ||
- | -- The C compiler identification is GNU 8.2.1 | + | -- The C compiler identification is GNU 9.1.1 |
- | -- The CXX compiler identification is GNU 8.2.1 | + | -- The CXX compiler identification is GNU 9.1.1 |
-- Check for working C compiler: /usr/bin/cc | -- Check for working C compiler: /usr/bin/cc | ||
-- Check for working C compiler: /usr/bin/cc -- works | -- Check for working C compiler: /usr/bin/cc -- works | ||
行 59: | 行 60: | ||
CMake variable CEF_ROOT is set to: | CMake variable CEF_ROOT is set to: | ||
- | / | + | / |
For compatibility, | For compatibility, | ||
This warning is for project developers. | This warning is for project developers. | ||
+ | -- Performing Test COMPILER_SUPPORTS_NO_UNDEFINED_VAR_TEMPLATE | ||
+ | -- Performing Test COMPILER_SUPPORTS_NO_UNDEFINED_VAR_TEMPLATE - Success | ||
-- Performing Test COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS | -- Performing Test COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS | ||
-- Performing Test COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS - Success | -- Performing Test COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS - Success | ||
行 75: | 行 78: | ||
-- Project architecture: | -- Project architecture: | ||
-- Build type: Debug | -- Build type: Debug | ||
- | -- Binary distribution root: / | + | -- Binary distribution root: / |
-- CEF sandbox: | -- CEF sandbox: | ||
-- Standard libraries: | -- Standard libraries: | ||
行 84: | 行 87: | ||
-- C compile flags (Debug): | -- C compile flags (Debug): | ||
-- C compile flags (Release): | -- C compile flags (Release): | ||
- | -- C++ compile flags: | + | -- C++ compile flags: |
-- C++ compile flags (Debug): | -- C++ compile flags (Debug): | ||
-- C++ compile flags (Release): | -- C++ compile flags (Release): | ||
行 97: | 行 100: | ||
-- Configuring done | -- Configuring done | ||
-- Generating done | -- Generating done | ||
- | -- Build files have been written to: / | + | -- Build files have been written to: / |
</ | </ | ||
</ | </ | ||
CEF をビルドする。 | CEF をビルドする。 | ||
< | < | ||
- | $ make | + | $ make -j4 |
</ | </ | ||
<WRAP prewrap 100%> | <WRAP prewrap 100%> | ||
< | < | ||
- | In file included from /home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/ctocpp/value_ctocpp.h:25, | + | Scanning dependencies of target cef_gtest |
- | from /home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/cpptoc/accessibility_handler_cpptoc.cc:16: | + | Scanning dependencies of target libcef_dll_wrapper |
- | / | + | [ 0%] Building CXX object tests/gtest/CMakeFiles/cef_gtest.dir/src/ |
- | void UnderlyingAddRef() const { | + | [ 0%] Building CXX object libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/shutdown_checker.cc.o |
- | ^~~~~ | + | [ 1%] Building CXX object libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/base/cef_atomicops_x86_gcc.cc.o |
- | /home/tomoyan/ | + | 〜省略〜 |
- | bool UnderlyingRelease() const { | + | [ 65%] Building CXX object tests/cefclient/CMakeFiles/cefclient.dir/ |
- | ^~~~~ | + | |
- | /home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/ctocpp/ctocpp_ref_counted.h:95:30: エラー: ‘cfi-icall’ attribute directive ignored | + | *** Run the following command manually to set SUID permissions *** |
- | bool UnderlyingHasOneRef() const { | + | EXE="/ |
- | ^~~~~ | + | |
- | / | + | [ 65%] Built target cefsimple |
- | bool UnderlyingHasAtLeastOneRef() const { | + | [ 66%] Building CXX object tests/cefclient/CMakeFiles/cefclient.dir/browser/server_test.cc.o |
- | ^~~~~ | + | 〜省略〜 |
- | cc1plus: all warnings being treated as errors | + | [ 99%] Building CXX object tests/ceftests/CMakeFiles/ceftests.dir/ |
- | make[2]: | + | [100%] Building CXX object tests/ceftests/CMakeFiles/ceftests.dir/ |
- | make[1]: *** [CMakeFiles/Makefile2: | + | [100%] Linking CXX executable Debug/ |
- | make: *** [Makefile: | + | |
+ | *** Run the following command manually to set SUID permissions *** | ||
+ | EXE="/ | ||
+ | |||
+ | [100%] Built target cefclient | ||
+ | |||
+ | *** Run the following command manually to set SUID permissions *** | ||
+ | EXE="/home/tomoyan/my_projects/cef_binary_74.1.16+ge20b240+chromium-74.0.3729.131_linux64/build/tests/ceftests/Debug/ | ||
+ | |||
+ | [100%] Built target ceftests | ||
</ | </ | ||
</ | </ | ||
- | ビルドエラーが発生してコンパイルが停止してしまった。\\ | + | |
- | [[https:// | + | ==== SUIDアクセス許可を設定 ==== |
+ | ビルドが終わったら指示にしたがって、手動で次のコマンドを実行して SUID アクセス許可を設定する。 | ||
+ | <WRAP prewrap 100%> | ||
< | < | ||
- | $ vi cmake/cef_variables.cmake | + | $ EXE="/home/ |
</ | </ | ||
- | <file autoconf cmake/cef_variables.cmake> | + | </WRAP> |
- | # | + | |
- | # Linux configuration. | + | |
- | # | + | |
- | if(OS_LINUX) | + | ==== Sample の実行 ==== |
- | # Platform-specific compiler/ | + | cefclient |
- | set(CEF_LIBTYPE SHARED) | + | |
- | list(APPEND CEF_COMPILER_FLAGS | + | |
- | -fno-strict-aliasing | + | |
- | -fPIC # Generate position-independent code for shared libraries | + | |
- | -fstack-protector | + | |
- | -funwind-tables | + | |
- | -fvisibility=hidden | + | |
- | --param=ssp-buffer-size=4 # Set the minimum buffer size protected by SSP (security feature, related to stack-protector) | + | |
- | -pipe # Use pipes rather than temporary files for communication between build stages | + | |
- | -pthread | + | |
- | -Wall # Enable all warnings | + | |
- | # -Werror | + | |
- | -Wno-missing-field-initializers # Don't warn about missing field initializers | + | |
- | -Wno-unused-parameter | + | |
- | -Wno-error=comment | + | |
- | | + | |
- | ) | + | |
- | </ | + | |
- | ※**-Werror**コンパイラオプションを無効にする。\\ | + | |
- | \\ | + | |
- | 再度 CEF をビルドする。 | + | |
< | < | ||
- | $ make | + | $ ./ |
</ | </ | ||
+ | URL に chrome: | ||
+ | {{: | ||
+ | |||
+ | ==== cef-project のビルド ==== | ||
+ | |||
+ | === cef-project のダウンロード === | ||
+ | < | ||
+ | $ git clone https:// | ||
+ | </ | ||
+ | |||
+ | === Makefile の生成 === | ||
+ | cmake を実行すると cef_binary のダウンロードをしてから Makefile を生成してくれます。 | ||
+ | < | ||
+ | $ cd cef-project | ||
+ | $ mkdir build && cd build | ||
+ | $ cmake -G "Unix Makefiles" | ||
+ | </ | ||
+ | < | ||
+ | -- The C compiler identification is GNU 9.1.1 | ||
+ | -- The CXX compiler identification is GNU 9.1.1 | ||
+ | -- Check for working C compiler: /usr/bin/cc | ||
+ | -- Check for working C compiler: /usr/bin/cc -- works | ||
+ | -- Detecting C compiler ABI info | ||
+ | -- Detecting C compiler ABI info - done | ||
+ | -- Detecting C compile features | ||
+ | -- Detecting C compile features - done | ||
+ | -- Check for working CXX compiler: / | ||
+ | -- Check for working CXX compiler: / | ||
+ | -- Detecting CXX compiler ABI info | ||
+ | -- Detecting CXX compiler ABI info - done | ||
+ | -- Detecting CXX compile features | ||
+ | -- Detecting CXX compile features - done | ||
+ | CMake Warning (dev) at CMakeLists.txt: | ||
+ | Policy CMP0074 is not set: find_package uses < | ||
+ | Run "cmake --help-policy CMP0074" | ||
+ | command to set the policy and suppress this warning. | ||
+ | |||
+ | CMake variable CEF_ROOT is set to: | ||
+ | |||
+ | / | ||
+ | |||
+ | For compatibility, | ||
+ | This warning is for project developers. | ||
+ | |||
+ | -- Performing Test COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS | ||
+ | -- Performing Test COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS - Success | ||
+ | -- Performing Test COMPILER_SUPPORTS_NO_LITERAL_SUFFIX | ||
+ | -- Performing Test COMPILER_SUPPORTS_NO_LITERAL_SUFFIX - Success | ||
+ | -- Performing Test COMPILER_SUPPORTS_NO_NARROWING | ||
+ | -- Performing Test COMPILER_SUPPORTS_NO_NARROWING - Success | ||
+ | -- Found PythonInterp: | ||
+ | -- Downloading clang-format from Google Storage... | ||
+ | 〜省略〜 | ||
+ | -- [download 98% complete] | ||
+ | -- [download 99% complete] | ||
+ | -- [download 100% complete] | ||
+ | -- Extracting / | ||
+ | CMake Warning (dev) at CMakeLists.txt: | ||
+ | Policy CMP0074 is not set: find_package uses < | ||
+ | Run "cmake --help-policy CMP0074" | ||
+ | command to set the policy and suppress this warning. | ||
+ | |||
+ | CMake variable CEF_ROOT is set to: | ||
+ | |||
+ | / | ||
+ | |||
+ | For compatibility, | ||
+ | This warning is for project developers. | ||
+ | |||
+ | -- Performing Test COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS | ||
+ | -- Performing Test COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS - Success | ||
+ | -- Performing Test COMPILER_SUPPORTS_NO_LITERAL_SUFFIX | ||
+ | -- Performing Test COMPILER_SUPPORTS_NO_LITERAL_SUFFIX - Success | ||
+ | -- Performing Test COMPILER_SUPPORTS_NO_NARROWING | ||
+ | -- Performing Test COMPILER_SUPPORTS_NO_NARROWING - Success | ||
+ | -- Found PythonInterp: | ||
+ | -- Downloading clang-format from Google Storage... | ||
+ | 0> File tools/ | ||
+ | Success! | ||
+ | Downloading 1 files took 0.005556 second(s) | ||
+ | -- *** CEF CONFIGURATION SETTINGS *** | ||
+ | -- Generator: | ||
+ | -- Platform: | ||
+ | -- Project architecture: | ||
+ | -- Build type: | ||
+ | -- Binary distribution root: / | ||
+ | -- CEF sandbox: | ||
+ | -- Standard libraries: | ||
+ | -- Compile defines: | ||
+ | -- Compile defines (Debug): | ||
+ | -- Compile defines (Release): | ||
+ | -- C compile flags: | ||
+ | -- C compile flags (Debug): | ||
+ | -- C compile flags (Release): | ||
+ | -- C++ compile flags: | ||
+ | -- C++ compile flags (Debug): | ||
+ | -- C++ compile flags (Release): | ||
+ | -- Exe link flags: | ||
+ | -- Exe link flags (Debug): | ||
+ | -- Exe link flags (Release): | ||
+ | -- Shared link flags: | ||
+ | -- Shared link flags (Debug): | ||
+ | -- Shared link flags (Release): | ||
+ | -- CEF Binary files: | ||
+ | -- CEF Resource files: | ||
+ | -- Configuring done | ||
+ | -- Generating done | ||
+ | -- Build files have been written to: / | ||
+ | </ | ||
+ | |||
+ | === ビルド === | ||
+ | cef-project をビルドする。 | ||
+ | < | ||
+ | $ make -j4 | ||
+ | </ | ||
+ | < | ||
+ | CMake Warning (dev) at CMakeLists.txt: | ||
+ | Policy CMP0074 is not set: find_package uses < | ||
+ | Run "cmake --help-policy CMP0074" | ||
+ | command to set the policy and suppress this warning. | ||
+ | |||
+ | CMake variable CEF_ROOT is set to: | ||
+ | |||
+ | / | ||
+ | |||
+ | For compatibility, | ||
+ | This warning is for project developers. | ||
+ | |||
+ | -- Downloading clang-format from Google Storage... | ||
+ | 0> File tools/ | ||
+ | Success! | ||
+ | 〜省略〜 | ||
+ | [100%] Building CXX object third_party/ | ||
+ | [100%] Linking CXX executable Release/ | ||
+ | |||
+ | *** Run the following command manually to set SUID permissions *** | ||
+ | EXE="/ | ||
+ | |||
+ | [100%] Built target ceftests | ||
+ | </ | ||
+ | |||
+ | === SUIDアクセス許可を設定 === | ||
+ | ビルドが終わったら指示にしたがって、手動で次のコマンドを実行して SUID アクセス許可を設定する。 | ||
<WRAP prewrap 100%> | <WRAP prewrap 100%> | ||
< | < | ||
- | tocpp/ | + | $ EXE="/ |
- | | + | |
- | / | + | |
- | void UnderlyingAddRef() const { | + | |
- | ^~~~~ | + | |
</ | </ | ||
</ | </ | ||
- | ※**警告: ‘cfi-icall’ attribute directive ignored | + | |
+ | ==== 参考文献 ==== | ||
+ | [[https:// | ||
+ | [[https:// | ||