看来N8还可以再用一阵子了

Nokia N8最早出来的时候是Symbian^3,公司这边发的是北欧版的,不支持中文,想看中文页面只能用Opera

本来最近想换个手机的,正好Belle发布了,今天更新了一下,原来的中文文件名的.mp3文件可以显示了,网页浏览器也可以看中文了,可以查看中文短信啊了。Symbian手机终于也算是个智能机了,有时间再试试中文输入法,不过目前的情况可以再用一阵子了。

2月20日备注:装上QQ的输入法之后,修改一下设置,然后重启机器,可以输入中文了。

国内游戏公司Mac的开发水平都很差么?

原本支持Mac OS X的游戏进入中国,特色了一下就不支持了,不知道国内的游戏公司有什么魔力?

之前以为网易会比九城好一些。

参考链接:
魔兽世界官方论坛:国服什么时候才能有MAC OS的客户端啊?
星际争霸2官方论坛:国服什么时候能出MAC版的客户端啊

2012年2月8日备注:
Blizzard大神亲自解决了这个问题,至少有人确认了15211这个版本可以用Mac客户端登陆国服,希望网易不要让人太失望。

2012年2月13日备注:
Lion 10.7.3中测试了一下,我的WOW国服客户端好像升级没有完全,到Mac下Launcher被升级了,然后用上面链接中的32位客户端可以登录,Launcher中的关于32位/64位的选项是不可选的,手工将32位的改为其它名字,把64位的改成默认的名字可以登录。

More syntax highlight files for Qt Creator

In Qt Creator, you could use the syntax highlight definition files from Kate, more details in Qt Creator Doc: Semantic Highlighting.

Where could we get more?

Here it is: KDE-FILES.org: Kate Highlighting. Just download one, and move it into ~/.config/Nokia/qtcreator/generic-highlighter, restart your Qt Creator, it works.

Want to write your own?

This is a good material to read, Kate: Writing a Syntax Highlighting File.

Building a Sandy Bridge CustoMac: Buyer’s Guide(Norway and China)

The original link: tonymacx86: Building a Sandy Bridge CustoMac: Buyer’s Guide

CustoMac Mini 2011

CPU Intel Core i3-2105 Komplett-1050NOK
Motherboard Gigabyte GA-H67N-USB3-B3 Komplett-839NOK 360Buy-899CNY
RAM CORSAIR 8GB DDR3 Komplett-329NOK 360Buy-299CNY
Case + Power Supply APEX MI-008 Mini-ITX 360Buy-239CNY(金河田 炫豪-2061B)
Total Komplett-2218+NOK 360Buy-1437+CNY

CustoMac Budget Build

CPU Intel Core i3-2105 Komplett-1050NOK
Motherboard Gigabyte GA-Z68MA-D2H-B3 Komplett-949NOK 360Buy-799CNY(GA-Z68M-D2H)
RAM CORSAIR 8GB DDR3 Komplett-329NOK 360Buy-299CNY
Case Cooler Master 341 Komplett-445NOK(Cooler Master Elite 310) 360Buy-179CNY(Cooler Master 342)
Power Supply Corsair 430w Komplett-489NOK 360Buy-359CNY
Total Komplett-3262NOK 360Buy-1636+CNY

CustoMac Pro Builds #1

CPU Intel Core i5-2500K Komplett-1695NOK 360Buy-1599CNY
Motherboard Gigabyte GA-Z68X-UD3H-B3 Komplett-1090NOK 360Buy-1399CNY(GIGABYTE GA-Z68XP-UD3R)
Graphics Card AMD Radeon HD 6850 Komplett-1199NOK 360Buy-899CNY
Case Corsair Carbide Series 400R Komplett-945NOK 360Buy-599CNY
RAM 16GB Corsair 1600Mhz DDR3 Komplett-749NOK 360Buy-778CNY
Power Supply Corsair 650watt Komplett-1046NOK 360Buy-799CNY
Total Komplett-6724NOK 360Buy-6073CNY

CustoMac Pro Builds #2

CPU Intel Core i7-2600K Komplett-2299NOK 360Buy-2359CNY
Motherboard Gigabyte GA-Z68XP-UD3 Komplett-1049NOK 360Buy-1399CNY(GIGABYTE GA-Z68XP-UD3R)
Graphics Card AMD Radeon HD 6870 Komplett-1295NOK 360Buy-1299CNY
mSATA SSD 60GB OCZ Nocti Series SATA 3Gb/s 360Buy-899CNY
Case Corsair Carbide Series 400R Komplett-945NOK 360Buy-599CNY
RAM 16GB Corsair 1600Mhz DDR3 Komplett-749NOK 360Buy-778CNY
Power Supply Corsair 650watt Komplett-1046NOK 360Buy-799CNY
Total Komplett-7383+NOK 360Buy-8132CNY

Operating System

