OWB:以WebKit為基礎的嵌入式網路瀏覽器
幾個月前介紹了「WebKit的Gtk+支援」新進展,現在openmoko已正式採納為web engine,提供為網頁瀏覽與RSS reader使用。Origyn Web Browser (OWB)則是另一個以WebKit為基礎的開放原始碼網路瀏覽器 (BSD license + LGPL + misc),針對嵌入式環境做了許多微調與修正,引入一層簡化描繪與底層操作的軟體層,稱為OWB Abstraction Layer (OwBal),得以銜接WebKit與消費性電子產品需求。具體來說,原本的WebKit需要heavyweight UI toolkit去作widget/font描繪,但OWB以OwBAL巧妙地補齊介面部份,並允許lightweight UI呈現,也就是 "render itself by its own toolkit"。詳細的技術介紹可參考「Introducing OWB, an open-source browser for consumer devices」一文。
建構方式如下:
- 取得開發中的程式碼:
svn checkout http://www.sand-labs.org/svn/trunk owb
- 以CMake調整組態設定:
cd owb && ccmake .具體情況如下圖:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzJaDVbmWy5cD1YUod0WvEqgwj0UfeyKrA2OSpnCZL0grsHgs0NZR5EouSQZp4IQGnMDenX3efFKrB27p1JPzhSoX_KlT90ZdPBRdzIozpbu68034CZGO0Y-gGXl8y6iN5mLmmEr14bp4/s320/ccmake-owb.png)
最後按下[g]即可產生必要的Makefile
- 開始建構,當然是執行make
以「Jserv's blog」為例,OWB的呈現效果如下:Index: BAL/Implementations/Fonts/freetype/BTFont.cpp
===================================================================
--- BAL/Implementations/Fonts/freetype/BTFont.cpp (revision 147)
+++ BAL/Implementations/Fonts/freetype/BTFont.cpp (working copy)
@@ -114,7 +114,7 @@
int size = static_cast<int>(m_fontDescription.specifiedSize());
if (m_fontMap[size] == 0)
- m_fontMap[size] = d->open("/usr/share/fonts/owb.ttf", size, 0);
+ m_fontMap[size] = d->open("/usr/share/fonts/truetype/arphic/ukai.ttf", size, 0);
d->m_ttfFont = m_fontMap[size];
if (d->m_ttfFont == NULL)
logml(MODULE_FONTS, LEVEL_EMERGENCY, make_message("open : \n"));
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid1R_21LKA6C70lDVi2IXdSM8hYZZ61NSJdGbRejhvoVQWGmvPjhZOZ7fSt7VFlZ66PmhG7lvn__yAsxcVWkJ02aSIqPrJQHDhwlNAZ9Mr_nvK8Wibfvk8Q3k8iEYbYWy7P_TwnVe_a_g/s320/owb.png)
3 則留言:
d- < open(xxxx)
^^^^^
不好意思, 請教一下這是打錯了? 還是特殊用法呢?
To bfish,
It's typo. FIXED now. Thanks.
Hello ! jserv!
有試著把 owb-1.0 make 好了....想問一下執行環境一定要在 x window 下嗎?
張貼留言