mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Update README: use Markdown and add HomeBrew installation
This commit is contained in:
parent
a0248fb372
commit
f8d29baf03
1 changed files with 79 additions and 66 deletions
145
README
145
README
|
|
@ -1,97 +1,110 @@
|
|||
LINPHONE ON IPHONE
|
||||
******************************************
|
||||
# LINPHONE ON IPHONE
|
||||
|
||||
|
||||
BUILD PREQUISITES
|
||||
*****************
|
||||
## BUILD PREQUISITES
|
||||
|
||||
Linphone for iPhone depends on liblinphone sdk. This SDK is generated from makefiles and shell scripts.
|
||||
You must first install both xcode with iPhone OS SDK and MacPorts (www.macports.org) for these scripts to work.
|
||||
Linphone for iPhone depends on liblinphone SDK. This SDK is generated from makefiles and shell scripts.
|
||||
|
||||
Make sure that /opt/local/bin (macport tools) arrives first in your PATH env variable, so that the macport tools are taken in place of the versions brought by Apple in /usr/bin. Otherwise the build will fail with obscure errors.
|
||||
You must first install both Xcode with iPhone OS SDK and [HomeBrew](brew.sh) or [MacPorts](www.macports.org) for these scripts to work.
|
||||
|
||||
Once xcode and macports are installed, open a terminal and install the required build-time tools with:
|
||||
### Install dependencies
|
||||
|
||||
$ sudo port install coreutils automake autoconf libtool intltool wget pkgconfig cmake gmake yasm nasm grep doxygen ImageMagick optipng antlr3
|
||||
* Using HomeBrew:
|
||||
|
||||
```sh
|
||||
brew install automake intltool libtool pkg-config coreutils yasm nasm wget imagemagick
|
||||
```
|
||||
|
||||
* Using MacPorts:
|
||||
|
||||
```sh
|
||||
sudo port install coreutils automake autoconf libtool intltool wget pkgconfig cmake gmake yasm nasm grep doxygen ImageMagick optipng antlr3
|
||||
```
|
||||
|
||||
### System linking
|
||||
|
||||
* For this part, we assume that `LOCAL_BIN_DIR` is set as following depending on which tool you use:
|
||||
|
||||
For MacPorts: `LOCAL_BIN_DIR=/opt/local/bin`
|
||||
|
||||
For HomeBrew: `LOCAL_BIN_DIR=/usr/local/bin`
|
||||
|
||||
* Modify your `PATH` so that the tools are taken in place of the versions brought by Apple in `/usr/bin`. Otherwise the build will fail with obscure errors:
|
||||
|
||||
`export PATH=$LOCAL_BIN_DIR:$PATH`
|
||||
|
||||
* Install [gas-preprosessor.pl](http://github.com/yuvi/gas-preprocessor/) (version above July 2013) into your `LOCAL_BIN_DIR` directory
|
||||
|
||||
```sh
|
||||
wget --no-check-certificate https://raw.github.com/yuvi/gas-preprocessor/master/gas-preprocessor.pl
|
||||
chmod +x gas-preprocessor.pl
|
||||
sudo mv gas-preprocessor.pl $LOCAL_BIN_DIR
|
||||
```
|
||||
|
||||
* Link `libtoolize` to `glibtoolize`
|
||||
|
||||
`sudo ln -s $LOCAL_BIN_DIR/glibtoolize $LOCAL_BIN_DIR/libtoolize`
|
||||
|
||||
* Link host's `strings` to simulator SDK
|
||||
|
||||
`sudo ln -s /usr/bin/strings /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/strings`
|
||||
|
||||
|
||||
Install gas-preprosessor.pl version above Jully 2013 (http://github.com/yuvi/gas-preprocessor/ ) to be copied into /opt/local/bin :
|
||||
## BUILDING THE SDK
|
||||
|
||||
$ wget --no-check-certificate https://raw.github.com/yuvi/gas-preprocessor/master/gas-preprocessor.pl
|
||||
$ sudo mv gas-preprocessor.pl /opt/local/bin/.
|
||||
$ sudo chmod +x /opt/local/bin/gas-preprocessor.pl
|
||||
* GPL third parties versus non GPL third parties
|
||||
|
||||
Link macport libtoolize to glibtoolize
|
||||
|
||||
$ sudo ln -s /opt/local/bin/glibtoolize /opt/local/bin/libtoolize
|
||||
|
||||
Link host's strings to simulator SDK
|
||||
|
||||
$ sudo ln -s /usr/bin/strings /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/strings
|
||||
|
||||
|
||||
BUILDING THE SDK
|
||||
****************
|
||||
|
||||
* GPL third parties versus non GPL third parties
|
||||
|
||||
This sdk can be generated in 2 flavors. Firt is with GPL third parties, it means liblinphone includes GPL third parties like FFMPEG or x264.
|
||||
This SDK can be generated in 2 flavors. First is with GPL third parties, it means liblinphone includes GPL third parties like FFMPEG or X264.
|
||||
If you choose this flavor, your final application must comply with GPL in any case. This is the default mode.
|
||||
|
||||
To generate the liblinphone multi arch sdk in GPL mode, do:
|
||||
$ cd submodules/build
|
||||
$ make all
|
||||
|
||||
ALTERNATIVELY, you can force liblinphone to use only non GPL code except for liblinphone, mediastremer2, ortp, belle-sip.
|
||||
If you choose this flavor, your final application is still subject to GPL except if you have a commercial license for liblinphone, mediastremer2, ortp, belle-sip.
|
||||
`cd submodules/build && make all`
|
||||
|
||||
To generate the liblinphone multi arch sdkin non GPL mode, do:
|
||||
$ cd submodules/build
|
||||
$ make all enable_gpl_third_parties=no
|
||||
ALTERNATIVELY, you can force liblinphone to use only non GPL code except for liblinphone, mediastreamer2, oRTP, belle-sip.
|
||||
If you choose this flavor, your final application is still subject to GPL except if you have a commercial license for liblinphone, mediastreamer2, oRTP, belle-sip.
|
||||
|
||||
xcode prior to 4.5:
|
||||
$ make -f Makefile.xcode4.4
|
||||
To generate the liblinphone multi arch sdk in non GPL mode, do:
|
||||
|
||||
* ZRTP support
|
||||
`cd submodules/build && make all enable_gpl_third_parties=no`
|
||||
|
||||
You can disable adding "enable_zrtp=no" to the make command, for example:
|
||||
$ make all enable_zrtp=no
|
||||
* For Xcode prior to 4.5, use:
|
||||
|
||||
The resulting sdk is in liblinphone-sdk/ directory.
|
||||
`make -f Makefile.xcode4.4`
|
||||
|
||||
* ZRTP support
|
||||
|
||||
In case you upgrade your IOS SDK, you may force rebuilding everything, by doing
|
||||
$ make veryclean
|
||||
$ make all
|
||||
You can disable ZRTP support with:
|
||||
|
||||
BUILDING THE APPLICATION
|
||||
************************
|
||||
`make all enable_zrtp=no`
|
||||
|
||||
After the SDK is built, just open the linphone xcode project with Xcode, and press "Run".
|
||||
* In case you upgrade your IOS SDK, you may force rebuilding everything, by doing
|
||||
|
||||
* Note regarding third party components subject to license
|
||||
|
||||
The liblinphone-sdk is compiled with third parties code that are subject to patent license, specially: AMR, SILK G729 and H264 codecs.
|
||||
Linphone controls the embedding of these codecs thanks to the preprocessor macros HAVE_SILK, HAVE_AMR, HAVE_G729 HAVE_OPENH264 positioned in xcode project.
|
||||
Before embeding these 4 codecs in the final application, make sure to have the right to do so.
|
||||
`make veryclean && make all`
|
||||
|
||||
LIMITATIONS, KNOWN BUGS
|
||||
***********************
|
||||
**The resulting sdk is in `liblinphone-sdk/` root directory.**
|
||||
|
||||
* Video capture does not work in simulator (not implemented by simulator ?).
|
||||
## BUILDING THE APPLICATION
|
||||
|
||||
After the SDK is built, just open the Linphone Xcode project with Xcode, and press `Run`.
|
||||
|
||||
DEBUGING THE SDK
|
||||
****************
|
||||
* Note regarding third party components subject to license:
|
||||
|
||||
Sometime it can be usefull to step into liblinphone SDK funtions. To allow xcode to enable breakpoint whithin liblinphone, SDK must be built with debug symbols.
|
||||
To add debug symbol to liblinphone SDK, add make option "enable_debug=yes".
|
||||
$ make make all enable_gpl_third_parties=no enable_debug=yes
|
||||
The liblinphone-sdk is compiled with third parties code that are subject to patent license, specially: AMR, SILK G729 and H264 codecs.
|
||||
Linphone controls the embedding of these codecs thanks to the preprocessor macros HAVE_SILK, HAVE_AMR, HAVE_G729 HAVE_OPENH264 positioned in Xcode project.
|
||||
Before embedding these 4 codecs in the final application, make sure to have the right to do so.
|
||||
|
||||
## LIMITATIONS, KNOWN BUGS
|
||||
|
||||
DEBUGING MEDIASTREMMER2
|
||||
***********************
|
||||
For IOS specicific media development like audio video capture/playback it may be interresting to use mediastream test tool.
|
||||
The project submodule/liblinphone.xcodeproj can be used for this purpose.
|
||||
* Video capture does not work in simulator (not implemented by simulator?).
|
||||
|
||||
****************
|
||||
## DEBUGING THE SDK
|
||||
|
||||
Sometime it can be useful to step into liblinphone SDK functions. To allow Xcode to enable breakpoint within liblinphone, SDK must be built with debug symbols.
|
||||
To add debug symbol to liblinphone SDK, add make option `enable_debug=yes`:
|
||||
|
||||
`make all enable_gpl_third_parties=no enable_debug=yes`
|
||||
|
||||
## DEBUGING MEDIASTREAMER2
|
||||
|
||||
For iOS specific media development like audio video capture/playback it may be interesting to use `mediastream` test tool.
|
||||
The project `submodule/liblinphone.xcodeproj` can be used for this purpose.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue