Mobile/Symbian/NSPR: Difference between revisions

Jump to navigation Jump to search
Line 42: Line 42:
== Steps ==
== Steps ==


Now let's get the meat.
The following description is based on [http://developer.mozilla.org/en/docs/NSPR_build_instructions NSPR build instruction].


* Get Mozilla source tree, by either [http://developer.mozilla.org/en/docs/Mozilla_Source_Code_Via_CVS CVS] or [http://developer.mozilla.org/en/docs/Download_Mozilla_Source_Code FTP download].
# Get NSPR source by either cvs, then apply the [https://bugzilla.mozilla.org/attachment.cgi?id=327262 patch]
* Apply the [https://bugzilla.mozilla.org/attachment.cgi?id=324584 patch] against the tree, at <tt>mozilla/nsprpub/</tt>.
cvs -q -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -r HEAD mozilla/nsprpub
* In NSPR tests, most output are written to <tt>stderr</tt>, but Symbian OS just ignores the <tt>stderr</tt> output. We have to do some tricks. In your Symbian SDK, for example <tt>D:\Symbian\9.1\S60_3rd_MR\Epoc32\include\stdapis</tt>, edit the <tt>stdio.h</tt>, change line 278 into the following lines:<br/>
# or get patched already sources from Mozilla-Symbian project at Google Code
  #ifdef MOZ_STDERR_TO_STDOUT
svn checkout https://mozilla-symbian.googlecode.com/svn/trunk/ mozilla
  #define stderr  (__stdout())
 
  #else
For Emulator target build:
  #define stderr  (__stderr())
 
  #endif
  # create a build directory
* Assume your Mozilla source tree is located at <tt>D:\mozilla</tt>, configure for emulator build by
  mkdir winscw.build
configure --target=arm-none-symbianelf --enable-symbian-target=WINSCW
  cd winscw.build
or configure for target build by
  # run configure script
  configure --target=arm-none-symbianelf --enable-symbian-target=GCCE --disable-debug
  ../mozilla/nsprpub/configure --target=arm-none-symbianelf --enable-symbian-target=WINSCW
* Then invoke the build process by <tt>make</tt> and build test cases by <tt>cd pr/tests; make</tt>.
# build the libraries
make
# build the test programs
cd pr/tests
make
 
For Device target build:
 
# create a build directory for emulator target
mkdir gcce.build
cd gcce.build
  # run configure script
../mozilla/nsprpub/configure --target=arm-none-symbianelf --enable-symbian-target=GCCE --disable-debug
# build the libraries
make
# build the test programs
cd pr/tests
make


At this point, you have done building NSPR for Symbian OS.
At this point, you have done building NSPR for Symbian OS.
90

edits

Navigation menu