Mac OS X Lion Application Mac App Store(Norway) Mac App Store(China)
Mac OS X Lion USB Thumb Drive Apple.com(Norway) Apple.com(China)

Graphics Cards

NVIDIA GeForce 9400 GT
NVIDIA GeForce 9500 GT
NVIDIA GeForce 9600 GT
NVIDIA GeForce 9800 GT (NO HDMI)
NVIDIA GeForce GT 210 Komplett-279NOK 360Buy-249CNY(GA GV-N210SL-1GI)
NVIDIA GeForce GT 220 360Buy-249CNY(GA GT220 GV-N220OC-1GI)
NVIDIA GeForce GT 240
NVIDIA GeForce GTS 250 (NO HDMI)
NVIDIA GeForce GTX 260
NVIDIA GeForce GTX 275
NVIDIA GeForce GTX 285
NVIDIA GeForce GT 430 Komplett-490NOK 360Buy-419CNY
NVIDIA GeForce GTS 450 Komplett-749NOK 360Buy-599CNY
NVIDIA GeForce GTX 460 360Buy-939CNY
NVIDIA GeForce GTX 470
NVIDIA GeForce GTX 480
NVIDIA Quadro FX 4000 for Mac Komplett-7559NOK
NVIDIA Quadro FX 4800 for Mac Komplett-13549NOK
ATI Radeon HD 5570
ATI Radeon HD 5770 Komplett-1085NOK
ATI Radeon HD 5850 Komplett-1199NOK
ATI Radeon HD 5870
AMD Radeon HD 6670 Komplett-550NOK 360Buy-479CNY
AMD Radeon HD 6850 Komplett-1199NOK 360Buy-899CNY
AMD Radeon HD 6870 Komplett-1295NOK 360Buy-1299CNY

Motherboards

Gigabyte GA-Z68A-D3H-B3 ATX, VGA, DVI, HDMI, USB 3.0 360Buy-999CNY
Gigabyte GA-Z68M-D2H mATX, VGA, DVI, HDMI 360Buy-799CNY
Gigabyte GA-Z68MA-D2H-B3 mATX, VGA, DVI, HDMI, USB 3.0 Komplett-949NOK
Gigabyte GA-Z68MX-UD2H-B3 mATX, VGA, DVI, HDMI, DP, USB 3.0, eSATA Komplett-1149NOK
Gigabyte GA-Z68P-DS3 ATX, HDMI, eSATA 360Buy-849CNY
Gigabyte GA-Z68X-UD3H-B3 ATX,VGA, DVI, HDMI, DP, USB 3.0 Komplett-1090NOK
Gigabyte GA-Z68X-UD7-B3 ATX, No Onboard Video, USB 3.0, eSATA, 2x PCIe x16
Gigabyte GA-Z68XP-UD3 ATX, HDMI, mSATA, USB 3.0, FireWire Komplett-1049NOK 360Buy-1399CNY(GA-Z68XP-UD3R)
Gigabyte GA-Z68XP-UD3-iSSD ATX, HDMI, mSATA + SSD, USB 3.0, FireWire 360Buy-1899CNY
Gigabyte GA-Z68XP-UD4 ATX, HDMI, USB 3.0, eSATA, FireWire Komplett-1390NOK
Gigabyte GA-Z68XP-UD5 ATX, HDMI USB 3.0, eSATA, FireWire Komplett-2090NOK

CPUs

Intel Core i3-2105 3.1Ghz 2 Cores / 4 Threads Komplett-1050NOK
Intel Core i3-2125 3.3Ghz 2 Cores / 4 Threads
Intel Core i5-2405S 2.5Ghz 4 Cores / 4 Threads, Turbo
Intel Core i5-2500K 3.3Ghz 4 Cores / 4 Threads, Turbo Unlocked for Overclocking Komplett-1695NOK 360Buy-1599CNY
Intel Core i7-2600K 3.4Ghz 4 Cores / 8 Threads, Turbo Unlocked for Overclocking Komplett-2299NOK 360Buy-2359CNY
Intel Core i7-2700K 3.5Ghz 4 Cores / 8 Threads, Turbo Unlocked for Overclocking Komplett-2595NOK

Drives

500GB Hitachi Deskstar SATA 3Gb/s 360Buy-659CNY
500GB Seagate Barracuda SATA 6Gb/s 360Buy-589CNY
1TB Seagate Barracuda SATA 6Gb/s Komplett-1399NOK 360Buy-829CNY
60GB Corsair Force Series 3 SATA 6Gb/s Komplett-825NOK 360Buy-799CNY
120GB Corsair Force Series 3 SATA 6Gb/s Komplett-1295NOK 360Buy-1399CNY
240GB Corsair Force Series 3 SATA 6Gb/s Komplett-2695NOK
120GB OCZ Agility 3 SATA 6Gb/s 360Buy-1199CNY
240GB OCZ Agility 3 SATA 6Gb/s 360Buy-3199CNY
8GB USB Flash Drive Komplett-75NOK 360Buy-69CNY
Optical Drive Sony Optiarc Komplett-219NOK 360Buy-138CNY

