Symbian command line Compilation Program

Source: Internet
Author: User
Tags perl script

Article 1: // ============================== //

 

1.1 install SDK
Step 1: register at the Nokia forum and download the latest SDK. The latest version of Series 60 SDK for Symbian OS Nokia edition SDK provided by Nokia is v1.2, and the latest version of Series 60 SDK for Symbian OS is V2.1. Download URL: http://www.forum.nokia.com/main/0,6566,034-4,00.html

Note:Series 60 SDK v1.2 has a bug, and the simulator cannot be used normally. For the solution, see the end of this article.

Step 2, download the latest active Perl script installer from the http://www.activestate.com website. Download the latest j2re from the http://www.java.com/en/download/manual.jsp.

Step 3: Install the SDK,We recommend that you create a separate directory for Symbian development, for example, D:/Symbian instead of C:/program files.

Step 4: install Active Perl and j2re in the default directory.

Step 5: (1.2 do not configure environment variables) Check environment variable settings. Open the system environment variable tab and check whether there is epocroot. If so, manually change it to "/". The change should look like this:

Epocroot =/Symbian/7.0 S/series60_v21_c/

Then, add

/Epoc32/GCC/bin

And D:/Symbian/7.0 S/series60_v21_c/epoc32/tools (Note: after creating a project for/epoc32/tools, the VC will prompt that the specified project cannot be added to the project.)

In fact, the Symbian SDK does not need to be installed at all. You can directly copy the epoc32 directory to a machine and set the Directory and environment variables as described above.

1.2 configure VC (Note that the project must be created under the root directory of the SDK partition.)
If we use VC 6.0, we must ensure that the system has installed at least the SP3 patch. Otherwise, the system will receive a warning. If we use. net2003, we can only install Series 60 SDK for Symbian OS V2.1, because Series 60 SDK for Symbian OS Nokia edition SDK v1.2 is in. net2003 cannot correctly build the project.

If you want to create a new project directly in vc6, you need to add avkonappwiz under the/Symbian/6.1/series60/series60tools/Application Wizard directory. awx and avkonappwiz. copy the HLP file to the template directory c:/program files/Microsoft Visual Studio/common/msdev98/template of vc6. In this way, we can see the Series 60 Appwizard v 1.9 option in the VC new project.

Enter the project name and click OK.

All the way to "Next", a simple Symbian application is built.

If you want to import a created Project to vc6.0, You can compile it directly. Otherwise, enter the group directory of the project in command prompt mode and execute:

Bldmake bldfiles

This command will generate an abld in the group directory. bat batch files, the directory/Symbian/6.1/series60/epoc32/build/Symbian/6.1/series60/epoc32/build/Symbian/6.1/series60/series60ex/helloworld/group will be generated under/Symbian/series60/epoc32, and generate a heap under the underlying directory. make file.

Then, run the generated abld. bat in the same directory:

Abld makefile vc6

The DSW file of vc6 is automatically generated at/Symbian/6.1/series60/epoc32/build/Symbian/6.1/series60/series60ex/helloworld/group/helloworld/wins. Then we can open the Symbian project in vc6.

2 compile
We can directly use the tools provided by the SDK to compile the Symbian project, or use the integrated environment provided by vc6 to compile the converted Symbian project. The compiled results are stored in the/Symbian/6.1/series60/epoc32/release/wins/udeb/z/system/apps directory.

2.1 use the tools provided by the SDK to compile the Symbian Project
At the position in the previous section, we continue to enter:

Abld build wins udeb

This command will compile our program and generate our helloworld in the/Symbian/6.1/series60/epoc32/release/wins/udeb directory, then we can run the debug version of the simulator from the Start menu and run helloworld in the simulation.

2.2 Use vc6 to compile the Symbian Project
We directly open the DSW file generated after running abld makefile vc6, and VC automatically loads the converted project. Press F7 to compile the project directly. The compilation results are also stored in the/Symbian/6.1/series60/epoc32/release/wins/udeb directory. Then we open the debug version of the simulator and we can see the compiled project.

