引用第2楼dolang于2009-05-21 10:09发表的 :
猫工,把那类E文给翻强成中文吧。
港口的Symbian操作系统免费帕斯卡尔正在建设中。
Roadmap to port FPC to SymbianOS 路线图 , 以港口为Symbian操作系统的FPC
[li][strike]Develop a Hello World application on c++ for SymbianOS UIQ 3[/strike] - Felipe [strike]制定一个Hello World应用程序的C + +的Symbian操作系统的UIQ 3[/strike] -马萨 [/li][li][strike]Convert the Build software from perl to our own building system, and make it build the c++ software[/strike] - Felipe [strike]转换软件的Perl建设我们自己的建设体系,使之建立在C + +软件[/strike] -马萨 [/li][li][strike]Effectively start to port the Free Pascal Runtime Library[/strike] - Felipe [strike]有效启动港口自由帕斯卡尔运行时库[/strike] -马萨 [/li][li]Convert some c++ symbian applications to check for errors on the port - Felipe - 1 trivial done, more to go 转换一些C + +的Symbian应用程序检查错误的港口-菲利普- 1小事做,更多的去 [/li][li]Complete the port of Free Pascal Runtime Library 完成港口自由帕斯卡尔运行时库 [/li][li]Start developing with UIQ 2 SDK, and make adjustments for everything to work with it 开始开发的智能手机2 SDK的,并作出调整,一切都与它 [/li][li]Make sure everything works on the real Phone with UIQ 2 too 确保所有工程的实际手机的UIQ 2太 [/li] Versions Roadmap 版本路线图
The first target will be UIQ 3.0 for the Symbian OS on x86 architecture (the emulator). 第一个目标将是的UIQ 3.0的Symbian OS操作系统的x86架构(模拟器) 。
Next will be the UIQ 2 for x86 emulator, and last the UIQ 2 real device. 下一步将提供UIQ 2的x86模拟器,和去年的实际器件的UIQ 2 。
Compiling Free Pascal for the Emulator 编译免费帕斯卡尔的仿真
1 - Download the latest FPC from Subversion. 1 -下载最新的FPC的颠覆活动。 Make sure you also have the latest stable FPC installed. 请确认您也有最新的稳定的FPC安装。
2 - Next you will need a assembler compatible with the Code Warrior linker. 2 -接下来,您将需要一个汇编兼容码勇士连接。 Currently this is the GNU Assembler. 目前这是在GNU汇编。 It´sa good coincidence that the emulator uses normal win32 PE executables, but of course it could use any other format, so FPC will expect a cross-assembler with the correct name. 这是一个良好的巧合模拟器使用正常的Win32可执行体育,但当然也可以使用任何其他格式,所以台塑将期待一个跨汇编的正确名称。 Because of this we can simply copy the as.exe file that comes with FPC releases and rename it. 正因为如此,我们可以简单地复制as.exe文件附带的FPC发布并重新命名它。
Suppose your win32 gnu assembler is located at: C:\\Programas\\lazarus20\\fpc\\2.0.4\\bin\\i386-win32\\as.exe 假设你的Win32的GNU汇编位于中: C : \\节目\\ lazarus20 \\板\\ 2.0.4 \\斌\\ i386 -的Win32 \\ as.exe
You should make a copy of it with this name: C:\\Programas\\lazarus20\\fpc\\2.0.4\\bin\\i386-win32\\i386-symbian-as.exe 您应该复制它具有此名称中: C : \\节目\\ lazarus20 \\板\\ 2.0.4 \\斌\\ i386 -的Win32 \\ i386 - Symbian的as.exe
3 - Now, open a Windows Command Line session. 3 -现在,打开一个Windows命令行会议。 The following batch script will execute a full compilation of FPC for the emulator. 下面的批处理脚本将执行全面汇编的FPC的模拟器。 In this particular case lazarus was installed on C:\\Programas\\lazarus20 and the fpc 2.1 source code is on C:\\Programas\\fpc21 在这种情况下拉撒路是安装在C : \\节目\\ lazarus20和台塑2.1源代码是在C : \\节目\\ fpc21
[pre] PATH=C:\\Programas\\lazarus20\\fpc\\2.0.4\\bin\\i386-win32 的PATH = C的: \\节目\\ lazarus20 \\板\\ 2.0.4 \\斌\\ i386 -的Win32 cd c:\\Programas\\fpc21 裁谈会ç : \\节目\\ fpc21 cd compiler 裁谈会编译 make i386 使i386 cd .. 裁谈会.. cd rtl 裁谈会的RTL cd symbian 裁谈会的Symbian make FPC=C:\\Programas\\fpc21\\compiler\\ppc386.exe 使板= C的: \\节目\\ fpc21 \\编译\\ ppc386.exe [/pre] 4 - Building the RTL only is not enougth to compile a Symbian OS application. 4 -建设的RTL不仅是没有enougth编纂一部Symbian OS的应用程序。 We also need the c++ bindings which connect our RTL to the Symbian libraries. 我们还需要在C + +绑定连接我们的RTL到了Symbian图书馆。
4.1 - To build the bindings you will need the helper application called mksymbian. 4.1 -要建立的绑定,您需要的帮助应用程序称为mksymbian 。 This application is included with the Free Pascal sources on the directory utils/mksymbian 此应用程序中包含的免费帕斯卡尔源目录utils / mksymbian
4.2 - Next compile mksymbian. 4.2 -下一步编译mksymbian 。 There is a lazarus project to help building it, but directly calling the compiler from command line works just as well, like this: 有拉撒路建设项目,以帮助它,但直接调用编译器的命令行的作品一样好,像这样:
[pre] fpc mksymbian.pas 台塑mksymbian.pas [/pre] 4.3 - Copy the mksymbian executable to the fpc/rtl/symbian/bindings directory, open a console, go to the fpc/rtl/symbian/bindings directory and type this command: 4.3 -复制mksymbian的可执行的FPC / RTL级/站/绑定目录,打开一个控制台,去的FPC / RTL级/站/绑定目录,输入这个命令:
[pre] mksymbian bindings mksymbian绑定 [/pre] The resulting .o file(s) will be located on: C:\\Programas\\fpc21\\rtl\\units\\i386-symbian 由此产生的。 ö文件(县)将设在中: C : \\节目\\ fpc21 \\的RTL \\单位\\ i386 - Symbian的
5 - Next you can go to the session "Building Symbian OS Applications" bellow, to learn how to use your compiler to generate a Object Pascal software for Symbian. 5 -接下来,您可以去届“建设Symbian OS的应用”贝娄,以了解如何使用您的编译器生成一个对象帕斯卡尔软件针对Symbian 。
The Symbian OS RTL will be located at: C:\\Programas\\fpc21\\rtl\\units\\i386-symbian Symbian操作系统的RTL将设在中: C : \\节目\\ fpc21 \\的RTL \\单位\\ i386 - Symbian的
Compiling Free Pascal for the real device 编译免费帕斯卡尔真正的装置
Not yet implemented. 尚未执行。
Building Symbian OS Applications 构建Symbian OS的应用
Overview 概况
Building an application on Symbian OS requires some learning, because there are several unique things about Symbian which must be utilized even the most simple applications. 建立一个适用于Symbian OS之上,需要一定的学习,因为有一些独特的东西的Symbian必须利用即使是最简单的应用。 For example the UIDs, the need to register a application on the Emulator, etc. 例如UIDs ,需要注册一个仿真器上的应用等
The UIQ SDK has a very complex build system composed of several ten thousends lines of Perl code, batch files and Makefiles. 提供UIQ SDK中有一个非常复杂的编译系统组成的10 thousends行的Perl代码,批处理文件和Makefiles 。 It induces the software to have a specific directory structure, which is very bad to port existing software, as well as to write cross-platform software. 它诱使该软件有一个特定的目录结构,这是非常糟糕的港口现有的软件,以及编写跨平台的软件。 Because cross-platform is a strong point on Free Pascal, we decided to simplify and improve the process when writing our build system for Symbian. 由于跨平台是一个强大点免费帕斯卡尔,我们决定简化和改进的过程写作时我们建设系统为Symbian 。 We created a external build utility, called mksymbian, written in Pascal that auxiliates the build process. 我们建立了一个外部建立实用,所谓mksymbian ,写的帕斯卡尔认为auxiliates的建设进程。
Guide for building applications for the Emulator 指南建设应用仿真
You need first to write a .ini file that will contain Symbian OS specific information. 你首先需要写。 ini文件将包含Symbian操作系统的具体信息。 Here is a example file called QPasHello.ini 下面是一个例子文件要求QPasHello.ini
[pre] [Main] [主要] EXENAME=QPasHello.exe EXENAME = QPasHello.exe Language=Pascal 语言=帕斯卡尔 ProjectType=EXE ProjectType = EXE文件 SDK=UIQ SDK中=的UIQ SDKVersion=3 SDKVersion = 3 Emulator=1 仿真器= 1 [FPC] [板] CompilerPath=C:\\Programas\\fpc21\\compiler\\ppc386.exe CompilerPath = C的: \\节目\\ fpc21 \\编译\\ ppc386.exe AssemblerPath=C:\\Programas\\lazarus215\\fpc\\2.1.5\\bin\\i386-win32\\as.exe AssemblerPath = C的: \\节目\\ lazarus215 \\板\\ 2.1.5 \\斌\\ i386 -的Win32 \\ as.exe RTLUnitsDir=C:\\Programas\\fpc21\\rtl\\units\\i386-symbian\\ RTLUnitsDir = C的: \\节目\\ fpc21 \\的RTL \\单位\\ i386 - Symbian的\\ [UIDs] [ UIDs ] UID2=0x100039CE UID2 = 0x100039CE UID3=0xE1000002 UID3 = 0xE1000002 [Files] [文件] mainsource=QPasHello.pas mainsource = QPasHello.pas mainresource=QPasHello_reg.rss mainresource = QPasHello_reg.rss [Objects] [对象] file0=qpashello.o file0 = qpashello.o [/pre] And the respective QPasHello.pas source file: 和各自的QPasHello.pas源文件:
{ ( QPasHello.pas QPasHello.pas ***************************************************************************** ************************************************** *************************** * * * * * This demonstration program is public domain, which means no copyright, * *本示范项目是公共领域,这意味着没有版权, * * but also no warranty! *而且也没有保修! * * * * * * * This program is distributed in the hope that it will be useful, * *本程式的目的是希望这将是有益的, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * *但没有任何担保 , 甚至隐含的担保* * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *适销性或针对特定用途的适用性。 * * * * * * ***************************************************************************** ************************************************** *************************** This application will create a popup message 'My Hello World' and then quit 此应用程序将创建一个弹出消息'我的世界您好' , 然后退出 The message will last a few seconds. 该消息将持续几秒钟。 Author: Felipe Monteiro de Carvalho 作者:费利佩奥蒙泰罗德卡瓦略 } ) program QPasHello; 计划 QPasHello ; uses symbian; 使用Symbian ; begin 开始 User_InfoPrint ( 'My Hello World' ) ; User_InfoPrint ( '我的世界您好' ) ; end . 末端 。 [/pre] And also the main resource file QPasHello_reg.rss: 也是主要的资源文件QPasHello_reg.rss :
[pre] // QHelloWorld_reg.rss / / QHelloWorld_reg.rss #include <AppInfo.rh> #包括<AppInfo.rh> UID2 0x100039CE UID2 0x100039CE UID3 0xE1000002 UID3 0xE1000002 RESOURCE APP_REGISTRATION_INFO 资源APP_REGISTRATION_INFO { ( // filename of app binary (minus extension) / /文件名的应用程序二进制(零下延长) app_file = "QPasHello"; app_file = “ QPasHello ” ; } ) [/pre] Next use mksymbian to build your application, like this: 下次使用mksymbian建立您的应用程序,象这样:
[pre] mksymbian build QPasHello.ini mksymbian建立QPasHello.ini [/pre] If something goes wrong, check if mksymbian located your directories correctly: 如果出现问题,检查是否mksymbian位于正确的目录:
[pre] mksymbian showpath mksymbian showpath [/pre] Also make sure to correct the paths according to your system on the ini file. 也请务必正确的路径根据您系统的ini文件。
Using mksymbian 使用mksymbian
The syntax of this tool is: 语法的这个工具是:
mksymbian [action] [project file] mksymbian [行动] [项目文件]
Action can be one of the following: 行动可以是下列之一:
[li]build - Compiles a project 建设-编译一个项目 [/li][li]bindings - Compiles the pascal bindings for Symbian OS. 绑定-汇集了Pascal绑定的Symbian操作系统。 It supposes that the necessary files are on the location where the command is executed. 它假定必要的文件都在的位置的命令。 [/li][li]showpath - Shows the paths found for the Symbian SDKs and Free Pascal. showpath -表演的路径找到了Symbian软件开发工具包和免费帕斯卡尔。 Utilized to check if the tool was able to find the tools. 用于检查的工具是能够找到的工具。 [/li] The project file is a .ini file with many symbian os specific informations about a project, like the UIDs 该项目的文件是一个。 ini文件的许多具体信息Symbian操作系统有关项目,如UIDs
Target can be one of the following: 目标可以是下列之一:
[li]WinEmulator - Builds for the x86 emulator WinEmulator -打造为的x86模拟器 [/li][li]ArmDevice - Builds a binary for use on PDAs and Smartphones ArmDevice -建立一个二进制用于PDA和智能手机 [/li] Note: The tool parameters are not case-sensitive 注意:该工具的参数不区分大小写
截图
First pascal symbian os UIQ 3 application: 第一帕斯卡尔Symbian操作系统的UIQ 3个应用程序:
See Also 参见
External Links 外部链接
[li]http://developer.uiq.com/ - UIQ version 3 and superior developer community, with SDK download, Forum, Documentation and News. http://developer.uiq.com/ -智能手机第3版和高级开发者社区,与SDK的下载,论坛,文件和新闻。 [/li][li][1] docs for the POSIX layer [ 1 ]文件的POSIX正层 [/li][li][2] a bit of description for the POSIX layer [ 2 ]一些说明在POSIX层 [/li][li][3] - Compiling perl for symbian. [ 3 ] -编译的Perl的Symbian 。 They mainly use the POSIX libraries... 他们主要是使用POSIX库... [/li][li][4] - List of the UIQ Phones and the UIQ SDK version to use. [ 4 ] -列出的电话和手机的UIQ SDK的版本才能使用。 [/li][li][5] - APIs changed from UIQ 2.1 to UIQ 3 [ 5 ] - API的变化的UIQ 2.1的UIQ 3 [/li][li][6] - How to port my application from UIQ 2.x to UIQ 3 [ 6 ] -如何从我的申请港口的UIQ 2.x中来的UIQ 3 [/li] 取自“ http://wiki.lazarus.freepascal.org/SymbianOS ” |