Symbian development

xiaoxiao2021-03-06  38

(This article is published in "9CBS Community Electronic Magazine - Mobile Development Magazine" Summary: Symbian OS is the current market share of mobile device OS. This article is an entry article developed by Symbian. From zero, some things that need to be learned by Symbian development first, and introduce some good development resources. Read this article almost no related basics.

1. Introduction to Symbian

1.1 Symbian origin

Symbian was established in June 1998, a separate private company with Ericsson, Matshita (Panasonic), Motorola, Nokia, Psion, Siemens and Sony Ericsson. Symbian has a rich experience in mobile computing devices and mobile phone software technology development. It is a software license authorization company held by major wireless communication technology companies, providing advanced, open-ended mobile phones to support data packet transmission. , Standardized operating system - Symbian OSTM.

1.2 Symbian development and status quo

You can see the history of Symbian's development history.

At present, there are four mainstream mobile phone operating systems in the world:

Symbian OS

Windows

MOBILE

Palm OS

Linux OS

Symbian OS has a single show, the market share has reached 70%, while Microsoft's Windows Mobile and other operating systems have a total of 30% share.

Up to now, the mobile phones that use Symbian OS are:

NOKIA 7610, SIEMENS SX1, etc. You can find a full list here. There is also a list of Symbian OS-based mobile phones that are developing.

In addition, you can find Symbian's partner list here.

1.3 more information

It is necessary to understand the Symbian system as a whole, the most authoritative and accurate description, is the official documentation of Symbian. See "Symbian introduction". Thanks to the results of "Chinese Symbian", this is a Chinese document.

2. Symbian development

2.1 Symbian SDK Introduction

The first step in developing an application for the Symbian OS is to get an SDK. Symbian OS SDKS supports development based on Java and C . These SDK provide:

1. Easy to build and develop a set of binaries and tools for the Symbian OS application. 2, system documentation for all APIs and tools. 3. Symbian OS mobile simulator based on PC. 4, a sample application with support documents.

Since the Symbian OS itself does not include a user interface, the Symbian OS is usually provided by some partner vendors to provide specific UI Platform. Therefore, SDKs is built based on a specific UI Platform. A UI Platform provides a unique UI, and a series of related system applications facing various tasks. These common tasks include: sending and receiving messages, browsing, telephone functions, multimedia functions, and contact information / calendar management, and more. These applications usually use some application engines provided by the Symbian OS.

Starting from Symbian OS V6.0, there are all kinds of SDKs:

UIQ

Nokia Series 90

Nokia Series 80 (Previously "9200 Communicator Series)

Nokia Series 60

Nokia Series 40

The previous SDK is a special device, such as the Pison NetPad. Symbian no longer supports these legacy SDK.

For a software developer, when you develop an application for a specific mobile phone, you first need to understand the UI Platform with it. Then you need to understand the version of the Symbian OS used by this phone. With these two information, you can decide that you need that SDK. In most cases, relying on this SDK, you can develop a single version of the application, and then can run on all mobile phones based on the same UI Platform and Symbian OS.

For a variety of differences that may have occurred between mobile phones based on the same SDK, the Symbian OS system defines a further detail information. You can check it yourself.

Symbian OS System Definition

Symbian OS System Definition - Detailed to include v8.0)

We can see that SDK is mainly divided into two categories, namely Nokia Series series and UIQ. The Series series is also most popular with the Series 60 platform. It should be noted that the above is only divided from the development platform, and the particle size is very thick. Each platform will correspond to a series of specific development tools, you need to make a choice according to your own situation.

This article will be based on "Series 60 2nd Edition SDK for Symbian OS Supporting Feature Pack 2 Supporting Microsoft Visual C and Borland C Builderx", through a simple C sample program, let you know the development process. You can download this SDK here. From this long of this long horror, we can learn that this SDK supports the developer under the IDE of VC or BCB. This article will first explain how to build our first program through the command line, and then briefly introduce the development of combined with VC . Net 2003 IDE. Also, before installing the SDK, you need to install Java Runtime Environment V 1.4.1_02 and ActivePerl 5.6.1. The former, I recommend everyone to install JDK directly, not just install JRE, these can be obtained at http://www.sun.com. The latter can go to http://www.activestate.com.

This article will not be introduced for Java development. If you are interested, you can refer to the recommended resources later in this article.

2.2 Construction of the development environment

Ø Install VC . Net 2003. It should be pointed out that we need a VC compiler to compile the code, but its IDE is optional. We can also compile our code from the command line.

Ø Install JDK or JRE

Ø Install ActivePerl

Ø Install SERIES 60 SDK 2nd

Ø Set the environment variable. This is probably one of the most headaches of novices. Online answers to this question, can also be described as five hundred. So the best way is to refer to the opinions of others, and then practice. The following is based on my practice. There are different opinions, welcome to discuss.

First of all, I want to say that this step is excessive, it is not required. You don't even need to strictly install a variety of tools in the order listed above. But I still hope that you can read this paramour, huh, huh.

Then I want to say, use the "Command Tips" tool of the VC . Net tape to make the following experiments. Instead of using the "Command Tips" tool in the Windows "Accessories" menu.

The reason is as follows: The key to the problem here is that all tools can be seen on the command line, so we can use them to compile our code. The "Command Tips" tool of the VC . Net tape is different from the "command prompt" tool in the Windows "Attachment" menu is the value of its PATH variable. The former's PATH variable includes: 1, installing the VC . Net, some paths added, including the main compilation links and other tools.

2 The path will also be added here).

