Qt for symbian环境搭建(Windows)

NOKIA收购Qt和Symbian之后,都以开源形式发布,Qt作为跨平台的SDK,目前已在Linux、Windows、Symbian、Windows CE、Embedded Linux、Mac OSX等平台得到应用,前景可谓一片光明。 而作为智能手机系统的老大,Symbian拥有庞大的用户群,选择它等于抓住了大量的用户。

切入正题,其实Qt for symbian在Windows下的环境搭建很简单。

Qt for the Symbian platform requires the following software installed on your development PC:

  • Carbide.c++ v2.0.0 or higher
    • Note: It may be necessary to update the Carbide compiler. See here for instructions how to check your compiler version and how to patch it, if needed.
  • ActivePerl 5.6.1 build 638 or higher
    • Note: According to Symbian, version 5.6.1 build 638 is mandatory for building Symbian applications, but that version is no longer available from ActiveState. However, Qt for Symbian has been successfully compiled using both 5.8.x and 5.10.x versions.
    • (注意:没有版本限制了。)
  • S60 Platform SDK 3rd Edition FP1 or higher
    • Note: Users of S60 Platform SDK 3rd Edition FP1 also need special update. The update can be found here.
    • (我用的是第五版的SDK,因为我的手机是第五版的系统^_^)
  • Open C/C++ v1.6.0 or higher. Install this to all Symbian SDKs you plan to use Qt with.
  • Building Qt tools from scratch requires MinGW 3.4.5 or higher, or another windows compiler.
    • Note: This is not required if you are using pre-built binary package.
    • (注意:这不是必须的,如果你使用编译好的Qt for Symbian二进制包。)
  • Building Qt libraries requires RVCT version 2.2 (build 686 or later), which is not available free of charge. Usage of later versions of RVCT, including the 3.x and 4.x series, is not supported in this release.
  • (RVCT不是免费的,但是我们还可以选择GCCE编译器,它是开源的。)

Running Qt on real device requires the Open C to be installed on the device. The Open C installation packages are embedded into qt_installer.sis, which is included in Qt for Symbian binary package. If you are building Qt from scratch, you can find the required packages in the Symbian SDK where you installed Open C/C++:

