Tag Archives: Linux

How to run autotests in Qt for Symbian on Linux and Mac?

Here is the official article for it, Installing Qt for the Symbian platform using Linux (experimental).

The basic idea is same on Linux and Mac OS X.

1. For phone, you need to install Application TRK

S60 5.0/Symbian^1 – s60_5_0_app_trk_3_2_7.sisx
Symbian^3 – s60_tb_9_2_app_trk_3_2_8.sisx

2. Use usb cable to connect your phone and computer, Linux or Mac OS X. Remember to set to “PC Suite” mode or “Nokia Ovi Suite” mode on your phone. Then launch your Application TRK via “RnD Tools”->”TRK”.

3. About the device name for your phone on computer

For Linux, see more details in Configuring the USB Serial Driver on the Linux System. After that, you will find /dev/ttyUSBx and maybe another /dev/ttyUSBy, better to “sudo chmod 777 /dev/ttyUSB*” for them(some Linux distribution do not give the access to normal users for it, like Ubuntu).

For Mac, you could find sth like /dev/cu.usbmodemfaXx and /dev/cu.usbmodemfaXy.

4. To build runonphone, you need to have libusb installed.

For Linux, just follow that documentation, “sudo apt-get install libusb-dev” should be ok for Debian/Ubuntu.

For Mac, “sudo brew install libusb-compat” works for me.

5. Build runonphone, use the qmake in your desktop Qt.

cd ~/qt/qt/tools/runonphone
/usr/bin/qmake
make

6. Build and run your autotests, please check previous blog for the EPOCROOT and PATH environments settings.

cd qt/qt/tests/auto/qdatetime
~/build/s3_gcce/bin/qmake -spec ~/qt/qt/mkspecs/symbian-gcce -o Makefile ~/qt/qt/tests/auto/qdatetime/qdatetime.pro
make sis
~/qt/qt/tools/runonphone/runonphone -p /dev/cu.usbmodemfa44 –sis ~/qt/qt/tests/auto/qdatetime/qdatetime.sis qdatetime.exe

NOTE: Here the /dev/cu.usbmodemfa44 is the device on Mac for me. And for Linux, the device is sth like /dev/ttyUSB1.

Enjoy it!

Build Qt 4.7 with Symbian^3 on Linux and Mac OS X

Similar steps as previous blog.

Here I will only mention the difference between them:

1. Qt 4.7, please wait a while for the merging of 7c499bcfbf7f9c52b3d6523fea8396bd4ab7252e.

git checkout -b 4.7 origin/4.7

2. You could enable the webkit which is inside of 4.7, then the configure line should be like:

~/qt/qt/configure -developer-build -opensource -confirm-license -xplatform symbian-gcce -webkit -fast -silent -nomake examples -nomake demos -nomake tools -nomake tests -qtlibinfix _liang

And for QtWebKit package:

cd ~/build/s3_gcce/src/3rdparty/webkit/WebCore
make sis
copy ~/build/s3_gcce/lib/QtWebKit_liang.sis toyourphone

For the demo browser application:

cd ~/qt/work/demos/embedded/anomaly
make sis
copy anomaly.sis toyourphone

3. Install the above Qt_liang.sis, QtWebKit_liang.sis, analogclock.sis and anomaly.sis, and enjoy them.

Launch it at “QtExamples”->”analogclock”.
Launch it at “QtDemos”->”anomaly”.

Build Qt 4.8 with Symbian^3 on Linux and Mac OS X

Build Qt 4.8 with Symbian^3 on Linux and Mac OS X

Kudos to Kristian Amlie and Thomas Zander for the “make file build system”.

1. OS:

Linux – mine is 2.6.38-8-generic x86_64
Mac OS X – mine is 10.6.8 64bit

2. Symbian^3

NOTE: Looks like Qt is still not the 1st-priority citizen in the Symbian^3 SDKs world, the reason why I say like that is this task, it means that you cannot use any version of Symbian^3 (public) SDKs to build Qt libraries from source. Details in the comment. Then we use the Symbian^3 PDK 3.0.4 for now. I am not sure how long this mirror service will be available there, you’d better backup those files by yourself.

Symbian^3 PDK 3.0.4

Please download binaries_armv5_lib.7z.zip, binaries_armv5_udeb.7z.zip, binaries_armv5_urel.7z.zip, binaries_epoc.7z.zip, binaries_epoc_sdk.7z.zip, binaries_prebuilt.7z.zip, tools_epoc.7z.zip at least.

cd ~
mkdir -p symbian-sdks/pdk304
cd symbian-sdks/pdk304
7z x abovefiles
export EPOCROOT=~/symbian-sdks/pdk304/ //set env for EPOCROOT

The patch for Symbian^3 PDK 3.0.4 is here.

3. Wine

NOTE: The reason for installing wine is we are using the Symbian tools build on Windows, such as rcomp, makesis and many others.

Linux(Debian/Ubuntu): sudo apt-get install wine1.2
Mac OS X: Install wine 1.1.44, and upgrade it to 1.2

Add wine into path
export PATH=/Applications/Wine.app/Contents/Resources/bin:$PATH //for Mac OS X

4. Compilers:

Linux: RVCT 2.2(need commercial license) or GCCE 4.4.1(Symbian ADT Sourcery G++ Lite 4.4-172 for ARM SymbianOS)
Mac OS X: GCCE 4.4.1(Symbian ADT Sourcery G++ Lite 4.4-172 for ARM SymbianOS), after installed to default path, mv /Applications/CodeSourcery/Sourcery G++ Lite/ /Applications/CodeSourcery/Sourcery_G++_Lite. NOTE: need to remove those spaces in the path of compiler