The latter's PATH variable only includes contents of 2.

So, if you don't use the "Command Tips" tool with VC . You will not continue because you can't find the corresponding compilation tool. If you are all diligent, you can manually add 1 in the system PATH, huh, huh. This will use the "command prompt" tool in the Windows "Accessory" menu.

Let's introduce the experimental environment on my machine:

Ø vs.net 2003 (a large pile of specific path, omitted)

Ø Perl 5.8.6 (d: / perl / bin)

Ø JDK 1.5 (D: / Program files / java / jdk1.5.0_01 / bin)

Ø Series 60 SDK 2nd (D: / Symbian)

2.3 SERIES 60 platform introduction

The Series 60 platform is based on the Symbian OS technology, including user interfaces, various applications, and various development tools. Series 60's User Interface (UI) is designed for the purpose of convenient one hand.

From the user's perspective, the most important feature may be its UI. Its UI includes a large screen color display (176 x 208 Pixel, 256 color display) and various input buttons (two soft keys, five navigation keys Five-Way Navigation, Receipt / Block, etc., see Figure 1) . The Series 60 platform includes some commonly used applications, such as personal information management (PIM) programs, such as phone books, calendars, albums, etc.), email programs, browsing programs, messaging procedures, etc. The Series 60 platform also has a installation engine that can be installed or deleted by its users, which can be done through the PC connection through the Air (OTA) service.

Figure 1 Series 60 Platform Ui

2.4 Starting from "Hello World"

Starting from K & R, "Hello World" has become a must-have course. Oh, we are also natural.

Let's first pass the whole process again, and then explain what happened every step. The various paths involved in the following are based on the author's experimental environment, and you need to replace the path on your own machine.

2.4.1 Compiling from the command line

1. Open the command line comes with the vs.net 2003, enter the following directory:

D: /ssymbian/8.0a/s60_2nd_fp2/examples/basics/helloworld

Here is three files we are about to involve:

HelloWorld.cpp C source file

HelloWorld.MMP project definition file

BLD.INF component definition file 2, build our example, please enter:

BLDMAKE BLDFILES

This step will generate a file abld.bat.

3, compile and link, please enter:

Abld build Wins UDEB

This step will generate files for the Series 60 debugging simulator.

4, run, please enter the command line:

D: /symbian/8.0A/s60_2nd_fp2/epoc32/Release/Wins/udeb

This directory contains the HelloWorld.exe file that is just generated. Then enter:

HelloWorld

This calls the SERIES 60 emulator and runs the HelloWorld.exe program in it. The effect is shown in Figure 2

2.4.2 Team with VS IDE

1. Repeat steps 1 and 2 of Section 2.4.1.

2, please enter the following command:

Abld makefile vc7

This will be in the directory:

D: /ssymbian/8.0A/S60_2nd_fp2/epoc32/build/symbian/8.0A/S60_2nd_fp2/examples/basics/wins/helloworld/wins

The solution file, project file, etc. needed to generate VS.NET 2003 below.

Another way is to enter the following command:

Makmake HelloWorld VC7

This also generates the solution files, project files, etc. needed by VS.NET 2003, but it is only in the current directory.

3. With the file generated by the above process, you can open the HelloWorld project in the IDE of VS.NET 2003. The project can then be processed in accordance with the construction, run, and debug other items. For example: Enter helloworld.sln, then generate with Ctrl Shift B, then run (not debug) with Ctrl F5 (not debug), the effect is the same as Figure 2. You will notice that the simulator appears very quickly. It is because the project is a simple console program that can be run without loading a variety of GUI libraries.

What happened 2.4.3?

