Sign in Join
Wiki copytemporary

Symbian OS Internals: what changed

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

OldNewLine
11## Build System Reengineering
22
33This section is a documentation on the attempt to re-engineer the UIQ 3 build system to a format more friendly to Free Pascal and cross-platform development in general.
44
55### Default SDK Build Process for UIQ 3
66
77Two commands are executed when building UIQ 3 software for the emulator. Suppose your UIQ SDK is installed on c:\Symbian\UIQ3SDK and your software C++ source code is on C:\QHelloWorld\src.
88
99On C++ you should enter the directory C:\QHelloWorld\group where the build file is located (bld.inf), and type:
1010
1111 bldmake bldfiles
1212 abld build winscw udeb
1313
1414The first command will:
1515
1616- Generate the directory: C:\Symbian\UIQ3SDK\epoc32\BUILD\Programas\SymbianOS\QHelloWorld\group
1717
1818- Fill it with many Makefiles
1919
2020- Create a ABLD.BAT script
2121
2222- Perl files involved: bldmake.pl
2323
2424The second command will:
2525
2626- Generate the directory: C:\Symbian\UIQ3SDK\epoc32\BUILD\Programas\SymbianOS\QHelloWorld\group\QHELLOWORLD\WINSCW
2727
2828- There it will put the source code, a QHELLOWORLD.WINSCW file and a UDEB directory with compiled .o files for the software
2929
3030- It will also create a executable (QHelloWorld.exe) for the software on the directory: C:\Symbian\UIQ3SDK\epoc32\release\winscw\udeb
3131
3232- Perl files involved: abld.pl makmake.pl
3333
3434### Default SDK Build Process for UIQ 2.1
3535
3636The build process for UIQ 2.1 is very similar to UIQ 3, but there are some differences.
3737
3838There commands to build a software are:
3939
4040 cd C:\Programas\UIQ21\UIQExamples\HelloWorld
4141 devices -setdefault @UIQ_21:com.symbian.UI
4242 bldmake bldfiles
4343 makmake HelloWorld.mmp THUMB
4444 abld build thumb urel
4545
4646This will:
4747
4848- Generate the directory: C:\Programas\UIQ21\epoc32\BUILD\PROGRAMAS\UIQ21\UIQEXAMPLES\HELLOWORLD\HELLOWORLD\THUMB\UREL
4949
5050- Fill the directory C:\Programas\UIQ21\epoc32\BUILD\PROGRAMAS\UIQ21\UIQEXAMPLES\HELLOWORLD it with many Makefiles
5151
5252- Create a ABLD.BAT script
5353
5454- Fill the first UREL directory with .o object files and a .in file
5555
5656- The THUMB directory will have a .THUMB a .rsg and a .def library definition file
5757
5858- It will also create a executable (QHelloWorld.app) for the software on the directory: /epoc32/release/thumb/urel
5959
6060- Perl files involved: bldmake.pl abld.pl makmake.pl
6161
6262The main difference is that all applications are actually DLLs on UIQ 2, so we need to use tools like dlltool and .def files.
6363
6464### Modifyed Build Process
6565
6666To aid on this complex build process, a command line tool called "mksymbian" will be created.
6767
6868Default UIQ build process expects that the source be on a rather peculiar directory format. This is unsuitable for cross-platform development. Just imagine if each OS required a different directory tree, cross-platform would be impossible. Instead we will simply require a .ini file specifying the target options.
6969
7070On the folder of the project you should have source code and also one or more project information files. This files should be in INI format, and specifies information for our tool to build the project.
7171
7272To compile a project with it you can do:
7373
74-`mksymbian build myproject.ini`
74+```text
75+mksymbian build myproject.ini
76+```
7577
7678One important task of this build tool is identifying correctly where Symbian SDKs and Free Pascal are installed. You can verify this using the command:
7779
78-`mksymbian showpath`
80+```text
81+mksymbian showpath
82+```
7983
8084### Registering a application on the UIQ Emulator
8185
8286Each application should provide a non-localizable resource file with information necessary to register it on the emulator (or later on a real phone). This file ends with the .rss extension and should look similar to this example one:
8387
8488 // QHelloWorld_reg.rss
8589 #include <AppInfo.rh>
8690
8791 UID2 KUidAppRegistrationResourceFile
8892 UID3 0x01000001
8993
9094 RESOURCE APP_REGISTRATION_INFO
9195 {
9296 // filename of application binary (minus extension)
9397 app_file = "QHelloWorld";
9498 }
9599
96100During the build process this file will be compiled into a .RCS resource file. On the emulator, all registration files should be located on the directory \private\10003a3f\apps
97101
98102Mksymbian tool will take care of compiling the resource and placing it on the correct position. There next paragraphs on this sections are technical details of how this is done.
99103
100104Looking at the UIQ 3 SDK directory structure you will find 3 directories that match \private\10003a3f:
101105
102106- C:\Programas\UIQ3SDK\epoc32\data\Z\private\10003a3f\apps
103107
104108Here a copy of your RCS resource file will be put
105109
106110- C:\Programas\UIQ3SDK\epoc32\winscw\c\Private\10003a3f
107111
108112This directory contains only some binary files.
109113
110114- C:\Programas\UIQ3SDK\epoc32\release\winscw\udeb\Z\private\10003a3f\apps
111115
112116Here a copy of your RCS resource file will be put, and you can also see RCS files for all other software installed on the emulator.
113117
114118## Comments about the Build system
115119
116120there is also an replacement for the Symbian build system which uses Makefiles: <http://www.koeniglich.de/sdk2unix/symbian_sdk_on_unix.html> -- User:Johanneswi
117121
118122
119123That build system only targets the ARM device, not the Emulator, and isn´t available for UIQ 3. So it doesn´t help much --Sekelsenmat 16:11, 26 October 2006 (CEST)
120124
121125A simpler way would be to concentrate on the POSIX compatible API that Symbian OS has... that would be much faster to do.... And it would not be fixed to UIQ only ...
122126
123127We could probably reuse existing bindings (for example the Unix rtl or something like that...) -- User:Johanneswi
124128
125129## Comments about File formats
126130
127131The emulator does not use the E32 fileformat used by the real devices but makes an normal PE exe that bind against the emulator libraries so thath should be much easier to do than to really build ARM binaries... (I don't have Windows right now so I can't test anything yet...) -- User:Johanneswi
128132
129133
130134Yes, and that´s why the first target will be the emulator =) --Sekelsenmat 16:11, 26 October 2006 (CEST)
131135
132136## Misc info from old SymbianOS Port page
133137
1341381\. Compiler seems to be complete for arm, but THUMB and interworking is something good for symbian.
135139
1361402\. It seems there are some ABI incompatibilities, at least people from symbian irc insist only symbian 9 and greater is ok with arm abi, find out what they are and how to implement them.
137141
1381423\. Everything on symbian is in C++, and fpc cannot connect to C++ object files (yet). The only solution is to create bindings in c and then link fpc to c instead.
139143
140144These tools seems to be helpful in some way:
141145
142-`  smoke, swig, doxygen`
146+```text
147+ smoke, swig, doxygen
148+```
143149
144150And some links to look at in this field:
145151
146152[rvelthuis.de/articles/articles-cppobjs.html](http://rvelthuis.de/articles/articles-cppobjs.html)
147153
148154[qtcsharp.sourceforge.net/background.php](http://qtcsharp.sourceforge.net/background.php)
149155
150156[dot.kde.org](http://dot.kde.org/1095964115/1095969821/1095971862/1095972037/1095972799/1096037901/1096041117/1096057255/)
151157
152158[wiki.kde.org/tiki-index.php?page=Language+Bindings+Talk](http://wiki.kde.org/tiki-index.php?page=Language+Bindings+Talk)
153159
154160[wiki.dotgnu.info/Smoke/Refract](http://wiki.dotgnu.info/Smoke/Refract)
155161
1561624\. Symbian has a very complicated build/make process. How to do that?
157163
1581645\. Symbian has different kinds of applications, some new application modes have to be introduced.
159165
1601666\. Investigate how other languages, not C++, deal with these problems.
161167
1621687\. Neither Symbain OS nor its C++ have exceptions, static data and some strange other things. why? Does it mean we cannot have them on fpc, too? How to deal with this?
163169
1641708\. Someone with good knowledge and background of symbian is defenitely needed here. I just know how to code simple programs on symbian.
165171
1661729\. The source code of gcc might be useful too.
167173
168174Some usefull links:
169175
170176[Symbian programming tutorial, recommended!](http://www.sciabarra.com/symbian-tutorial/?Symbian_C%2B%2B_Programming_Tutorial)
171177
172178[Tutorial](http://symbian.compactbyte.com/)
173179
174180[Pythong for series60](http://www.postneo.com/postwiki/moin.cgi/PythonForSeries60)
175181
176182[SDKS](http://www.newlc.com/-SDKs-)
177183
178184[Symbian OS design faults, interesting](http://www.codeproject.com/ce/Symbian_OS_design_faults.asp)
179185
180186Good books:
181187
182188Wiley, Programming for the Series 60 Platform and Symbian OS (2003)
183189
184190Wiley, Symbian OS Internals Real time Kernel Programming Dec 2005
185191
186192## See Also
187193
188194- [[SymbianOS]]
189195
190196---
191197*From the Free Pascal wiki, page "Symbian OS Internals", as it stood on 2013-04-07 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).*
192198Category: Symbian

Back to history