Sign in Join
Wiki copytemporary

SymbianOS: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11> **Warning:** The work was too large, the platform changed too fast and now the entire SymbianOS is deprecated, so the port was abandoned
22
33## Roadmap to port FPC to SymbianOS
44
551. ~~Develop a Hello World application on c++ for SymbianOS UIQ 3~~ - Felipe
662. ~~Convert the Build software from perl to our own building system, and make it build the c++ software~~ - Felipe
773. ~~Effectively start to port the Free Pascal Runtime Library~~ - Felipe
884. Convert some c++ symbian applications to check for errors on the port - Felipe - 1 trivial done, more to go
995. Complete the port of Free Pascal Runtime Library
10106. Start developing with UIQ 2 SDK, and make adjustments for everything to work with it
11117. Make sure everything works on the real Phone with UIQ 2 too
1212
1313## Versions Roadmap
1414
1515The first target will be UIQ 3.0 for the Symbian OS on x86 architecture (the emulator).
1616
1717Next will be the UIQ 2 for x86 emulator, and last the UIQ 2 real device.
1818
1919## Compiling Free Pascal for the Emulator
2020
21211 - Download the latest FPC from Subversion. Make sure you also have the latest stable FPC installed.
2222
23232 - Next you will need a assembler compatible with the Code Warrior linker. Currently this is the GNU Assembler. It´s a 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. Because of this we can simply copy the as.exe file that comes with FPC releases and rename it.
2424
2525Suppose your win32 gnu assembler is located at: C:\Programas\lazarus20\fpc\2.0.4\bin\i386-win32\as.exe
2626
2727You should make a copy of it with this name: C:\Programas\lazarus20\fpc\2.0.4\bin\i386-win32\i386-symbian-as.exe
2828
29293 - Now, open a Windows Command Line session. The following batch script will execute a full compilation of FPC for the emulator. In this particular case lazarus was installed on C:\Programas\lazarus20 and the fpc 2.1 source code is on C:\Programas\fpc21
3030
3131 PATH=C:\Programas\lazarus20\fpc\2.0.4\bin\i386-win32
3232 cd c:\Programas\fpc21
3333 cd compiler
3434 make i386
3535 cd ..
3636 cd rtl
3737 cd symbian
3838 make FPC=C:\Programas\fpc21\compiler\ppc386.exe
3939
40404 - Building the RTL only is not enougth to compile a Symbian OS application. We also need the c++ bindings which connect our RTL to the Symbian libraries.
4141
42424.1 - To build the bindings you will need the helper application called mksymbian. This application is included with the Free Pascal sources on the directory utils/mksymbian
4343
44444.2 - Next compile mksymbian. There is a lazarus project to help building it, but directly calling the compiler from command line works just as well, like this:
4545
4646`fpc mksymbian.pas`
4747
48484.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:
4949
5050`mksymbian bindings`
5151
5252The resulting .o file(s) will be located on: C:\Programas\fpc21\rtl\units\i386-symbian
5353
54545 - Next you can go to the session "Building Symbian OS Applications" below, to learn how to use your compiler to generate a Object Pascal software for Symbian.
5555
5656The Symbian OS RTL will be located at: C:\Programas\fpc21\rtl\units\i386-symbian
5757
5858## Compiling Free Pascal for the real device
5959
6060Not yet implemented.
6161
6262## Building Symbian OS Applications
6363
6464### Overview
6565
6666Building 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. For example the UIDs, the need to register a application on the Emulator, etc.
6767
6868The UIQ SDK has a very complex build system composed of several ten thousends lines of Perl code, batch files and 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. We created a external build utility, called mksymbian, written in Pascal that auxiliates the build process.
6969
7070### Guide for building applications for the Emulator
7171
7272You need first to write a .ini file that will contain Symbian OS specific information. Here is a example file called QPasHello.ini
7373
7474 [Main]
7575 EXENAME=QPasHello.exe
7676 Language=Pascal
7777 ProjectType=EXE
7878 SDK=UIQ
7979 SDKVersion=3
8080 Emulator=1
8181
8282 [FPC]
8383 CompilerPath=C:\Programas\fpc21\compiler\ppc386.exe
8484 AssemblerPath=C:\Programas\lazarus215\fpc\2.1.5\bin\i386-win32\as.exe
8585 RTLUnitsDir=C:\Programas\fpc21\rtl\units\i386-symbian\
8686
8787 [UIDs]
8888 UID2=0x100039CE
8989 UID3=0xE1000002
9090
9191 [Files]
9292 mainsource=QPasHello.pas
9393 mainresource=QPasHello_reg.rss
9494
9595 [Objects]
9696 file0=qpashello.o
9797
9898And the respective QPasHello.pas source file:
9999
100100``` pascal
101101{
102102 QPasHello.pas
103103
104104 *****************************************************************************
105105 * *
106106 * This demonstration program is public domain, which means no copyright, *
107107 * but also no warranty! *
108108 * *
109109 * This program is distributed in the hope that it will be useful, *
110110 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
111111 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
112112 * *
113113 *****************************************************************************
114114
115115 This application will create a popup message 'My Hello World' and then quit
116116
117117 The message will last a few seconds.
118118
119119 Author: Felipe Monteiro de Carvalho
120120}
121121program QPasHello;
122122
123123uses symbian;
124124
125125begin
126126 User_InfoPrint('My Hello World');
127127end.
128128```
129129
130130And also the main resource file QPasHello_reg.rss:
131131
132132 // QHelloWorld_reg.rss
133133 #include <AppInfo.rh>
134134 UID2 0x100039CE
135135 UID3 0xE1000002
136136 RESOURCE APP_REGISTRATION_INFO
137137 {
138138 // filename of app binary (minus extension)
139139 app_file = "QPasHello";
140140 }
141141
142142Next use mksymbian to build your application, like this:
143143
144144`mksymbian build QPasHello.ini`
145145
146146If something goes wrong, check if mksymbian located your directories correctly:
147147
148148`mksymbian showpath`
149149
150150Also make sure to correct the paths according to your system on the ini file.
151151
152152### Using mksymbian
153153
154154The syntax of this tool is:
155155
156156mksymbian \[action\] \[project file\]
157157
158158Action can be one of the following:
159159
160160- build - Compiles a project
161161- bindings - Compiles the pascal bindings for Symbian OS. It supposes that the necessary files are on the location where the command is executed.
162162- showpath - Shows the paths found for the Symbian SDKs and Free Pascal. Utilized to check if the tool was able to find the tools.
163163
164164The project file is a .ini file with many symbian os specific informations about a project, like the UIDs
165165
166166Target can be one of the following:
167167
168168- WinEmulator - Builds for the x86 emulator
169169- ArmDevice - Builds a binary for use on PDAs and Smartphones
170170
171171Note: The tool parameters are not case-sensitive
172172
173173## Screenshots
174174
175175First pascal symbian os UIQ 3 application:
176176
177-<figure>
178-<img src="First_pascal_symbian_app.PNG" title="First_pascal_symbian_app.PNG" />
179-<figcaption>First_pascal_symbian_app.PNG</figcaption>
180-</figure>
177+![](/wiki-images/0/0a/First_pascal_symbian_app.PNG)
181178
182179## See Also
183180
184181- [[Programming in Symbian OS]]
185182- [[Symbian OS Internals]]
186183
187184## External Links
188185
189186- <http://developer.uiq.com/> - UIQ version 3 and superior developer community, with SDK download, Forum, Documentation and News.
190187- [1](http://www.symbian.com/developer/techlib/v70sdocs/doc_source/reference/cpp/libc/index.html) docs for the POSIX layer
191188- [2](http://www.symbian.com/developer/techlib/v70sdocs/doc_source/devguides/cpp/base/CStandardLibrary/DesignSTDLIB.html) a bit of description for the POSIX layer
192189- [3](http://search.cpan.org/~rgarcia/perl-5.9.4/README.symbian) - Compiling perl for symbian. They mainly use the POSIX libraries...
193190- [4](https://developer.uiq.com/forum/entry.jspa?externalID=31) - List of the UIQ Phones and the UIQ SDK version to use.
194191- [5](https://developer.uiq.com/forum/kbclick.jspa?categoryID=21&externalID=26&searchID=101700) - APIs changed from UIQ 2.1 to UIQ 3
195192- [6](https://developer.uiq.com/forum/kbclick.jspa?categoryID=21&externalID=20&searchID=101700) - How to port my application from UIQ 2.x to UIQ 3
196193
197194---
198195*From the Free Pascal wiki, page "SymbianOS", as it stood on 2021-06-06 after a change by Jwdietrich, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
199196Category: Historical
200197Category: Mobile
201198Category: Outdated information
202199Category: Symbian

Back to history