Mobile/Symbian/Build: Difference between revisions

no edit summary
No edit summary
Line 2: Line 2:


Symbian OS uses a series of Perl scripts and proprietary tools for building application projects. While this has some advantages when building different targets and setting meta data such as application ID, it however can not fit into Mozilla technology philosophy. Because of the ease portability of Mozilla platform building tools, mainly GNU make and autoconf, we could use these tools to build our Mozilla products with Symbian OS SDK in Windows operating system. The only effort we should take is patching the <tt>configure.in</tt> scripts and related <tt>Makefile.in</tt> and <tt>rules.mk</tt> project files.
Symbian OS uses a series of Perl scripts and proprietary tools for building application projects. While this has some advantages when building different targets and setting meta data such as application ID, it however can not fit into Mozilla technology philosophy. Because of the ease portability of Mozilla platform building tools, mainly GNU make and autoconf, we could use these tools to build our Mozilla products with Symbian OS SDK in Windows operating system. The only effort we should take is patching the <tt>configure.in</tt> scripts and related <tt>Makefile.in</tt> and <tt>rules.mk</tt> project files.
= Building =
== Prerequisites ==
* Windows XP or compatible
* [http://www.forum.nokia.com/info/sw.nokia.com/id/4a7149a5-95a5-4726-913a-3c6f21eb65a5/S60-SDK-0616-3.0-mr.html S60 SDK 3rd Edition FP1]
* Prerequisites for S60 SDK: [http://downloads.activestate.com/ActivePerl/Windows/5.6/ActivePerl-5.6.1.638-MSWin32-x86.msi Active Perl] '''EXACTLY V5.6.1.638, no earlier no later''' and [http://java.sun.com/ JRE v1.5] (JRE is not required)
* [http://www.forum.nokia.com/info/sw.nokia.com/id/91d89929-fb8c-4d66-bea0-227e42df9053/Open_C_SDK_Plug-In.html Open C Plugin for S60 SDK]
* [http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.3.exe Mozilla-build v1.3]
* [http://www.microsoft.com/express/download/default.aspx Visual C++ 2008 Express Edition]
== Procedures ==
* Install all prerequisites, I recommend installing everything on Drive C, default path.
* Add paths to environment variable $PATH, some of them are added by tools installation:
** <tt>c:\mingw\bin</tt> ('''MUST''' be the first, or at least earlier than any Symbian build tool chain related path)
** <tt>c:\program files\csl arm toolchain\bin</tt> (this should be added by GCCE tools installation)
** <tt>c:\symbian\9.2\s60_3rd_fp1\epoc32\tools</tt> ('''MUST''' place this earlier than "<tt>c:\program files\common\symbian\tools</tt>" which is added by SDK installation)
** <tt>c:\mozilla-build\svn-win32-1.4.2\bin</tt>
** <tt>c:\mozilla-build\moztools\bin</tt>
* Add environment variables:
  SYMBIAN_SDK_PATH = /c/symbian/9.2/S60_3rd_FP1/
  ACTIVE_PERL = /c/perl/bin/perl.exe
  CC_INSTALL_PATH = /c/program\ files/CSL\ ARM\ Toolchain/
* Fix a [http://wiki.forum.nokia.com/index.php/KIS001022_-_Open_C:_Initializer_element_is_not_constant_error_on_GCCE_platform header file bug]: in <tt>$EPOCROOT/Epoc32/include/e32def.h</tt>, change:
  static const char* const KSuppressPlatSecDiagnostic =
    KSuppressPlatSecDiagnosticMagicValue;
into
  #if defined(__cplusplus)
  static const char* const KSuppressPlatSecDiagnostic =
    KSuppressPlatSecDiagnosticMagicValue;
  #endif
* Deal with header files
c:
cd \symbian\9.2\s60_3rd_fp1\epoc32\include
move prtypes.h prtypes.h.orig
cd variant
copy Symbian_OS_v9.2.hrh Symbian_OS.hrh
* Checkout source from google code <br>
  svn checkout http://mozilla-symbian.googlecode.com/svn/trunk/ mozilla-symbian
* Start msys by invoking <tt>c:\mozilla-build\msys\msys.bat</tt>, assuming your source is checked out at <tt>c:\mozilla-symbian</tt> then:
For device(GCCE) build:
  cd /c/
  mkdir gobj
  cd gobj
  ../mozilla-symbian/nsprpub/configure --target=arm-none-symbianelf
  --enable-symbian-target=GCCE --disable-debug
  make
  cd pr/tests
  make
For emulator(WINSCW) build:
  cd /c/
  mkdir wobj
  cd wobj
  ../mozilla-symbian/nsprpub/configure --target=arm-none-symbianelf
  --enable-symbian-target=WINSCW
  make
  cd pr/tests
  make
== More ==
The procedures above are also verified on S60 SDK 3rd Edition MR.


= Completed =
= Completed =
382

edits