Repost a good article: full access to the QT for s60 Development Environment

Source: Internet
Author: User
Tags install perl

All rights reserved by the site and the original author are reserved for all posts on the site. This copyright information, original links, and original author can only be reprinted. Do not delete or modify the original content for commercial purposes. Thank you for your cooperation.

Http://www.cuteqt.com/blog? P = 295

Pen
Recently relatively hardworking, spent a day to install and test the qt-s60 environment, found very interesting, Here memo.
I have heard that noxia has started to use the QT Development Program internally, so you should take it easy. If you have mastered this technology,
Maybe you will be able to have a half-Office in the home of novogene ...... You don't have to worry about it for the rest of your life ~

There have been some existing articles on the installation and configuration of QT for s60 on the Internet. The QT document also contains some content, but I feel that it is still relatively fragmented and not systematic, on the one hand, language problems, on the other hand, it is too hard to find out. This article is a collection of achievements, haha (blow one )~ Add a picture to prove that bragging is just a sideline ......

The software packages used in the development process and their main functions

Windows Environment

A Windows-equipped machine is required, and a virtual machine is also required. However, it requires a memory allocation of 1 GB or more, which is too small. I use a virtual machine to install Windows XP with 1 GB memory. Disk C ensures the remaining space above 5 GB (not enough ).

Novogene mobile phone 1

The s60 System in the mobile phone is 3.1 or later. This article is based on Nokia N95 8 GB.

Nokia PC Suite

This is a tool for connecting windows and Nokia mobile phones, which will be used when you install your own programs on your mobile phone. Download from the Nokia website:
Http://nds1.nokia.com/files/support/global/phones/software/Nokia_PC_Suite_7_1_26_1_chi_ SC _web.exe

Qt for s60

Download In http://pepper.troll.no/s60prereleases/

This package is of course essential. The latest version is named "Garden". How poetic it is! Trolltech really has art cells.

Perl and JRE

These two tools are required to run the s60 SDK. It should be noted that Perl must be 5.6.1, And neither high nor low. Download

Http://downloads.activestate.com/ActivePerl/Windows/5.6/ActivePerl-5.6.1.638-MSWin32-x86.msi

Just download the latest version of JRE to Sun's website:

Https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start? Productref = jre-6u14-oth-JPR @ CDS-CDS_Developer

Carbide C ++ 2.0

Tools are required, and earlier versions are not supported. Download:

Http://www.forum.nokia.com/Tools_Docs_and_Code/Tools/IDEs/Carbide.c++/

You need to register an account and log on to download it.

S60 SDK 3rd edition FP1


Must be 3rd FP1 or later. I also found 3rd fp2 on the Forum Nokia website, but it is not as good as this version. We recommend that you download this version. Download it:
Http://sw.nokia.com/id/577ad48d-290c-4bb5-8bdf-779ea8a5bc6c/S60_5th_Edition_SDK_v1_0_en.zip

You need to register and log on. This package has more than three hundred MB, which takes a long time to download. It takes up to 3 GB of space after installation, but it is an absolute big part.

In addition, if you are using Nokia n97, You need to download the SDK of the corresponding n97 version. For Nokia 5800 xpressmusic, you need to use the SDK of 5th edition. Other configuration methods are basically the same as described in this article.

Open C/C ++ plug-in

S60 SDK 3.1 requires the installation of this package. A higher version already includes this tool and does not need to be downloaded and installed separately. Download:

Http://www.forum.nokia.com/main/resources/technologies/openc_cpp/

Registration and login required

Installation and configuration steps

1. Install Perl and JRE first, and select the path as needed. The corresponding environment variables are automatically set.
2. Install carbide C ++ 2.0, s60 SDK 3rd edition FP1, and open C ++ in the default path. When installing the SDK, you will be prompted to install the gcce compiler. This is the toolchain used to compile the program on the mobile phone.
3, The QT for s60 package decompress to C:/, take a simple directory name, for example, called qt-s60.
4. Update rpipe. Go to C:/Symbian/9.2/s60_3rd_fp1/, and decompress the rpipe_3.1.zip file in this directory to the current location.
5,
Update the pre-compiled QT s60 library, which is required for cross-compilation.
Change C:/qt-s60/qts60binaries/3.x/ qtlibs-4.5.0-garden.exe
Copy to C:/Symbian/9.2/s60_3rd_fp1/and run the command. This package contains the binary files compiled by QT for the s60 arm system,
The link is required during cross-compilation.
6. Choose Programs> carbide. c ++ V2.0-> Configure from the menu.
Environment for winscw command line, run this command. This command configures the environment variables required for compiling s60 programs of X86 version,
In this way, you can use these environments in common Windows command lines.