Accessories

Apple Wired Keyboard Komplett-429NOK 360Buy-378CNY
Apple Wireless Keyboard Komplett-590NOK 360Buy-498CNY
Apple Magic Trackpad Komplett-590NOK 360Buy-498CNY
Apple Magic Mouse Komplett-590NOK 360Buy-498CNY
Jabra A320S USB Bluetooth Adapter 360Buy-199CNY(Jabra A335W)
Mini-PCIe to PCI-e Adapter (For Native Wifi Card) Broadcom Mini-PCIe Card Not Included Taobao-39CNY Atheros AR9280加转接卡套餐-189CNY

Create your own train monitor for Norway!

Jernbaneverket provided this solution for us! The announcement is here, Monitorvisning i nettleseren. The registration form is here, you have option for English in top-right corner.

After registration, you could create your own monitor, please choose a station, Departure or Arrival, and how many rows. After click “Save”, try to “Show” it, then you got the url for this monitor, for example, my “Oslo S-Departure” monitor is http://rtd.jbv.no/rt/display/faf2d9be57ae94ce548ebfd61e26f61a45e487e3.

For Mac users, launch Safari, open the above url, adjust the display windows, then click “File”->”Open in Dashboard”, select the area which you want to show in the Dashboard, then click “Add” button in top-right corner of Safari.

告别MAMP

大学时代,玩过一阵子Apache+PHP+MySQL,一般是在Linux上,也用过一次FreeBSD。

后来自己的服务器也就一直放在Mac上,之前偷懒,就在网上下载了MAMP凑合着用了。

这次升级到Lion,很不幸,MAMP中的Apache不能起来了,我也没有查看日志。网上搜索了一下,Lion中已经自带Apache2和PHP 5.3了,”System Preferences”->”Sharing”->”Web Sharing”就是Apache2的启动选项,配置文件在/etc/apache2/httpd.conf,把下面这行取消注释就可以启用PHP了:

LoadModule php5_module libexec/apache2/libphp5.so

Lion里已经不自带MySQL了,估计是因为Oracle的原因,所以我根据这篇文章安装了MySQL和phpMyAdmin。并且还安装了MySQLStartItem.pkg,这样在”System Preferences”->”MySQL”中就可以控制MySQL了。

之后我就把原来的MySQL数据库覆盖了过来,位置在/usr/local/mysql/data。

之后把WordPress目录复制到相应位置,修改/etc/apache2/extra/httpd-vhosts.conf,为了让WordPress能正常工作,注意添加Directory以及如下一行:

AllowOverride FileInfo Options

对于PHP,还有一项:

sudo cp /etc/php.ini.default /etc/php.ini
sudo vi /etc/php.ini

修改其中一行:

mysql.default_socket = /tmp/mysql.sock

然后就基本都搞定了。

目前还差的就是升级WordPress和WordPress MU 2.x到最新的3.2.1了。

Clang Static Analyzer with Qt

1. OS: Snow Leopard 64bit

2. Qt: 4.8

cd ~/qt
git clone git://gitorious.org/qt/qt.git work
cd work
git checkout -b origin/4.8 4.8
cp -rf mkspecs/unsupported/macx-clang mkspecs/unsupported/macx-checker

Note: a patch for mkspecs/unsupported/macx-checker/qmake.conf: http://pastebin.com/u7mnkhue

3. Clang Static Analyzer: checker-256

cd ~/dev/packages
wget http://clang-analyzer.llvm.org/checker/checker-256.tar.bz2
tar zxvf checker-256.tar.bz2
cd checker-256
rm bin/clang
rm bin/clang++
cd /usr/local/bin
ln -s /Users/liangqi/dev/packages/checker-256/bin/clang-3.0 clang
ln -s /Users/liangqi/dev/packages/checker-256/bin/clang-3.0 clang++

4. Build

cd ~/build
mkdir qt-48-clang
cd qt-48-clang
export PATH=/usr/local/bin:/Users/liangqi/dev/packages/checker-256:$PATH
/Users/liangqi/qt/work/configure -platform unsupported/macx-checker -nokia-developer -no-webkit -no-qt3support -no-declarative -no-xmlpatterns -no-script -no-scripttools -no-phonon -no-multimedia -nomake tools -nomake demos -nomake examples -fast -verbose -no-framework
scan-build make

5. Output

In the end of the output, you will find a command like “scan-build: Run ‘scan-view /var/folders/QB/QBTpJfK+HfqtpmxTOms2nU+++TI/-Tmp-/scan-build-2011-07-20-3′ to examine bug reports.”, do it!

NOTE: the above way doesn’t work with checker-257!

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.