How to embed an Info.plist into arbitrary binaries

For an application on OS X, the Info.plist file is very common. But could we embed it into the binaries? Yes, we can. There is a compiler option “–sectcreate __TEXT __info_plist Info.plist”. One example is the .pro file for qmlplugindump in qtdeclrative, change 4d173d5f16c103f640d4089feed44a74b14e9004.

I learned it from ariya‘s commit in phantomjs: 71425850f61ad85e33741ed5a59364327532f6a8.

[…]

How to debug into Qt library in Qt Creator with CDB

OS: Windows 7 64bit SP1 (Note: need to have .Net 4 installed) SDK: Windows SDK 7.1 x86_64 (Note: remember to have “Visual C++ Compilers” and “Debugging Tools for Windows” installed) Qt Creator: Qt Creator 2.6.2 in qt-windows-opensource-5.0.1-msvc2010_32-x86-offline-2013-01-30-426.exe (Note: I am testing 5.0.1 daily build packages, 5.0.0 release doesn’t ship with .pdb files) Qt Creator 2.6.2 […]

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 […]

原来挪威在计算机历史上还是很强的

在挪威工作前后,知道这里有原Fast Search,现Microsoft的一个子公司、Opera和原Trolltech,现Qt, Nokia。加上瑞典的MySQL,被Sun, Oracle依次收购。只是觉得北欧在计算机领域还是有一席之地的。 最近在看Cocoa Programming Developer’s Handbook,提到了Simula对C++影响很大,才知道Simula竟然是挪威制造。

体会了一下Snow Leopard的一个开发bug

终于在公司搞到了一台旧的iMac 5.1, Intel Core 2 Duo 2.0 GHz/ 2G DDR2 667 MHz。 装上了Snow Leopard和官方发布的Qt 4.7.0 Beta 2和Qt Creator 2.1快照版,想debug进Qt库,竟然不成,咨询了公司内外的Mac开发朋友,原来我遇到了Apple的bug。 DYLD_IMAGE_SUFFIX=_debug makes application crash on Mac OS X – Snow Leopard DYLD_IMAGE_SUFFIX causing havoc on Mac OS X Snow Leopard 而且变态的Apple自己的bug tracker还是封闭的,只有号码,看不到具体情况。 最后的解决办法是: cd /usr/lib sudo mv libSystem.B_debug.dylib libSystem.B_debug.dylib.bak sudo mv libmx.A_debug.dylib libmx.A_debug.dylib.bak 之前还以为/Developers/SDKs/MacOSX10.6.sdk/usr/lib的有效呢。 BTW,学习了OS X下的ldd就是otool。 […]

How to support your own type in QVariant

Reference: Qt 4.6 Documentation: Q_DECLARE_METATYPE

Build Qt with S60 5.0 Public SDK

Build Qt with S60 5.0 Public SDK Platform: Windows XP with SP3(now we only support Qt/S60 on it.) 1. SYMBIAN Development Environment For downloading the packages, you need to register an account in the forum of Nokia, http://www.forum.nokia.com/main/registration/registration.html 1-1. Carbide.C++ http://www.forum.nokia.com/Tools_Docs_and_Code/Tools/IDEs/Carbide.c++/ http://sw.nokia.com/id/7710eba7-4da7-4ddc-a52a-53b506cadb4a/Carbide_cpp_v2_0_en.exe Carbide.C++ 2.0 Carbide_cpp_v2_0_en.exe 203MB 1-2. S60 Platform SDKs for Symbian OS, for C++ […]