解析 Qt for Maemo 開發(fā)環(huán)境搭建流程
Qt for Maemo 開發(fā)環(huán)境搭建流程 是本文將要介紹的內容,在網上看了很多類似的文章,但都有欠缺,現在把自己的經驗記錄一下
我的操作系統(tǒng)是 Ubuntu 9.10。我發(fā)現完成以下安裝后將系統(tǒng)升級為10.04會導致原有的安裝部分失效,所以建議大家不要在9.10上安裝,然后升級到10.04。
1 安裝 Maemo 5 SDK
Nokia弄了個圖形界面的安裝程序,可以很方便的安裝Maemo 5 SDK,Scratchbox。
下載地址為http://www.forum.nokia.com/info/sw.nokia.com/id/c05693a1-265c-4c7f-a389-fc227db4c465/Maemo_5_SDK.html
按下面那個網址的要求修改下載到的maemo-sdk-install-wizard_5.0.py文件,并進行安裝(這個安裝需要上網下載大量數據,請在速度快的時候完成,安心等待)
http://wiki.forum.nokia.com/index.php/How_to_install_Maemo_5_SDK_using_GUI_Installer
2、安裝Esbox
這個基于Eclipse的開發(fā)平臺, 可以替我們完成很多命令
在安裝Esbox前,請確保操作系統(tǒng)里有jre 6 和 xulrunner,以下命令可以安裝xulrunner
- view plaincopy to clipboardprint?
- > sudo apt-get install xulrunner
- > sudo apt-get install xulrunner
Esbox下載頁面為https://garage.maemo.org/frs/?group_id=192,要分別下載esbox_2.0.0-R20091216-common.zip 和 esbox_2.0.0-R20091216-linux.gtk.x86.zip 兩個文件,并解壓到同一個文件夾。
在linux下啟動Esbox需要執(zhí)行esbox.sh文件
3、安裝Qt for maemo
這個方法也是有很多,不過建議通過使用Esbox的package檢查功能,這樣比較簡單
Esbox在你新建項目后都會詢問你是否進行package檢查,建議剛開始開發(fā)的時候選擇 是,這樣Esbox就會幫你檢查是否缺少package,并下載安裝缺少的package。
如果自己敲命令安裝,可以按照以下步驟
(1) 進入scratchbox沙盒
- view plaincopy to clipboardprint?
- > scratchbox
- > scratchbox
(2)選擇相應的target,平時的開發(fā)可以用fremantle x86.
- view plaincopy to clipboardprint?
- > sb-menu
- > sb-menu
(3)添加源。這個源是沙盒里的,不是Ubuntu的
- view plaincopy to clipboardprint?
- > vim /etc/apt/source.list
- > vim /etc/apt/source.list
下面是maemo的官方源
view plaincopy to clipboardprint?
deb http://repository.maemo.org/extras/ fremantle free non-free
deb-src http://repository.maemo.org/extras/ fremantle free
deb http://repository.maemo.org/extras-devel fremantle free non-free
deb-src http://repository.maemo.org/extras-devel fremantle free
deb http://repository.maemo.org/extras/ fremantle free non-free
deb-src http://repository.maemo.org/extras/ fremantle free
deb http://repository.maemo.org/extras-devel fremantle free non-free
deb-src http://repository.maemo.org/extras-devel fremantle free
下面是鏡像源,跟上面那個二選一就可以了 view plaincopy to clipboardprint?
deb http://espejo.freemoe.org/repository.maemo.org/extras/ fremantle free non-free
deb-src http://espejo.freemoe.org/repository.maemo.org/extras/ fremantle free
deb http://espejo.freemoe.org/repository.maemo.org/extras-devel fremantle free non-free
deb-src http://espejo.freemoe.org/repository.maemo.org/extras-devel fremantle free
deb http://espejo.freemoe.org/repository.maemo.org/extras/ fremantle free non-free
deb-src http://espejo.freemoe.org/repository.maemo.org/extras/ fremantle free
deb http://espejo.freemoe.org/repository.maemo.org/extras-devel fremantle free non-free
deb-src http://espejo.freemoe.org/repository.maemo.org/extras-devel fremantle free
(4)執(zhí)行系統(tǒng)更新
- view plaincopy to clipboardprint?
- fakeroot apt-get update
- fakeroot apt-get dist-upgrade
- fakeroot apt-get update
- fakeroot apt-get dist-upgrade
(5)執(zhí)行以下命令安裝 qt 4.6.2
- view plaincopy to clipboardprint?
- fakeroot apt-get install libqt4-dev libqt4-core libqt4-gui
- fakeroot apt-get install libqt4-dev libqt4-core libqt4-gui
其實qt的包還有很多的,例如libqt4-phonon,所以建議使用Esbox的package檢查功能,這樣比較方便
通過上面的步驟,基本可以滿足Qt for maemo的開發(fā)了,至于scrathbox和Esbox如何使用,就請各位繼續(xù)摸索
網絡還有很多類似的教程,詳細說明了如何全用命令進行安裝,在這里我就不重復了,請各位參考以下網頁
http://wiki.maemo.org/Documentation/Maemo_5_Final_SDK_Installation
http://wiki.maemo.org/Qt4_development
下面是以下比較好的Qt網站
http://www.qteverywhere.com/learnqt
小結:解析 Qt for Maemo 開發(fā)環(huán)境搭建流程的內容介紹完了,希望本文對你有幫助!