--
README.mdより。
Eclipse IDE Support
Follows the Chromium project
Eclipse Setup Instructions
until "Optional: Building inside Eclipse" section (don't do that section, we
will set it up differently)Generate Eclipse settings:
cd system/bt
gn gen --ide=eclipse out/Default
In Eclipse, do File->Import->C/C++->C/C++ Project Settings, choose the XML
location under system/bt/out/DefaultRight click on the project. Go to Preferences->C/C++ Build->Builder Settings.
Uncheck "Use default build command", but instead using "ninja -C out/Default"
5. Goto Behaviour tab, change clean command to "-t clean"
以下に従って作業開始。
https://chromium.googlesource.com/chromium/src.git/+/master/docs/linux/eclipse_dev.md
eclipse-inst-linux64.tar.gzをダウンロード
$ tar xvzf eclipse-inst-linux64.tar.gz
$ cd clipse-installer
$ gedit ./eclipse-inst.ini
ファイル名が違うけど多分これ。
-Xms256M -> -Xms1024M
-Xmx1024M -> -Xmx3072M
$ ./eclipse-inst
-> JREかJDKが必要とエラーになった。
$ java
コマンド 'java' が見つかりません。次の方法でインストールできます:
sudo apt install default-jre # version 2:1.11-72, or
sudo apt install openjdk-11-jre-headless # version 11.0.8+10-0ubuntu1~20.04
sudo apt install openjdk-13-jre-headless # version 13.0.3+3-1ubuntu2
sudo apt install openjdk-14-jre-headless # version 14.0.1+7-1ubuntu1
sudo apt install openjdk-8-jre-headless # version 8u265-b01-0ubuntu2~20.04
$ sudo apt install openjdk-14-jre-headless
$ ./eclipse-inst
-> 動いた
-> 適当にインストールしてしまった
$ cd ~/eclipse/cpp-2020-06/eclipse
$ ./eclipse
-> workspace設定もそのまま
Help -> Install New Software...を選択
"Work with:"でCDT - "http://download.eclipse.org/tools/cdt/releases/9.11"を選択
"CDT Main Features"と"CDT Optional Features"にチェックを入れてインストール -> Eclipse再起動
Window -> Perspective -> Open Perspective -> Other...で"C/C++"を選択(元からなってる?)
Java PerspectiveをClose(元からなってる?)
設定変更
"Build Automatically"のチェックを外す(恐ろしい設定だな)
Windows -> Preferencesでworkspaceを検索(buildで検索した方が速い?)チェック外す。
"Refresh using native hooks or polling"のチェックを外す(元から外れている?)
Windows -> Preferencesでworkspaceを検索
プロジェクト作成
File -> New -> Project... -> C/C++ -> Makefile Project with Existing CodeでNext
Project Name: aosp_bt
Existing Codec Location
aospのsystem/btの場所
ToolchainでLinux GCC選択
-> Finish
aosp_bt上で右クリック -> Properties... -> C/C++ General -> Preprocess Include Paths, Macros etc. -> Providersをクリック
"CDT GCC Built-in Compiler Settings"を選択
"Command to get compiler specs"に"-std=c++14"を追記