Building and Running Example Applications from the Command Line
Building and running an example application in the emulator from a command line session consists of four basic steps:
从命令行构建一个示例程序并在模拟器中运行包括四个基本步骤:
* Check the current SDK device 检查当前SDK设备
*Create the abld.bat file 创建abld.bat文件
* Create the build files and build the application 创建构建文件并构建应用程序
* Launch the application in the emulator 在模拟器中启动应用程序
Building and Running Example Applications from the Command Line
Check the current SDK device
检查当前SDK设备
Before starting to build an example application, you need to ensure that the S60 SDK device points to the device that the application in question is intended to run on. In other words, you need to make sure that the appropriate SDK installation is set as default.
To check the device, perform the following steps:
在开始构建一个示例程序之前,你必须确保S60 SDK设备指向的设备是准备在上面运行的目标设备。换言之,你必须确保让适当的SDK设置作为默认值。检查设备,按如下步骤来完成:
1.Open the command prompt and enter the following command and press enter:
devices
1.打开命令提示行并且输入如下命令并且回车:
devices
This command displays all Symbian SDK installations available to you, for example:
这个命令显示出你可用的所有的Symbian SDK设备,例如:
S60_3rd_FP1:com.nokia.S60
S60_3rd_MR:com.nokia.S60 - default
In the above, you can see that in this case the S60_3rd_FP1.nokia.S60 is the default (active) SDK (that is, the S60 3rd Edition SDK for Symbian OS Maintenance Release). To switch between devices, use the -setdefault option of the devices command. Enter this commannd to switch to the S60 3rd Edition SDK for Symbian OS, Supporting Feature Pack 1:
C:\devices -setdefault @S60_3rd_FP1:com.nokia.S60
在上面,你可以看到既然这样 S60_3rd_FP1.nokia.S60 是默认的(激活的)SDK.为了在设备之间交换,可以使用devices命令的-setdefault 选项.输入这个命令去改变S60 3rd Edition SDK for Symbian OS,支持Feature Pack 1:
C:\devices -setdefault @S60_3rd_FP1:com.nokia.S60
Note: @ is part of the command.
注:@是命令的一部分
For more information, please, refer to SDK Help > Symbian Developer Library > How to Manage development for multiple device types for more information.
要得到更多的信息,请根据如下路径 SDK Help > Symbian Developer Library > How to Manage development for multiple device types 以得到更多信息。
Building and Running Example Applications from the Command Line
Create the abld.bat file
创建abld.bat文件
Once you have checked that the current SDK is the default SDK, you need to create an abld.bat file. The abld.bat file is a batch file that controls the build process. The abld.bat file is generated from the bld.inf component description file.
一旦你检查到你的当前SDK是默认SDK,你需要创建一个abld.bat文件。abld.bat是一个批处理文件,它控制编译过程。abld.bat文件从bld.inf组件描述文件生成的。
To create the abld.bat file, perform the following steps:
创建abld.bat文件,按如下步骤来实现:
1. Open the command prompt and go to the application top-level folder. 打开命令行,打到应用的最高文件夹。
For example, <S60_SDK_installation_directory>\S60Ex\helloworldbasic .例如:<s60_SDK的安装路径>\S60Ex\helloworldbasic.
1.
In the application top-level folder, locate the group subdirectory which contains the bld.inf file.在应用程序的最高级的文件夹里,在group的子目录下包含着bld.inf的文件。
For example, <S60_SDK_installation_directory>\S60Ex\helloworldbasic\group\,例如, <S60_SDK_installation_directory>\S60Ex\helloworldbasic\group\
1.Enter the following command and press enter: 输入如下命令并回车:
bldmake bldfiles
This will create the abld.bat file in the current directory, making the abld command available for use.
In the following, you will use the command in creating build files and building the Hello World Basic example application. To find more information on other commands and switches, enter the abld command without arguments, for example:
这将在当前目录下创建abld.bat文件,使abld命令可用。接下来,你将使用命令创建编译文件并且编译HelloWorldBasic示例程序。输入不带参数的abld命令,可以得到更多的信息,例如:
<S60_SDK_installation_directory>\S60Ex\helloworldbasic\group\abld
The help message printed to the console provides more information on the command and its parameters.
帮助信息在控制台下打印出更多关于命令与他的参数的帮助信息。
Building and Running Example Applications from the Command Line
Create the build files and build the application
创建build文件并且build应用程序
With the abld command available, perform the following steps to create the needed build files:
abld命令可用之后,按照如下步骤来创建需要的build文件。
1.Open the command prompt and go to the application folder, which now contains the abld.bat file.打开命令提示行并且转到应用所在文件夹,这个文件夹现在已经包括abld.bat文件了。
For example, 例如
<S60_SDK_installation_directory>\S60Ex\helloworldbasic\group\
1. Enter the following command and press Enter : 输入如下命令并回车:
abld build winscw udeb
Notice, that you have now built a debug build of the Hello World Basic example application (that is, debug-type binaries), which you can run on the emulator . This build is appropriate for your purposes at this point, as it enables you to run and view the application on the S60 emulator.
The build process creates the necessary build files and application binaries, including any resource files required.
注意,你现在编译的是一个HelloWorldBasic示例程序的debug版,你可以在模拟器上运行他。这种编译适合你的这样的目的那就是使得程序可以S60的模拟器上运行。build程序创建必要的build文件和应用二进制,包括需要任何资源。
This stage of the process may produce warnings. If there are errors, it may be because the exports of a DLL component were not frozen. If the application has a DLL component, you need to freeze the exports by performing the following steps.
这个阶段可能会产生警告。如里报了一些错误,他可能是由于一个DLL组件没有被冻结而报错。如果你的应用程序包括一个DLL组件,你需要通过如下步骤来冻结。
1.In the application group folder, enter the following command:在应用的group文件夹,输入如下命令:
abld freeze
For example,例如:
<S60_SDK_installation_directory>\S60Ex\helloworldbasic\group\abld freeze
This ensures that the exports are frozen. To use the frozen exported interfaces, the application needs to be re-built after the freeze.
这里确保了输出是冻结的。要使用冻结的输出接口,应用程序需要在冻结后重新编译。
1.Rebuild the application after freezing the exports by entering the build command:在冻结输出后重新编译通过输入build命令来完成。
abld build winscw udeb
For example,
<S60_SDK_installation_directory>\S60Ex\helloworldbasic\group\abld build winscw udeb
Building and Running Example Applications from the Command Line
Launch the application in the emulator
在模拟器中启动应用程序
To run the example application that you have built on the S60 SDK emulator, perform the following steps:
在S60 SDK模拟器上运行编译好示例程序,按如下步骤来实现:
1. Run the emulator by entering the following command in the command prompt:在命令提示行输入如下命令运行模拟器
epoc
2. Click the Applications button . 点击应用按钮.
3. To open the Hello World Basic application that you have built, navigate first to the Installed folder with the five-way navigation key打开你编译好的HelloWorldBasic应用程序,通过五个导航键导航至Installed(中文版是‘安装’)。 Building and Running Example Applications from the Command Line
1.Open the Installed folder either by通过如下任何一方法打开文件夹。
* clicking the center of the five-way navigation key or点击导航键中间的键或者
* clicking the left soft key (under Options ) and then selecting Open from the menu that appears.点击左软件(在Options'选项'下)然后在出现的菜单中选择Open(打开)
分享到:
相关推荐
用Carbide C++ 2.0 搭建Symbian开发平台.doc 从命令行构建与运行示例程序.doc
s60 5th第五版symbian开发示例程序 通过它学习如何开发sis程序
Symbian 命令行执行环境模拟器 提供wins 版本的Symbian命令行执行环境.
如题,Symbian+OS+C++手机应用开发++第3卷的示例程序。刚开始学习手机开发的时候,仅仅下了PDF文件,文中的案例只能手敲,苦不堪言。有了这个实例程序,感觉就好多了。
2.2.1 从命令行构建应用程序 2.2.2从IDE构建应用程序 2.3 在模拟器和目标机器上运行应用程序 2.3.1 在模拟器上运行应用程序 2.3.2 在目标机器上运行应用程序 2.3.3 模拟器和目标设备之间的差异 2.4 小...
2.2.1 从命令行构建应用程序 2.2.2从IDE构建应用程序 2.3 在模拟器和目标机器上运行应用程序 2.3.1 在模拟器上运行应用程序 2.3.2 在目标机器上运行应用程序 2.3.3 模拟器和目标设备之间的差异 2.4 小...
考虑到Symbian作为一个商业的开放操作系统,它...当然读者最好已经熟悉 Symbian应用程序框架,要知道什么是The UI Control Framework (CONE)以及Application Architecture (APPARC),这样理解起其内在机制更容易一些。
symbian自动更新程序symbian自动更新程序symbian自动更新程序symbian自动更新程序
symbian_开发环境搭建手册及简单示例
全书共13章,循序渐进地讲解了Symbian OS基础、Series 60 GUI应用程序设计基础、应用程序各种UI控件、移动通信和多媒体开发知识,以及应用程序的调试与测试。全书包含了60个实例应用程序,每个都有完整的C++代码和...
android与symbian应用程序框架
本合集为symbian S60入门必看经典。...建议在看多symbian os c++和Series 60应用程序开发之后再看。有从理论到实践过度的功效。编程学习之必看经典合集。合集内的文章均来自网络。特向其作者的无私奉献表示敬意和感谢。
《Symbian S60 (第3版) 手机程序开发与实用教程》 中的BluetoothChat实例
《Symbian S60 (第3版) 手机程序开发与实用教程》-
SYMBIAN ECom 示例工程源代码 可以用它来学习ecom
在nokia forum苦苦找了一下午才找到,分享给大家
Series 60应用程序开发(symbian).pdf Series 60应用程序开发(symbian).pdf Series 60应用程序开发(symbian).pdf Series 60应用程序开发(symbian).pdf Series 60应用程序开发(symbian).pdf
线程实现示例,线程编写、启动、线程优先级以及关闭线程。
symbian s60平台搭建的完整例子,Symbian 9.2+ carbide.c++
APsSelView.cpp autostart[allyfeng].cpp avifile.c avifile.h AviLib.c AviLib.h line_num.h MyTelephony.cpp MyTelephony.h resource.h ..........