Two Symbian Development Environment primer
Two. Getting Started with the development environment
2.1 Installing the SDK and VC
Based on the phone's screen size and price, Nokia divides the phone into multiple series, and now uses the series 40, 60, series 80 and series 90. The 60 series, which uses Symbian OS 6.1, then makes some changes to the UI based on the features of the phone screen, the modified Symbian called the Nokia 60 series platform. Phone models using the 60 series include: Nokia 6670, Nokia 6630, Nokia 6260, Nokia N-gage qd™, Nokia 7610, Nokia 6620, Nokia 3620, Nokia 36 60, Nokia 6600, Nokia 3600, Nokia 3650, Nokia 7650, Nokia n-gage™ and so on.
Let's take the 60 series as an example to introduce the SDK installation process.
2.1.1 Installing the SDK
The first step is to register with the Nokia forum and download the latest SDK. The latest version of the Series SDK for Symbian OS Nokia Edition SDK available on the Nokia website is v1.2, and the latest version of the Series SDK for Symbian OS is v2.1. Download URL: http://www.forum.nokia.com/main/0, 6566,034-4,00.html
The second step is to download the latest Active Perl Script installer to the http://www.activestate.com website. Download the latest j2re to http://www.java.com/en/download/manual.jsp.
Step three: Installing the SDK, it is recommended to create a separate directory for Symbian development, such as D:/symbian instead of using directories such as C:/Program files.
Fourth step: Install Active Perl and j2re, and install to the default directory.
Fifth step: Check the environment variable settings. Open the System environment variable tab and see if there is any epocroot, if any, manually change it to "/". It should look like this after the change:
epocroot =/(do not add a drive letter such as c:/..../, etc.)
If you install, the path to the Eprocroot is C:/SYMBIAN/8.0A/S60_2ND_FP2_SC/EPOC32
Then Erocroot is set to/symbian/8.0a/s60_2nd_fp2_sc/
Then, in the system PATH, add/epoc32/toolsDirectories and/epoc32/gcc/binThe catalogue is available.
In fact, the Symbian SDK does not have to be installed at all, copy the EPOC32 directory to a machine directly, and then set the directory and environment variables as described above.
2.1.2 Configuring the VC
If we are using VC 6.0, we must ensure that the system has at least SP3 patch, or the system will have a warning prompt. If we are using VS. NET2003, we can only install the Series SDK for Symbian OS v2.1 because the Series SDK for Symbian OS Nokia Edition SDK v1.2 in VS. NET2003 cannot set up the project correctly.
If you want to create a new project directly in VC6, take the AVKONAPPWIZ.AWX and Avkonappwiz under the/symbian/6.1/series60/series60tools/application Wizard directory. HLP files are copied to the template directory of VC6 c:/program Files/microsoft Visual studio/common/msdev98/template. This allows us to see the Series AppWizard v 1.9 option in the VC's new project.
After you fill in the Project Name, confirm.
"Next", one of the simplest Symbian apps was built.
If you want to import an already established project into VC6.0, for example, we convert the example HelloWorld in the SDK into a VC6 project, we first enter the/symbian/6.1/series60/series60ex/helloworld directory. Here we can see that in Symbian, a project is usually organized by Inc, SRC, group and so on, and the group directory usually has project files, so this is the first time to compile. Use the command prompt mode to enter the directory that you just said, and then execute:
Bldmake Bldfiles
This command generates a Abld.bat batch file under the group directory and is generated under/symbian/6.1/series60/epoc32/build/symbian/6.1/series60/epoc32/build/ Symbian/6.1/series60/series60ex/helloworld/group this directory and generate a bunch of. make files in the bottom-level directory.
We then run the abld.bat that we just generated in the same directory:
Abld Makefile VC6 (This step can not, he is the VC under the generation of some engineering files, good for you to open under the VC)
This will automatically generate the VC6 DSW file, located in the/symbian/6.1/series60/epoc32/build/symbian/6.1/series60/series60ex/helloworld/group/ Helloworld/wins. Then we can open this Symbian project in the VC6 species.
2.2 Compiling
We can compile Symbian projects directly using the tools provided by the SDK, or use the integrated environment provided by VC6 to compile the converted Symbian project. The results of the compilation are stored in the/symbian/6.1/series60/epoc32/release/wins/udeb/z/system/apps directory.
2.2.1 Using the tools provided by the SDK to compile Symbian projects
We continue to enter that position in the previous section:
Abld Build wins Udeb
This command compiles our program and finally generates our HelloWorld in the/symbian/6.1/series60/epoc32/release/wins/udeb directory, and then we can run the debug version of the emulator from the Start menu. In the simulation, you can run HelloWorld.
2.2.2 using VC6 to compile Symbian projects
We directly open the DSW file generated after running Abld makefile VC6, VC automatically load the converted project. Press F7 to compile the project directly, and the compilation results are also placed in the/symbian/6.1/series60/epoc32/release/wins/udeb directory. Then we open the Simulator debug version and we can see the project we've compiled.
2.3 Packaging
We use the HelloWorld provided in SDK 1.2 as an example to make a device that can be installed on your phone. SIS file:
2.3.1. Check the program
First, in the command-line format, enter the directory where the HelloWorld project MMP file is located, enter Bldmake Bldfiles and abld build wins Udeb, and then open the emulator to detect errors in the program.
2.3.2. Compiling the project
After the program has no errors, enter ABLD build Armi urel on the command line. After executing this command, the HELLOWORLD is generated in the directory D:/symbian/6.1/series60/epoc32/release/armi/urel. Apps and HELLOWORLD. RSC two files.
2.3.3. Create a. pkg file
Create or modify the pkg file of the project in D:/symbian/6.1/series60/series60ex/helloworld/sis with Notepad, as follows:
; Helloworld.pkg
;
; Language-standard Language Definitions
&en
; Standard SIS file Header
#{"HelloWorld"}, (0x10005b91), 1,0,0
; Supports Series v 1.2
(0x101f8202), 0, 0, 0, {"Series60productid"}
;
"D:/symbian/6.1/series60/epoc32/release/armi/urel/helloworld.app"-"!:/ System/apps/helloworld/helloworld.app "
"D:/SYMBIAN/6.1/SERIES60/EPOC32/RELEASE/ARMI/UREL/HELLOWORLD.RSC"-"!:/ SYSTEM/APPS/HELLOWORLD/HELLOWORLD.RSC "
Where the front "D:/SYMBIAN/6.1/SERIES60/EPOC32/RELEASE/ARMI/UREL/HELLOWORLD.RSC" is the file to be packaged and installed, "!:/ SYSTEM/APPS/HELLOWORLD/HELLOWORLD.RSC "is the target location for the installation. It is important to note that we are using "in the target location". "Instead of the actual drive letter. The advantage is that when the user installs, the phone system will prompt the user to choose the location to install, which gives the user greater flexibility. In addition, the default location for installed applications in Symbian systems is "!:/ System/apps ".
After editing the pkg file, save it to the appropriate directory.
2.3.4. Packaging program
On the command line, go to the directory where the pkg file is located and run the command makesis helloworld.pkg. We then got the packaged. sis file in the same directory.
2.4 Mobile phone Test
Upload the packaged. sis file to your phone, and in the app manager of your phone, you'll see our packaged files. Select the "Install" command, the system will prompt the user to install the location, select the installation location, we made the application installed on the phone.
We go back to the main menu of the phone and we will find the newly installed HelloWorld application. Open runs, and the results are basically the same as you see in the emulator.
Note: SDK1.2 The following versions are required Epocroot
SDK above with DEVICES settings
The
is passed to the application on the target hardware in the form of Symbian installation system (. sis) files. The. sis file is a compressed archive file that contains all the files required for installation, and also includes options information for the installation process. The Symbian installation system provides a simple and consistent user interface for installing applications, data, or configuration information on Symbian-based devices. The components installed by the developer (or end-user) are included in the. sis file.
We can use the interactive tool Sisar provided by the Series SDK to perform the generation of. sis files. To make it easy to install applications on the target hardware, Sisar packages all the application files into a single. sis file. The
Authoring installation (. sis) file all the required information is provided in the sample project HelloWorld-they are located under/install folder. In the example project we used a dedicated installation package source file (helloworld.pkg) and a tool provided by Symbian