(要在真机上运行开发的程序,你需要安装qt_installer.sis

  • nokia_plugin/openc/s60opencsis/pips_s60_<version>.sis
  • nokia_plugin/openc/s60opencsis/openc_ssl_s60_<version>.sis
  • nokia_plugin/opencpp/s60opencppsis/stdcpp_s60_<version>.sis

If you wish to do hardware debugging with Carbide or run applications in real devices using "make run" command, TRK must be installed to the device. Note: TRK is not required if you just want to install and run applications manually on the device.

(TRK也不是必须的,可以手工使用命令完成该操作。)

  • Application TRK. Choose the correct installation package based on the S60 version of your device (S60_<S60-version>_app_trk_<TRK-version>.sisx).

以上这些软件的安装都是傻瓜式的,唯一注意的是推荐安装他们在同一个逻辑磁盘上,而且以后项目目录也要在该逻辑磁盘。接下来

  1. Setup the development environment

    After you have finished the Symbian development environment setup, it is good to verify that environment is functional for example by compiling one of the pure Symbian examples for both emulator and HW. This can be done from command prompt as follows:

     cd <Your SDK path>/S60CppExamples/Note/group
     bldmake bldfiles
     abld build winscw udeb
     abld build gcce urel(验证Symbian开发环境是否正常工作。)
  2. If all steps pass without errors your Symbian development environment is very likely installed correctly.
  3. Install Qt

    Uncompress the downloaded source package into the directory you want Qt installed, e.g. C:/Qt/4.6.2.

    Note: Qt must be installed on the same drive as the Symbian SDK you are using, and the install path must not contain any spaces.

  4. Environment variables

    In order to build and use Qt, the PATH environment variable needs to be extended:

     PATH               - to locate qmake, moc and other Qt tools

    This is done by adding c:/Qt/4.6.2/bin to the PATH variable.

    On Windows the PATH can be extended by navigating to "Control Panel->System->Advanced->Environment variables".

    In addition, you must configure the environment for use with the Symbian emulator. This is done by locating the Carbide.c++ submenu on the Start menu, and choosing "Configure environment for WINSCW command line".

    If you are planning to use abld (the default build system that comes with the S60 SDK) to build Qt, you will also need to set the following environment variable:

     SYMBIANBUILD_DEPENDENCYOFF=1

    This is not necessary for other applications, only when building Qt.

  5. Configure Qt (5、6步配置编译Qt,二进制安装包则不用,可以在example目录下编译一个例子试试)

    To configure Qt for the Symbian platform, do:

     cd /Qt/4.6.2
     configure -platform win32-g++ -xplatform symbian-abld

    to build the tools using MinGW, and the libraries using abld. or

     cd /Qt/4.6.2
     configure -platform win32-g++ -xplatform symbian-sbsv2

    to build the tools using MinGW, and the libraries using SBSv2.

    SBSv2 (also known as Raptor) is a next-generation Symbian build system. SBSv2 is not officially supported by any of the S60 SDKs currently available from Forum Nokia.

  6. Build Qt

    To build Qt for the emulator, type:

     make debug-winscw

    To build Qt for the device, type:

     make release-armv5

    Congratulations, Qt is now ready to use.

  7. Installing Qt libraries on the device (二进制安装包也不需要这步,直接安装qt_installer.sis就可以了

    To run the demo on a real device, you first have to install the Qt libraries on the device:

     cd src/s60installs
     make sis QT_SIS_OPTIONS=-i QT_SIS_CERTIFICATE=<certificate file> QT_SIS_KEY=<certificate key file>
     cd ../3rdparty/webkit/WebCore
     make sis QT_SIS_OPTIONS=-i QT_SIS_CERTIFICATE=<certificate file> QT_SIS_KEY=<certificate key file>

    The Qt libraries are built with "All -Tcb" capability, so that they can support all types of application. If you don't have a suitable certificate, it is possible to patch the binaries as follows:

    1. Installing Qt without a certificate

      If you have no certificate, build a self signed Qt:

       cd src/s60installs
       patch_capabilities.pl Qt_template.pkg release-armv5
       make sis QT_SIS_OPTIONS=-i
       cd ../3rdparty/webkit/WebCore
       patch_capabilities.pl QtWebkit_template.pkg release-armv5
       make sis QT_SIS_OPTIONS=-i
    2. Installing Qt with a Symbian developer certificate

      If you have a symbian-signed developer certificate, specify the capabilities you can sign for, for example:

       cd src/s60installs
       patch_capabilities.pl Qt_template.pkg release-armv5 "ALL -Tcb -AllFiles -DRM"
       make sis QT_SIS_OPTIONS=-i QT_SIS_CERTIFICATE=<certificate file> QT_SIS_KEY=<certificate key file>
       cd ../3rdparty/webkit/WebCore
       patch_capabilities.pl QtWebKit_template.pkg release-armv5 "ALL -Tcb -AllFiles -DRM"
       make sis QT_SIS_OPTIONS=-i QT_SIS_CERTIFICATE=<certificate file> QT_SIS_KEY=<certificate key file>
  8. Running Qt demos (安装运行demo)

    We've included a subset of the Qt demos in this package for you to try out. An excellent starting point is the "fluidlauncher" demo.

    Similarly, install fluidlauncher to the device:

     cd demos/embedded/fluidlauncher
     make sis QT_SIS_OPTIONS=-i

    This will create a self-signed fluidlauncher.sis and install it to your device.

    To run the demos on the emulator simply navigate to the directory of the demo you want to see and run:

     make run

    For more information about building and running Qt programs on the Symbian platform, see The Symbian platform - Introduction to Qt.

    We hope you will enjoy using Qt.

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值