Changes between Version 18 and Version 19 of Getting-Started/BB10


Ignore:
Timestamp:
Apr 16, 2013 6:10:08 AM (12 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Getting-Started/BB10

    v18 v19  
    3939$ CFLAGS="-O -g" ./configure-bb10 --disable-speex-aec 
    4040 }}} 
    41  See Build Customiation section in [wiki:Getting-Started/Autoconf#BuildCustomizations Building with GNU] page or run '''{{{./configure --help}}}''' for more customization info. 
     41 See Build Customization section in [wiki:Getting-Started/Autoconf#BuildCustomizations Building with GNU] page or run '''{{{./configure --help}}}''' for more customization info. 
    4242 1. Or for simulator target, run '''{{{configure-bb10}}}''' with {{{--simulator}}} option"  
    4343 {{{ 
    4444$ CFLAGS="-O -g" ./configure-bb10 --disable-speex-aec --simulator 
    4545 }}} 
    46  1. We suggest to fill in your '''{{{config_site.h}}}''' ({{{pjlib/include/pj/config-site.h}}} file) with the following: 
     46 1. We suggest to fill in your '''{{{config_site.h}}}''' ({{{pjlib/include/pj/config_site.h}}} file) with the following: 
    4747 {{{ 
    4848#include <pj/config_site_sample.h> 
    4949 }}} 
    50  1. Run {{{make dep}}} to build the dependencies: 
     50 1. Run '''{{{make dep}}}''' to build the dependencies: 
    5151 {{{ 
    5252$ make dep 
     
    5454 
    5555 
    56 At this point, you may build PJSIP simply by executing '''{{{make}}}''', but we'll show you how to import PJSIP into Momentics IDE and build it from there. 
     56At this point, you can build PJSIP simply by executing '''{{{make}}}''', but we'll show you how to import PJSIP into Momentics IDE and build it from there. 
    5757 
    5858 
     
    6060=== The pjsip.pri QMake Project File === #pjsippri 
    6161 
    62 The {{{configure-bb10}}} script above also creates '''pjsip.pri''' at the root of PJSIP directory. This file contains PJSIP build settings in QMake project (.pro) file format, which can be included in application's '''.pro''' file to build with PJSIP. 
     62The {{{configure-bb10}}} script above also creates '''{{{pjsip.pri}}}''' at the root of PJSIP directory. This file contains PJSIP build settings in QMake project (.pro) file format, which can be included in application's '''.pro''' file to build with PJSIP. 
    6363 
    6464See [#newappintegrate creating new app] section for more info. 
     
    7070This is optional, as you can just run '''{{{make}}}''' in PJSIP directory to build PJSIP. But nevertheless this is a lot more convenient especially if you are developing PJSIP. 
    7171 
    72 ==== Import PJSIP as New Project ==== 
    73  
    74 In Momentics IDE: 
     72Import PJSIP as New Project: 
    7573 1. Select '''File''' --> '''Import..''' 
    7674 1. From the list, open '''!BlackBerry''', select '''Existing Code as !BlackBerry C/C++ Makefile Project''', and click '''Next >''' 
     
    8280 1. Accept the default "Use workspace SDK selection", and click '''Finish'''. 
    8381 
    84 ==== Create Build Configuration ==== 
    85  
     82Create Build Configuration: 
    8683 1. Right click ''pjproject'' from the '''Project Explorer''' view (tab), then select '''Build Configurations''' --> '''Manage''' from the pop-up menu. 
    8784 1. In the dialog, click '''New..''' to create new build configuration 
     
    9289 1. Press '''OK''' to close the "Manage Configurations" dialog 
    9390 
    94 ==== Configure Build Configuration ==== 
    95  
     91Configure Build Configuration: 
    9692 1. Right click ''pjproject'' from the '''Project Explorer''' view (tab) and select '''Properties''' from the pop-up menu. 
    9793 1. In the ''Properties for pjproject'' dialog: 
     
    106102     - Click '''OK''' to close the dialog 
    107103 
    108 ==== Build PJSIP ==== 
    109104 
    110105Now you can build the ''pjproject'' PJSIP project. 
    111106 
    112107 
    113 [[BR]] 
    114  
    115 == Configuring the Device and Momentics IDE == 
    116  
    117 For the rest of this tutorial, we will assume that you already have the IDE and target device (or simulator) configured for debugging BB10 native applications. If not, follow [https://developer.blackberry.com/native/documentation/bb10/com.qnx.doc.native_sdk.quickstart/topic/set_up_your_environment.html these instructions] from !BlackBerry developer site. 
    118  
    119108 
    120109[[BR]] 
     
    123112 
    124113PJSIP comes with a fully featured pjsua application which runs on all platforms that PJSIP supports including BB10.  
     114 
     115=== Configuring the Device and Momentics IDE === #setup 
     116 
     117For the rest of this tutorial, we will assume that you already have the IDE and target device (or simulator) configured for debugging BB10 native applications (any native applications, not just PJSIP). If not, follow [https://developer.blackberry.com/native/documentation/bb10/com.qnx.doc.native_sdk.quickstart/topic/set_up_your_environment.html these instructions] from !BlackBerry developer site. 
    125118 
    126119=== Import the PjsuaBB Project === 
     
    131124 1. In ''Import..'' dialog: 
    132125    - Select root directory: '''{{{$PJ_DIR/pjsip-apps/src/pjsua/bb10}}}''' 
    133  Once you select the directory, '''PjsuaBB''' will appear under ''Projects'' list in the dialog. Make sure it is selected (by default it is). Click '''Finish''' 
     126 Once you select the directory, '''PjsuaBB''' will appear under ''Projects'' list in the dialog. Make sure it is checked (the default). Click '''Finish''' 
    134127 
    135128=== Build PjsuaBB === 
    136129 
    137 Just build it. 
     130Just build it. You need to build the app before creating a ''Debug Configuration'' below (so that Eclipse can find the app's binary). 
    138131 
    139132=== Create Debug Configuration === 
     
    183176 
    184177 
    185 === Integrating PJSIP into the App ===  #newappintegrate 
     178=== Integrating PJSIP to Your Application ===  #newappintegrate 
    186179 
    187180Integrating PJSIP settings into the app is very easy: 
    188  1. Open the app's '''.pro''' file (e.g. {{{PjsipBB.pro}}} for PjsipBB app) 
    189  1. Include '''pjsip.pri''' file in the relevant target section, e.g.: 
     181 1. Open the app's '''.pro''' QMake project file 
     182 1. Include '''{{{pjsip.pri}}}''' file in the relevant target section, e.g.: 
    190183 {{{ 
    191184.. 
     
    201194 }}} 
    202195 
    203 The '''pjsip.pri''' file is generated by {{{configure-bb10}}} script (as explained [#pjsippri above]) and contains compilation and link flags to integrate PJSIP with your app.  
     196As explained [#pjsippri above], the '''{{{pjsip.pri}}}''' file is generated by {{{configure-bb10}}} script and contains compilation and link flags to integrate PJSIP with your app.  
    204197 
    205198 
     
    209202== Multiple PJSIP Build Configurations == #multicfg 
    210203 
    211 If you want to have multiple PJSIP build configurations for your app (for example, Device-Debug, Device-Release, and/or Simulator), you can use the following approach when building PJSIP. 
     204If you want to have multiple PJSIP build configurations for your app (for example, Device-Debug, Device-Release, and/or Simulator), you can use one of the following approaches when building PJSIP. 
    212205 
    213206 
    214207=== Option 1: Build PJSIP in Multiple Directories === 
    215208 
    216 This is of course the easiest, just extract or checkout PJSIP in multiple locations, configure it differently, build, and include the right '''pjsip.pri''' file in the relevant section of you application's QMake '''.pro''' file. 
    217  
    218 === Option 2: Checkout Once, Configure Build and Install Several Times === 
    219  
    220 The second option is to checkout PJSIP in one directory, but configure, build, and install it several times, each with separate build settings and to different install '''{{{--prefix}}}'''. Once the build completes, run {{{make install}}} to install PJSIP development headers and libraries to the installation prefix. You also need to edit the contents of {{{pjsip.pri}}} file, point the path to the right prefix, and rename the {{{pjsip.pri}}} to something more appropriate (e.g. {{{pjsip-device-debug.pri}}}). You then include this .pri file in the relevant section of your application's QMake {{{.pro}}} file. 
     209This is of course the easiest, just extract or checkout PJSIP to multiple locations, configure it differently, build, and include '''{{{pjsip.pri}}}''' file from the right location to the relevant section of you application's QMake '''.pro''' file. 
     210 
     211=== Option 2: Install PJSIP in Multiple Directories === 
     212 
     213You can use this option if you don't want to checkout PJSIP to multiple directories (for example, to simplify development): 
     214 1. Checkout PJSIP to a directory 
     215 2. Configure with the right settings for the target 
     216 3. Set a specific directory as '''{{{--prefix}}}''' argument to {{{./configure-bb10}}}. This is where PJSIP will be installed to 
     217 4. Build 
     218 5. Run '''{{{make install}}}''' to install PJSIP header and lib files to the installation directory as specified by {{{"--prefix"}}} option. 
     219 6. Edit {{{pjsip.pri}}} file, change the paths to point to the installation directory. 
     220 7. Rename {{{pjsip.pri}}} to something more appropriate, e.g. {{{pjsip-device-debug.pri}}} 
     221 8. Include {{{pjsip-device-debug.pri}}} in the relevant section of your {{{.pro}}} file. 
     222 9. Repeat from step 2 for each target 
     223 
    221224 
    222225 
     
    228231== Missing Separator == #missingsep 
    229232 
    230 If you forgot to run '''{{{source bbndk-env.sh}}}''' (as explained [#ndk above]) before running {{{make dep}}}, the dependency files will get corrupted with the ''' "!** missing separator" ''' error and you'll have to delete each of those dependency files manually. 
     233If you forgot to run '''{{{source bbndk-env.sh}}}''' (as explained [#ndk above]) before running {{{make dep}}}, the dependency files will get corrupted and '''{{{make}}}''' will fail with ''' "!** missing separator" ''' error. If this happens, you'll have to delete each of those dependency files manually and re-run {{{make dep}}}. 
    231234 
    232235== GSM Call Interruption Problem == #gsm 
     
    240243== Unable to Get Sound Device Parameters == #snderr 
    241244 
    242 This error happens because PJSIP is unable to open the audio capture device. Make sure you set the [#appconfig application permissions] correctly. 
     245This error happens because PJSIP is unable to open the audio capture device. Make sure you have ''Audio Capture'' [#appconfig application permissions] set correctly. 
    243246 
    244247== Troubleshooting !BlackBerry Target Device == #targetprob 
     
    246249If you're having problems with target device, make sure that: 
    247250 1. Development mode is turned ON on the device (''Settings'' --> ''Security and Privacy'' --> ''Development Mode'') 
    248     - Otherwise when you connect the USB you'll have a random IP address and you are not able to connect to target device in Momentics 
     251    - Otherwise when you connect the USB you'll have a random IP address and you will not be able to connect to it in Momentics 
    249252 1. You can connect to !BlackBerry target device in Momentics IDE. A !BlackBerry target device will be named something like ''usb'' or ''usb1'' if you're connecting via USB 
    250253    - right click the target device in '''Project Explorer''', select '''!BlackBerry Tools''' --> '''Connect'''