參考官網提供基本流程
以下是紀錄成功的流程
1. Setup
1-1. Build tools and libs
sudo apt-get install build-essential libgtk2.0-dev libssl-dev xsltproc ia32-libs libxml2-dev
1-2. Install Python v2.6/2.7 (Python v3.0 is not compatible and will cause errors)
sudo apt-get install python
Note:測試python 2.6.5, 2.7.3皆可, 若已安裝過則省略
1-3. Install SCons v2.0
sudo apt-get install scons
1-4. OpenSSL
sudo apt-get install libssl-dev
Note:似乎和Build tools and libs 有重複
1-5. Download the AllJoyn Source zip and extract source. The tree should look like below. Note, extra directories may exist.
root-source-dir/ core/ alljoyn/ ajtcl/ services/ base/ base_tcl/
Note: download source zip 選擇alljoyn-14.12.00a-src.tar.gz 解壓縮完會產生 alljoyn-14.12.00a-src 目錄,目錄內容如下
alljoyn_c alljoyn_java alljoyn_objc build_core common README.md SConstruct alljoyn_core alljoyn_js alljoyn_unity build.xml manifest.txt README.txt services
除了選擇alljoyn-14.12.00a-src.tar.gz 以外還可使用git clone的方式來下載 source code 參考這裡, 但未測試
2. Build Sample
2-1. 開啟終端機移動到 alljoyn-14.12.00a-src 目錄中並輸入
scons BINDINGS=cpp WS=off BT=off ICE=off
terminal會出現一連串build step, 如下
scons: Reading SConscript files ... Building bindings: cpp Building services: BULLSEYE_BIN not specified GTEST_DIR not specified skipping common unit test build BULLSEYE_BIN not specified GTEST_DIR not specified skipping About Service unit test build GTEST_DIR not specified skipping alljoyn_core unit test build scons: warning: Ignoring missing SConscript 'build/linux/x86_64/debug/obj/services/about/SConscript' File "/home/rcserver/projects/jellyfish/alljoyn-14.12.00a-src/alljoyn_core/samples/eventaction/SConscript", line 35, in <module> scons: done reading SConscript files. scons: Building targets ... Install file: "alljoyn_core/docs/README.linux.txt" as "build/linux/x86_64/debug/dist/README.txt" ...
Note: 完成後會產生build資料夾, 後續 run sample 動作都與此有關
最後輸入
SERVICES="about,notification,controlpanel,config,onboarding,sample_apps"