3. Package
Take helloworld provided by SDK 1.2 as an example to create a. sisfile that can be installed on your mobile phone:

3. 1. Check the program
First, in the command line format, enter the directory where the MPs file of the helloworld project is located, enter bldmake bldfiles and abld build wins udeb, and then open the simulator to check whether the program has any errors.

3. 2. compile the project
After the program has no errors, enter abld build armi urel in the command line. After executing this command, the helloworld. app and helloworld. RSC files are generated in the Directory D:/Symbian/6.1/series60/epoc32/release/armi/urel.

3. Create a. PKG File

Note: when a project is created using the VC wizard, the PKG file has been created under the folder named SIS (install) under the project directory, you only need to modify the installation file and its path. Note the UID of the platform and app when manually generating the PKG File
In D:/Symbian/6.1/series60/series60ex/helloworld/sis, use NotePad to create or modify the PKG file of the project. The content is as follows:

; Helloworld. PKG

;

; Language-standard language Definitions

& En

; Standard SIS file header

# {"Helloworld"}, (0x10005b91), 1, 0, 0

; Supports Series 60 v 1.2

(0x101f8202), 0, 0, 0, {"series60productid "}

;

"D:/Symbian/6.1/series60/epoc32/release/armi/urel/helloworld. app "-"! :/System/apps/helloworld. app"

"D:/Symbian/6.1/series60/epoc32/release/armi/urel/helloworld. RSC "-"! :/System/apps/helloworld. RSC"

In the preceding example, "d:/Symbian/6.1/series60/epoc32/release/armi/urel/helloworld. RSC" is the file to be packaged and installed ,"! :/System/apps/helloworld. RSC is the target installation location. Note that "!" is used in the target location. Instead of the actual drive letter. In this way, the mobile phone system prompts the user to select the desired location during the user's installation, which gives the user greater flexibility. In addition, in the Symbian system, the default location of the installed application is "! :/System/apps ".

After editing the PKG file, save it to the corresponding directory.

3. 4. Package
In the command line, go to the directory where the PKG file is located and run the makesis helloworld. PKG command.

Note:If the Series 60 SDK of version 1.2 is not installed on the C drive, the series60 will be displayed after the simulator is run. In fact, this is a bug installed on the SDK of version 1.2.

Solution:
If it is indeed installed on another logical drive, you can solve the problem by modifying the simulator configuration.
Open/Symbian/6.1/series60/epoc32/data/EPOC. ini
This is a text file that can be opened with note. Generally, this file contains settings in the form of _ epoc_drive_x path. This is the drive letter X of the logical drive that the simulator can access: And points it to the directory described in path. 2 logical drives, Rom Z drive, and virtual drive d need to be known when the simulator starts. The Z disk is automatically allocated, and the D disk must be declared in the preceding configuration file. Check the path after _ epoc_drive_d and change it to X: /Symbian/6.1/series60/epoc32/wins/d x is the drive for installing the SDK. (If you do not install the SDK in the root directory, write the full path ). Try restarting the simulator?

After other versions are installed, the configurations are complete and do not need to be modified.

 

 

 

Article 2: // ============================== //

 

Operating System: Windows2000 sp41. install micorsoft visual c ++ 6.0 sp62.activeperl execution script file environment, I use the version for the ActivePerl-5.8.0.806-MSWin32-x86.msi;: http://count.skycn.com/softdown.php? Id = 1211 & url = http://cbbnhttp.skycn.net/down/ActivePerl-5.8.0.806-MSWin32-x86.msi 3. j2re install Java Runtime Library (Java 2 Runtime Environment, j2re ):