The above is just a step in the class, how to build a simple program, the reason why there is no detail, to make you quickly experience the development process (excluding debugging, generating the final release, loading the actual target device operation) . Let's take a specific introduction to the Symbian OS build process.

Currently, the two main tool chains that build the Symbian program are:

Toolchain Based on the Metowerks CodeWarrior compiler.

Toolchain Based on the Microsoft Visual C compiler.

You can use your own will or need to use the right tool and make it easy to develop accordingly. However, in general, it is not possible to mix them.

Symbian projects typically be described in a general format due to the Symbian program's constructing tools and the diversity of the final goal. The corresponding build tool chain can then be used to process this neutral project file to generate a specific project file.

Just start, only HelloWorld.cpp, HelloWorld.MMP, BLD.inf three files. Among them, helloworld.mmp and bld.inf are two key project files.

HelloWorld.MMP: The project definition file describes the item information that will be built, and some resource files and application information files are also defined. It is an environmentally unique file that can use various tools to process and generate a Make file of various target environments. You can use the text editor to view the file. The information in it still makes simple, including building a goal, building type, source path, library file, header file, etc. BLD.INF: Component Description File, which lists all items included in a component, as well as some additional build instructions. You can also use the text editor to view the file. For this example, only one project helloworld.mmp is included.

2.4.3.1 The role of bldmake command

When we run

BLDMAKE BLDFILES

When this command, the BLD.INF file in the current directory will handle the following processing process specifically:

1, generate a directory

D: /symbian/8.0A/s60_2nd_fp2/epoc32/build/symbian/8.0A/S60_2nd_fp2/examples/basics/helloworld

2. In this directory, generate a series of Make files for a variety of target environments. For example, vc7.make, cw_ide.make, and more.

3. Generate an abld.bat file in the current directory, which will be used later. You can view the contents of the file. But it is recommended not to change its content manually.

The BLDMAKE command also supports other command line options, you can enter BLDMake directly to view a brief introduction, you can also view the SDK document to learn more.

2.4.3.2 The role of abld command

The abld.bat file obtained by BLDMAKE handles the bld.inf file so that the abld command is available. Abld.bat controls all aspects of building a project. The syntax of the abld command is very flexible. It has many command line options that cover various build requirements. The most commonly used combination is related to Abld Build and Abld Clean.

When we run

Abld build Wins UDEB

When this command, a Debug version will be generated for the WINS platform (ie, the usual VC environment).

Specifically, in

D: /ssymbian/8.0A/S60_2nd_fp2/epoc32/build/symbian/8.0A/S60_2nd_fp2/examples/basics/helloWorld/helloworld/wins/udeb

with

D: /symbian/8.0A/s60_2nd_fp2/epoc32/Release/Wins/udeb

Some files are produced below, such as the HelloWorld.exe file.

If you just call

Abld build

Then build programs for all possible platforms.

Run

Abld clean

All intermediate files and executables generated during the compilation process, and library files imported by the linker are deleted.

You can also specify that only a platform file is deleted.

For details, please check the SDK documentation.

2.4.3.3 Makmake Commands

In short, it is to deal with the MAKE file of various target platforms. It can be generated for the command line, or it can be generated for the IDE. Makefile used for command lines cannot be used for IDE.

So our command:

Makmake HelloWorld VC7

The associated makefile is generated for VS.NET 2003 IDE, and then we can use these files with the powerful features of VS.

For more MAKMAKE grammar, please check the SDK documentation.

3 Develop resource incomplete index

Symbian OS official website does not have to say more, this is the most authoritative source of Symbian related information. Nokia Forum is the most active mobile development technology community. Especially the resources about the NOKIA Series series are very rich. Moreover, there is now the Nokia Forum Simplified Chinese version This greatly facilitates domestic developers to learn related technologies. In addition to various Symbian SDK, SDKS, in addition to various Symbian SDK, many useful tools and SDK plugins for developers. An effective way to improve your level based on Symbian OS is to learn or join an excellent open source project. Symbian OS-based SERIES 60 platform is currently the industry-leading smartphone platform for Symbian OS sites based on SERIES 60 Series. UIQ's official website UIQ Technology AB was established in 1999, it is a subsidiary of all Symbian companies. They developed the UI Platform - UIQ of mobile devices and authorized to those worldwide mobile device manufacturers. 4 small knot

As mentioned in this article, this is an article entry. To this end, the article abandoned a lot. The author believes that those content are more suitable for articles in other topics. Oh, I hope this article can bring you some gains to help you take a quick train developed on Symbian.

Welcome to correct, welcome to discuss!

Figure 2 Hello World Running Render

转载请注明原文地址:https://www.9cbs.com/read-61032.html

New Post(0)