Compile the QT for s60 Simulator version

The s60 SDK provides a desktop s60 environment simulator. To compile QT into a corresponding version, we can run and debug the QT program on the simulator.
First, "Start"-> "run"-> "cmd" to open a Windows Command Line terminal,
C:/qt-s60
Set Path = C:/qt-s60/bin; % PATH % // note the difference between the command format and Linux environment, and do not add spaces.
Configure-platform win32-mwc-xplatform Symbian-abld // This step will generate the qmake tool and makefile under each directory, which takes a long time

Make debug-winscw // compile command, which takes a long time to compile and requires a high memory. This is my practical experience. At first, I allocated MB of memory to my virtual machine. This step is always wrong, in addition, it was a very scary internal error of XX tool. Later, the memory increased to 1 GB, so there was no problem.

If the above commands can be run successfully, the QT Simulator version will be compiled. Next we will look for a small QT program to test whether the environment is correctly configured.

Run the test program

With
You can select a QT program or write it yourself. The author uses the example provided by QT to test the program. Note that this program and the s60s SDK environment must be placed in the same drive letter,
In our environment, the C disk must be placed. Because the drive letter is not provided before the s60 environment searches for files,
If it is placed in another partition, the file in Symbian cannot be found.

Go to examples/painting/basicdrawing in the qt-s60 directory and run the following command:
Make debug-winscw // compile
Make run // run in the simulator

In this case, the Windows Firewall interface is displayed, and "unblock" is selected. The s60 Simulator Interface is displayed, and an open C ++ interface similar to a license is displayed, you must close this interface to run the program. Well, you should be able to see how the program runs in the simulator.

Compile and publish mobile apps

Connect your mobile phone to your PC Suite.

Install the basic library of QT

Find
To QT pre-compiled package, in C:/qt-s60/qts60binaries/5.0/qt_libs_armv5_udeb.sisx, double-click this file PC
The suite will be automatically installed. This package only needs to be installed once unless you upgrade the QT version. NOTE: If your mobile phone has multiple memories like the author,
Please choose to install it on your mobile phone (instead of on the memory card). The reason is not clear, but it cannot run without being installed on your mobile phone.

Install the pips package

If your mobile phone does not contain this software, you need to install it. From http://pepper.troll.no/s60prereleases/patches/pips_nokia_1_3_SS.sis
Download and double-click to install. This package only needs to be installed once.

Compile and install the example Program

Take the basicdrawing program as an example.
Enter the program directory and run the following command:
Make debug-gcce // compile
Createpackage
-I basicdrawing_gcce_udeb.pkg // The author has an error in this step. I don't know why, alas;
Later, the rvct compiler was used successfully.
Let's try to see if gcce is successful? Leave a message for me. (Later I switched to the environment of another machine, and this step was successful. It turns out that this free toolchain is also usable.
. As for the author's environment, further research is required in addition to the problem .)

If the commercial version of The rvct compiler is used, the compilation and Packaging Commands here are slightly different and should be:

Make debug-armv5
Createpackage-I basicdrawing_armv5-udeb.pkg

The installation interface is automatically displayed on the PC Suite, and the installation interface is displayed on the mobile phone end, which is the same as installing the QT library.

The examples in QT examples are installed in the "qtexamples" folder at the same level as the "application" in the mobile phone menu by default. If it is a program you write, it will be installed in the "application" folder. do not find the program ~

Now, let's take a look at the effect of the QT program on the mobile phone. The display is no different from the simulator, but I found that the QT program does not seem to be able to handle the keyboard well, and the upper and lower keys are not good, which is really depressing for keyboard-operated mobile phones. Continue to study this issue.

In general, although there are many steps to configure the QT for s60 environment, it is still a silly process to do it step by step. The only problem is that if everything goes well, it will be troublesome if any step is wrong. Basically, any problems will become irreconcilable contradictions, this is so unpleasant.

All posts on this site are reserved by this site and the original author. This article can only be reproduced if the copyright information, original article links, and original article authors are retained. Do not delete or modify the original article content for reprinting, it is not intended for commercial purposes. Thank you for your cooperation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.