Http://www.hongkongpost.gov.hk/product/download/ecert_software/img/j2re-1_3_1_01-win-i.exe 4. Install ns60_sdk_v1.2 version:
Bytes. (Of course, it is fine not in order, but don't scold me if you uninstall it and then reinstall it) (1) install VC ++ 6.0 first, preferably with the SP6 patch. (2) install ActivePerl. When installing this software, note that do not activate the new PRM function. Then, in the next step, the options add Perl to the path environment variable and create perl file extension association must be checked. Wait until the installation is complete. (3) install j2sdk. Check the Microsoft Internet Explorer check box. (4) install the series60sdk. After installation is complete, configure the VC environment. /1) E: /Symbian/7.0 S/series60_v20/series60tools/avkonappwiz_v1_awx and avkonappwiz_v1_hlp files under the applicationwizard directory are copied to the/Microsoft Visual Studio/common/msdev98/template directory under the vc6.0 directory. When creating a project, you can see the Series 60 Appwizard V2.0 option. 2) install the toolbar epoctoolbar. set epoctools in the directory e:/Symbian/7.0 S/series60_v20/series60tools/epoctoolbar. copy the DLL file to the/Microsoft Visual Studio/common/msdev98/addins directory. Open VC ++ 6.0, click the menu tools-Customize (tools-> Custom-> additional items and macro files), check the EPOC toolbar Add-in.3) set epocroot for system environment variables: /Symbian/6.1/series60/some friends say that this should be changed to "/". However, they did not succeed. Path: add the VC environment variable: C:/program files/Microsoft Visual Studio/common/msdev98/bin; C:/program files/Microsoft Visual Studio/vc98/bin; two, you can add the epoc32 environment variable: C:/Symbian/6.1/shared/epoc32/GCC/bin; C:/Symbian/6.1/shared/epoc32/tools; the following are complete environment variables. Perl is automatically added during installation. C:/program files/Microsoft Visual Studio/common/tools/winnt; C:/program files/Microsoft Visual Studio/common/msdev98/bin; C: /program files/Microsoft Visual Studio/common/tools; C:/program files/Microsoft Visual Studio/vc98/bin; C:/perl/bin; C: /Symbian/6.1/shared/epoc32/GCC/bin; C:/Symbian/6.1/shared/epoc32/tools; % SystemRoot %/system32; % SystemRoot %; % SystemRoot %/system32/WBEM; C:/winnt/system32/the environment has been configured. Then you can start creating a project to run it. The first Symbian program: 1. Call the simulator through the IDE environment. Here, the IDE is Microsoft Visual C ++ 6.0 SP6 to create a blank project. You can create a new project by clicking Next, after compilation, the simulator path is displayed. You can find C:/Symbian/6.1/series60/epoc32/release/wins/udeb/cepoc.exe through browsing. Note that the project file and SDK file must be on a drive letter; otherwise, the file cannot be created successfully. 2. Create a helloworld project file and open it from VC ++ 6.0. We will convert the example helloworld In the SDK into a vc6 project, first, enter the/Symbian/6.1/series60/series60ex/helloworld/group directory, enter the directory in command prompt mode, and then execute: the bldmake bldfiles command will generate an abld in the group directory. bat batch files, the directory/Symbian/6.1/series60/epoc32/build/Symbian/6.1/series60/epoc32/build/Symbian/6.1/series60/series60ex/helloworld/group will be generated under/Symbian/series60/epoc32, and generate a heap under the underlying directory. make file. Then, run makmake helloworld in the/Symbian/6.1/series60/series60ex/helloworld/group directory. MMP vc6 can generate a DSW project file. The vc6 option indicates the project file to be converted to vc6. We use VC to open this DSW file, compile and run it, and we can get the helloworld program. If you encounter a problem in this command, if the system prompts you cannot find the link.exe file, you can search for the file in the installation directory of vc6, and then add the directory where link.exe is located in the path of the system environment variable. The system prompts that the mspdb60.dllfile cannot be found, and link.exe cannot run. Search for mspdb60.dll and copy the file to the directory where link.exe is located. In this way, the first helloworld program is successfully imported and the program mode is carefully studied, you will find the feeling of developing the Symbian program with VC ++. The next step is to stick to it. Now, you can write it here.

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.