差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
linux:chromium:cef [2019/05/14 13:39] – [参考文献] ともやん | linux:chromium:cef [2019/05/18 02:23] (現在) – 外部編集 非ログインユーザー | ||
---|---|---|---|
行 3: | 行 3: | ||
===== フレームワークのダウンロード ===== | ===== フレームワークのダウンロード ===== | ||
- | [[https:// | + | [[https:// |
===== フレームワーク入門 ===== | ===== フレームワーク入門 ===== | ||
行 29: | 行 29: | ||
Chromium Embedded Framework (CEF) のバイナリディストリビューションを解凍する。 | Chromium Embedded Framework (CEF) のバイナリディストリビューションを解凍する。 | ||
< | < | ||
- | $ tar jxvf cef_binary_3.3626.1886.g162fdec_linux64.tar.bz2 | + | $ tar jxvf cef_binary_74.1.16+ge20b240+chromium-74.0.3729.131_linux64.tar.bz2 |
</ | </ | ||
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 / | + | Scanning dependencies of target cef_gtest |
- | from / | + | Scanning dependencies of target libcef_dll_wrapper |
- | / | + | [ 0%] Building CXX object tests/gtest/CMakeFiles/cef_gtest.dir/src/gtest-all.cc.o |
- | void UnderlyingAddRef() const { | + | [ 0%] Building CXX object |
- | | + | [ 1%] Building CXX object |
- | /home/tomoyan/my_projects/ | + | 〜省略〜 |
- | bool UnderlyingRelease() const { | + | [ 65%] Building CXX object tests/cefclient/ |
- | ^~~~~ | + | |
- | / | + | |
- | bool UnderlyingHasOneRef() const { | + | |
- | ^~~~~ | + | |
- | / | + | |
- | bool UnderlyingHasAtLeastOneRef() const { | + | |
- | | + | |
- | cc1plus: all warnings being treated as errors | + | |
- | make[2]: *** [libcef_dll_wrapper/ | + | |
- | make[2]: *** 未完了のジョブを待っています.... | + | |
- | In file included from / | + | |
- | from / | + | |
- | / | + | |
- | void UnderlyingAddRef() const { | + | |
- | | + | |
- | / | + | |
- | bool UnderlyingRelease() const { | + | |
- | ^~~~~ | + | |
- | / | + | |
- | bool UnderlyingHasOneRef() const { | + | |
- | ^~~~~ | + | |
- | / | + | |
- | bool UnderlyingHasAtLeastOneRef() const { | + | |
- | | + | |
- | In file included from / | + | |
- | from / | + | |
- | / | + | |
- | void* ptr) { | + | |
- | ^ | + | |
- | cc1plus: all warnings being treated as errors | + | |
- | make[2]: *** [libcef_dll_wrapper/ | + | |
- | make[1]: *** [CMakeFiles/Makefile2: | + | |
- | make: *** [Makefile: | + | |
- | </code> | + | |
- | </ | + | |
- | ビルドエラーが発生してコンパイルが停止してしまった。\\ | + | |
- | [[https:// | + | |
- | < | + | |
- | $ vi ../ | + | |
- | </ | + | |
- | <file autoconf cmake/ | + | |
- | # | + | |
- | # Linux configuration. | + | |
- | # | + | |
- | if(OS_LINUX) | + | *** Run the following command manually |
- | # Platform-specific compiler/ | + | EXE="/home/ |
- | 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 | + | |
- | -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 | + | |
- | -Wno-comment | + | |
- | ) | + | |
- | </ | + | |
- | ※**-Werror**コンパイラオプションを無効にする。\\ | + | |
- | \\ | + | |
- | 再度 CEF をビルドする。 | + | |
- | < | + | |
- | $ make -j4 | + | |
- | </code> | + | |
- | <WRAP prewrap 100%> | + | |
- | < | + | |
- | CMake Warning (dev) at CMakeLists.txt:187 (find_package): | + | |
- | 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: | + | [ 65%] Built target cefsimple |
- | + | [ 66%] Building CXX object tests/cefclient/CMakeFiles/cefclient.dir/browser/server_test.cc.o | |
- | | + | |
- | + | ||
- | For compatibility, | + | |
- | This warning is for project developers. | + | |
- | 〜省略〜 | + | |
- | In file included from /home/tomoyan/ | + | |
- | from / | + | |
- | / | + | |
- | void UnderlyingAddRef() const { | + | |
- | ^~~~~ | + | |
〜省略〜 | 〜省略〜 | ||
[ 99%] Building CXX object tests/ | [ 99%] Building CXX object tests/ | ||
行 210: | 行 128: | ||
*** Run the following command manually to set SUID permissions *** | *** Run the following command manually to set SUID permissions *** | ||
- | EXE="/ | + | EXE="/ |
[100%] Built target cefclient | [100%] Built target cefclient | ||
*** 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="/ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ==== Sample の実行 ==== | ||
+ | cefclient を実行する。\\ | ||
+ | < | ||
+ | $ ./ | ||
+ | </ | ||
+ | URL に chrome: | ||
+ | {{: | ||
==== cef-project のビルド ==== | ==== cef-project のビルド ==== | ||
行 237: | 行 170: | ||
</ | </ | ||
< | < | ||
- | -- 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 | ||
行 251: | 行 184: | ||
-- Detecting CXX compile features | -- Detecting CXX compile features | ||
-- Detecting CXX compile features - done | -- Detecting CXX compile features - done | ||
- | -- Downloading / | + | CMake Warning (dev) at CMakeLists.txt: |
- | -- Downloading | + | Policy CMP0074 is not set: find_package uses < |
- | -- [download 0% complete] | + | Run " |
- | -- [download 1% complete] | + | command to set the policy and suppress this warning. |
- | -- [download | + | |
+ | CMake variable CEF_ROOT is set to: | ||
+ | |||
+ | | ||
+ | |||
+ | For compatibility, | ||
+ | This warning is for project developers. Use -Wno-dev to suppress it. | ||
+ | |||
+ | -- 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 98% complete] | ||
行 313: | 行 261: | ||
-- Build files have been written to: / | -- Build files have been written to: / | ||
</ | </ | ||
- | |||
- | === cef_variables.cmake の修正 === | ||
- | ビルドエラーにならない様に cef_variables.cmake を修正する。 | ||
- | < | ||
- | $ vi ../ | ||
- | </ | ||
- | <file autoconf ../ | ||
- | # -Werror | ||
- | </ | ||
- | ※**-Werror**をコメントアウトする。\\ | ||
=== ビルド === | === ビルド === |