差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン 次のリビジョン両方とも次のリビジョン | ||
linux:chromium:cef [2019/02/18 06:06] – ともやん | 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/ |
$ mkdir build && cd build | $ mkdir build && cd build | ||
$ cmake -G "Unix Makefiles" | $ cmake -G "Unix Makefiles" | ||
行 39: | 行 39: | ||
<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 | ||
行 60: | 行 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 | ||
行 76: | 行 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: | ||
行 85: | 行 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): | ||
行 98: | 行 100: | ||
-- Configuring done | -- Configuring done | ||
-- Generating done | -- Generating done | ||
- | -- Build files have been written to: / | + | -- Build files have been written to: / |
</ | </ | ||
</ | </ | ||
行 107: | 行 109: | ||
<WRAP prewrap 100%> | <WRAP prewrap 100%> | ||
< | < | ||
- | In file included from /home/tomoyan/ | + | Scanning dependencies of target cef_gtest |
- | from /home/tomoyan/ | + | Scanning dependencies of target libcef_dll_wrapper |
- | /home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/ | + | [ 0%] Building CXX object tests/gtest/CMakeFiles/cef_gtest.dir/src/gtest-all.cc.o |
- | 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/browser/scheme_test.cc.o |
- | ^~~~~ | + | |
- | / | + | *** Run the following command manually to set SUID permissions *** |
- | bool UnderlyingHasOneRef() const { | + | EXE="/ |
- | ^~~~~ | + | |
- | /home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/ | + | [ 65%] Built target cefsimple |
- | bool UnderlyingHasAtLeastOneRef() const { | + | [ 66%] Building CXX object tests/cefclient/ |
- | ^~~~~ | + | 〜省略〜 |
- | cc1plus: all warnings being treated as errors | + | [ 99%] Building CXX object tests/ceftests/CMakeFiles/ceftests.dir/views/textfield_unittest.cc.o |
- | make[2]: *** [libcef_dll_wrapper/CMakeFiles/ | + | [100%] Building CXX object tests/ceftests/CMakeFiles/ceftests.dir/views/window_unittest.cc.o |
- | make[2]: *** 未完了のジョブを待っています.... | + | [100%] Linking CXX executable Debug/ |
- | In file included from /home/tomoyan/my_projects/ | + | |
- | from /home/tomoyan/my_projects/ | + | *** Run the following command manually to set SUID permissions *** |
- | / | + | EXE="/ |
- | void UnderlyingAddRef() const { | + | |
- | ^~~~~ | + | [100%] Built target cefclient |
- | / | + | |
- | bool UnderlyingRelease() const { | + | *** Run the following command manually to set SUID permissions *** |
- | ^~~~~ | + | EXE="/ |
- | /home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/ | + | |
- | bool UnderlyingHasOneRef() const { | + | [100%] Built target ceftests |
- | | + | |
- | / | + | |
- | bool UnderlyingHasAtLeastOneRef() const { | + | |
- | ^~~~~ | + | |
- | In file included from / | + | |
- | from / | + | |
- | /home/tomoyan/ | + | |
- | void* ptr) { | + | |
- | ^ | + | |
- | cc1plus: all warnings being treated as errors | + | |
- | make[2]: *** [libcef_dll_wrapper/ | + | |
- | make[1]: *** [CMakeFiles/ | + | |
- | make: *** [Makefile: | + | |
</ | </ | ||
</ | </ | ||
- | ビルドエラーが発生してコンパイルが停止してしまった。\\ | + | |
- | [[https:// | + | ==== SUIDアクセス許可を設定 ==== |
+ | ビルドが終わったら指示にしたがって、手動で次のコマンドを実行して SUID アクセス許可を設定する。 | ||
+ | <WRAP prewrap 100%> | ||
< | < | ||
- | $ vi ../cmake/cef_variables.cmake | + | $ EXE="/ |
</ | </ | ||
- | <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 -j4 | + | $ ./ |
</ | </ | ||
- | <WRAP prewrap 100%> | + | URL に chrome:%%// |
+ | {{: | ||
+ | |||
+ | ==== cef-project のビルド ==== | ||
+ | |||
+ | === cef-project のダウンロード === | ||
< | < | ||
- | CMake Warning (dev) at CMakeLists.txt: | + | $ 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: / | ||
+ | -- 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 < | Policy CMP0074 is not set: find_package uses < | ||
Run "cmake --help-policy CMP0074" | Run "cmake --help-policy CMP0074" | ||
行 194: | 行 191: | ||
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_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... | ||
〜省略〜 | 〜省略〜 | ||
- | In file included from / | + | -- [download 98% complete] |
- | from / | + | -- [download 99% complete] |
- | / | + | -- [download 100% complete] |
- | void UnderlyingAddRef() const { | + | -- Extracting |
- | | + | CMake Warning (dev) at CMakeLists.txt:54 (find_package): |
- | 〜省略〜 | + | Policy CMP0074 is not set: find_package uses < |
- | [ 99%] Building CXX object tests/ | + | Run " |
- | [100%] Building CXX object tests/ | + | |
- | [100%] Linking CXX executable Debug/ | + | |
- | *** Run the following command manually to set SUID permissions *** | + | CMake variable CEF_ROOT is set to: |
- | EXE="/ | + | |
- | [100%] | + | / |
+ | |||
+ | 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%] | ||
+ | [100%] Linking CXX executable Release/ | ||
*** Run the following command manually to set SUID permissions *** | *** Run the following command manually to set SUID permissions *** | ||
- | EXE="/ | + | EXE="/ |
[100%] Built target ceftests | [100%] Built target ceftests | ||
+ | </ | ||
+ | |||
+ | === SUIDアクセス許可を設定 === | ||
+ | ビルドが終わったら指示にしたがって、手動で次のコマンドを実行して SUID アクセス許可を設定する。 | ||
+ | <WRAP prewrap 100%> | ||
+ | < | ||
+ | $ EXE="/ | ||
</ | </ | ||
</ | </ | ||
- | ※**警告: ‘cfi-icall’ attribute directive ignored | + | |
+ | ==== 参考文献 ==== | ||
+ | [[https:// | ||
+ | [[https:// | ||