Changes between Version 18 and Version 19 of Getting-Started/BB10
- Timestamp:
- Apr 16, 2013 6:10:08 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Getting-Started/BB10
v18 v19 39 39 $ CFLAGS="-O -g" ./configure-bb10 --disable-speex-aec 40 40 }}} 41 See Build Customi ation 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. 42 42 1. Or for simulator target, run '''{{{configure-bb10}}}''' with {{{--simulator}}} option" 43 43 {{{ 44 44 $ CFLAGS="-O -g" ./configure-bb10 --disable-speex-aec --simulator 45 45 }}} 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: 47 47 {{{ 48 48 #include <pj/config_site_sample.h> 49 49 }}} 50 1. Run {{{make dep}}}to build the dependencies:50 1. Run '''{{{make dep}}}''' to build the dependencies: 51 51 {{{ 52 52 $ make dep … … 54 54 55 55 56 At this point, you maybuild PJSIP simply by executing '''{{{make}}}''', but we'll show you how to import PJSIP into Momentics IDE and build it from there.56 At 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. 57 57 58 58 … … 60 60 === The pjsip.pri QMake Project File === #pjsippri 61 61 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.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. 63 63 64 64 See [#newappintegrate creating new app] section for more info. … … 70 70 This 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. 71 71 72 ==== Import PJSIP as New Project ==== 73 74 In Momentics IDE: 72 Import PJSIP as New Project: 75 73 1. Select '''File''' --> '''Import..''' 76 74 1. From the list, open '''!BlackBerry''', select '''Existing Code as !BlackBerry C/C++ Makefile Project''', and click '''Next >''' … … 82 80 1. Accept the default "Use workspace SDK selection", and click '''Finish'''. 83 81 84 ==== Create Build Configuration ==== 85 82 Create Build Configuration: 86 83 1. Right click ''pjproject'' from the '''Project Explorer''' view (tab), then select '''Build Configurations''' --> '''Manage''' from the pop-up menu. 87 84 1. In the dialog, click '''New..''' to create new build configuration … … 92 89 1. Press '''OK''' to close the "Manage Configurations" dialog 93 90 94 ==== Configure Build Configuration ==== 95 91 Configure Build Configuration: 96 92 1. Right click ''pjproject'' from the '''Project Explorer''' view (tab) and select '''Properties''' from the pop-up menu. 97 93 1. In the ''Properties for pjproject'' dialog: … … 106 102 - Click '''OK''' to close the dialog 107 103 108 ==== Build PJSIP ====109 104 110 105 Now you can build the ''pjproject'' PJSIP project. 111 106 112 107 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 119 108 120 109 [[BR]] … … 123 112 124 113 PJSIP 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 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 (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. 125 118 126 119 === Import the PjsuaBB Project === … … 131 124 1. In ''Import..'' dialog: 132 125 - 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''' 134 127 135 128 === Build PjsuaBB === 136 129 137 Just build it. 130 Just build it. You need to build the app before creating a ''Debug Configuration'' below (so that Eclipse can find the app's binary). 138 131 139 132 === Create Debug Configuration === … … 183 176 184 177 185 === Integrating PJSIP into the App=== #newappintegrate178 === Integrating PJSIP to Your Application === #newappintegrate 186 179 187 180 Integrating 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.: 190 183 {{{ 191 184 .. … … 201 194 }}} 202 195 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.196 As 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. 204 197 205 198 … … 209 202 == Multiple PJSIP Build Configurations == #multicfg 210 203 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 approachwhen building PJSIP.204 If 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. 212 205 213 206 214 207 === Option 1: Build PJSIP in Multiple Directories === 215 208 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. 209 This 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 213 You 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 221 224 222 225 … … 228 231 == Missing Separator == #missingsep 229 232 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.233 If 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}}}. 231 234 232 235 == GSM Call Interruption Problem == #gsm … … 240 243 == Unable to Get Sound Device Parameters == #snderr 241 244 242 This error happens because PJSIP is unable to open the audio capture device. Make sure you set the [#appconfig application permissions]correctly.245 This error happens because PJSIP is unable to open the audio capture device. Make sure you have ''Audio Capture'' [#appconfig application permissions] set correctly. 243 246 244 247 == Troubleshooting !BlackBerry Target Device == #targetprob … … 246 249 If you're having problems with target device, make sure that: 247 250 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 devicein Momentics251 - 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 249 252 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 250 253 - right click the target device in '''Project Explorer''', select '''!BlackBerry Tools''' --> '''Connect'''