Add compiler path into PATH:
export PATH=/Applications/CodeSourcery/Sourcery_G++_Lite/bin:$PATH

5. Qt 4.8

NOTE: better to use ea7ed6b27301a4834b1bfe0ad4e6e58462647d3e and later.

cd ~
mkdir qt
git clone -n git://gitorious.org/qt/qt.git qt
cd qt
git checkout -b 4.8 origin/4.8

6. Build it

cd ~
mkdir build
cd build
mkdir s3_gcce // this is for the GCCE case, or s3_armcc for RVCT 2.2 case
cd s3_gcce
~/qt/qt/configure -developer-build -opensource -confirm-license -xplatform symbian-gcce -no-webkit -fast -silent -nomake examples -nomake demos -nomake tools -nomake tests -qtlibinfix _liang // this is for GCCE case, or “-xplatform symbian-armcc” for RVCT 2.2 case
make -j8 // maybe fail at somewhere, then just try “cd src;make -j1” finish it
cd src/s60installs
make sis
cd ~/build/s3_gcce/lib
cp Qt_liang.sis toyourphone
cd ~/qt/qt/examples/widgets/analogclock
~/build/s3_gcce/bin/qmake
make sis
copy analogclock.sis toyourphone

7. Install your own build Qt libraries and application

Goto “Office”->”File Manager”, manually install Qt_liang.sis and analogclock.sis

8. Run your appliation

Launch it at “QtExamples”->”analogclock”. Enjoy it!

Known issues or other topics:
1. There is still some issue to build qtwebkit which the one inside of qt 4.8 or from qtwebkit git repo directly. If I got solution, I will let you know.
2. Mabye write something about runonphone on Linux and Mac OS X, it is a very good tool to test qt applications.

第一次把Linux安装到USB移动硬盘上

因为Nokia的Windows系统是在加密的NTFS分区上工作的,并且默认占据整个硬盘,我用ntfsresize无法真确识别该分区。没办法,第一次把Linux安装到USB移动硬盘上。安装过程都很顺利,GRUB安装到了移动硬盘上。

启动的时候,GRUB报错,后来找到原因了。我的笔记本内置SATA硬盘,所以内核启动后会把它识别为sda,而移动硬盘则成了sdb,安装Linux时它会自动写找hd1,实际上在USB硬盘启动过程中(内核启动之前)只识别了它自己,所以改GRUB的设置为hd0就都正常了。

今天还试了试KDE 4.1中的KWin特效,很不错。

体验了一下 openSUSE 的 Build Service

因为看到了别人(swyear)构建的用于 openSUSE 的 wqy 安装包,于是也就体会了一下,hehe。

还是很强大的呀,可以支持 openSUSE 10.3, 10.2、SUSE 10.1、SLE 10, 9、openSUSE Factory、Debian Etch、Fedora 8, 7, 6 with Extras、RHEL 5、CentOS 5、Mandriva 2007, 2006、xUbuntu 7.10, 7.04, 6.06。

openSUSE Build Service
openSUSE Software Search

我的目录,hoho。

Dell Precision 690 & UltraSharp 2407WFP-HC – 2

昨天忘了说了,装这台机器,还遇到了一个 Dell 机器的 bug。就是当我运行 OpenSUSE 10.3 的安装光盘时,在第一个菜单选项处,不可以使用 USB 键盘切换选项,因为默认是进入硬盘启动,所以郁闷了一阵子。

网上搜索了一下,Dell 的一些机型都有同样的问题,需要更新 BIOS。

后来终于有网了,并且使用 KDE 4 Live CD 启动后,上网下载并且更新,还好,Dell 支持在 Linux 下更新,不过在下载的时候也有些问题,我把操作系统换成 Red Hat Linux 选项后,下载文件仍然是 .exe 的。然后就一切 OK 了。

今天把 NVIDIA 的驱动装上了,glxgears 跑得好快呀,1093x FPS。

Dell Precision 690 & UltraSharp 2407WFP-HC

Sun Ultra 25 用起来还是不很顺手,昨天就找头儿要了一个台式机。

今早去拿机器了,好强大的 Dell Precision 690UltraSharp 2407WFP-HC

今天下午刚装了 OpenSUSE 10.3,明天更新一下,再装上 KDE 4.0,当然还有很重要的 NVIDIA 的驱动。可以好好爽一下了,不过单位好像不让看大片,hoho。

openSUSE 10.3 以及 ATI 8.42.3 最新驱动

我的本子是 ThinkPad T60,上次不慎把系统恢复分区搞坏了,从公司要了 Windows XP 的恢复光盘恢复了一下,比较郁闷的是语言是挪威文的。然后一直就是 VMWare Player 跑 openSUSE 10.2,太慢了,没法编译大程序。最近正好 10.3 也出来了,重新搞了一下,用 Knoppix 中的 QtParted 把默认的大 NTFS 分区缩小,然后保证隐藏分区不变的情况下做好分区,安装了 10.3,要点就是不要动 MBR,把 GRUB 装在了 Linux 系统分区上。发现一个有意思的结果,就是 GRUB 可以引导系统的那个恢复分区,并不需要 ThinkVantage 按键了,不知道可以不可以这样把隐藏分区搞到其它机器上。还有一个好消息就是无线网卡也可以工作了,这里是文档

10.3 好像没有 10.2 稳定,时不时崩溃的事情还是有的。当时 ATI 显卡驱动还不支持 10.3,先放下了。

这两天 ATI 发布最新驱动 8.42.3,今天装了一下,可以用了,但是 glxgears 没法跑,看不到帧数了。另外不知道 compiz fusion 怎么搞起来,再等等大家的说明吧。