Installation instructions for GPAC 0.4.5 on Symbian 9.1 (S60 3rd Edition) platform
last modified: December 2008

0 Foreword
    ! GPAC versions later than 0.4.5 are no longer supported on Symbian ! 
    
	Compilation has only been tested with GCCE & Nokia S60 SDK
	In order to fully compile, you must get:
  - the complete S60 3rd edition SDK (maintainance release) 
  - the MMF SDK update
	
	IMPORTANT NOTE:
	 You must install the SDK and the code you will compile with it (be it GPAC or anything else) 
        !! ON THE SAME LOGICAL DRIVE !!
   If you do not do so, compilation will simply fail due to some misbehavior of the SDK's environment variables.
           
	
	What is currently supported on symbian:
    * all GPAC core, with audio and video output
    * MP4 demux, AAC demux, MP3 demux, AMR demux
    * native audio media codec from the phone through MMF: AAC and AMR
    * MPEG-4 ASP video decoding through xvid
    * JPEG and PNG decoding through libjpeg and libpng    
    * MP3 decoding through MAD
    * TrueType fonts through FreeType
    * Scripting with JS32 (not fully tested yet)
    * FFMPEG (not really stable, random crashes)    

	What is currently NOT supported on symbian:
    * networking 

  TIP:
    Global compiler options are located in SDKRoot\Epoc32\tools\compilation_config\ - you may edit the default C++ rules to remove some 
    warnings during C compil. 

  Side notes:
    several SDKs may coexist on the drive. 
      * To see the list of SDKs, at DOS prompt, c:\devices
      * To change the default SDK, at DOS prompt, c:\devices -setdefault @sdk_name
          you may need to exit prompt and start a new one in order to refresh environment variables.      
    GPAC should compile on EKA2 (Symbian OS v8.0b, v8.1b).
    GPAC CANNOT COMPILE ON EKA1 (Symbian OS v6.1, v7.0, v7.0s, v8.0a v8.1a) because EKA1 does not support writable static data in DLLs
  
I Extra lib installation
	Please follow the instructions in gpac_extra_lib/00_README_FIRST

II GPAC compilation

  Go to gpac/build/symbian
  
  II.1 Configuring extra libs
    * If you don't have libjs, libpng or libjpeg for symbian, comment indicated lines in libgpac.mmp (change #if 1 into #if 0)
    * If you don't have OpenGL ES for symbian, comment indicated lines in libgpac.mmp (change #if 1 into #if 0)
    * If you don't have freetype for symbian, comment ft_font.mmp in file bld.inf
    * If you don't have ffmpeg for symbian, comment ffmpeg_in.mmp in file bld.inf
    * If you don't have libmad for symbian, comment indicated lines in mp3_in.mmp
    * If you don't have libopenjpeg (JPEG 2000) for symbian, comment indicated lines in img_in.mmp (change #if 1 into #if 0)

  II.2 Compiling GPAC
   	cd gpac/build/symbian
  	bldmake bldfiles
      * for GCCE
    abld build gcce urel
      * for thumb
    abld build thumb urel
    cd sis
    set EPOCROOT=\path\to\epoc\root\
      * for GCCE
    makesis -d%EPOCROOT% osmo4_gcce.pkg
    signsis osmo4_gcce.SIS osmo4_gcce.SIS gpac.cer gpac.key password
      * for THUMB
    makesis -d%EPOCROOT% osmo4_thumb.pkg
    
    Note: If you need to sign the SIS with your own certificate, you may generate one with openssl:
    openssl req -new -x509 -nodes -sha1 -days 3650 -key gpac.key > gpac.cer
  
You will get a .SIS package that installs properly on a symbian device.
NOTES:
* The app and plugins are all installed in \sys\bin on the device. DO NOT change this path, since it won't work otherwise (due to symbian 9.1 caged data stuff) 
* If you create/succeed to compile a new plugin for GPAC, you must:
    - edit build/symbian/sis/osmo4_gcce.pkg to add your plugin in the installer
    - edit build/symbian/sis/GPAC.cfg to instruct the player of this new plugin (enumeration of DLLs on Symbian 9.1 is just not possible without a good amount of $$)
    
  
