在MAC10.5.5上编译给iPhoneOS2
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了在MAC10.5.5上编译给iPhoneOS2,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含6554字,纯文字阅读大概需要10分钟。
内容图文
![在MAC10.5.5上编译给iPhoneOS2](/upload/InfoBanner/zyjiaocheng/565/9ff6dc2c14b34322b0335e2ae54e99c1.jpg)
Compilation guide for pjsip on iPhone OS 2.X. Introduction This article describes the steps to generate pjsip on Mac OS X 10.5.5 Details Get pjsip source code Get PjSIP from subversion repository: svn checkout http : //svn.pjsip.org/repos/
Compilation guide for pjsip on iPhone OS 2.X.
Introduction
This article describes the steps to generate pjsip on Mac OS X 10.5.5
Details
Get pjsip source code
Get PjSIP from subversion repository:
svn checkout http
:
//svn.pjsip.org/repos/pjproject/trunk pjproject
Modify some files
aconfigure.ac
In aconfigure.ac file add the lines below displayed with '+'. Of course copy without '+' ;-)
if test "$enable_sound" = "no" ; then
true ;
else
case $target in
+ arm - apple - darwin *)
+ LIBS = "$LIBS -framework CoreAudio -framework CoreFoundation -framework AudioToolbox"
+ ac_pjmedia_snd = iphone
+ AC_MSG_RESULT ([ Checking sound device backend ... AudioQueue ])
+ ;;
* darwin *)
LIBS = "$LIBS -framework CoreAudio -framework CoreServices -framework AudioUnit -framework AudioToolbox"
if test "`uname -r`" = "6.8" ; then
build/rules.mak
In rules.mak modify, remove lines with '-' and add lines with '+':
$ ( LIB ): $ ( OBJDIRS ) $ ( OBJS ) $ ( $ ( APP ) _EXTRA_DEP )
if test ! - d $ ( LIBDIR ); then $ ( subst @@, $ ( subst /, $ ( HOST_PSEP ), $ ( LIBDIR )), $ ( HOST_MKDIR )); fi
- $ ( AR ) $ ( LIB ) $ ( OBJS )
- $ ( RANLIB ) $ ( LIB )
+ $ ( RANLIB ) - static - o $ ( LIB ) $ ( OBJS )
pjlib/include/pj/compat/os_darwinos.h
In os_darwinos.h find and comment the following lines :
/*
* Socket related
*/
//typedef int socklen_t;
Without this, you will get an error when you will compile, because socklen_t is redefined.
pjlib/include/pj/config_site.h
It can be necessary to define some macro. For example :
#undef PJ_HAS_FLOATING_POINT
#define PJ_HAS_FLOATING_POINT 1
/* SRTP has not been ported to iPhone yet */
# undef PJMEDIA_HAS_SRTP
# define PJMEDIA_HAS_SRTP 0
/* Disable some codecs for now */
# define PJMEDIA_HAS_GSM_CODEC 1
# define PJMEDIA_HAS_L16_CODEC 0
# define PJMEDIA_HAS_ILBC_CODEC 0
# define PJMEDIA_HAS_SPEEX_CODEC 0
# define PJMEDIA_HAS_G722_CODEC 0
pjmedia/build/os-auto.mak.in
In os-auto.mak.in , add the line with '+'
# - ds: Win32 DirectSound (dsound.c)
+ # - iphone: iPhone AudioQueue (iphonesound.c)
# - null: Null sound device (nullsound.c)
Add the line below, for example between "Win 32 Direct Sound" and " Null Sound Device"
#
# iPod/iPhone
#
ifeq ( $ ( AC_PJMEDIA_SND ), iphone )
export SOUND_OBJS = iphonesound . o
export CFLAGS += - DPJMEDIA_SOUND_IMPLEMENTATION = PJMEDIA_SOUND_IPHONE_SOUND
endif
We have defined a new target for sound device.
pjmedia/include/pjmedia/config.h
in config.h add the lines below with '+':
/** Constant for Win32 MME sound backend. */
#define PJMEDIA_SOUND_WIN32_MME_SOUND 3
+ /** Constant for AudioQueue sound backend. */
+ #define PJMEDIA_SOUND_IPHONE_SOUND 4
pjmedia/src/pjmedia
For the moment I didn't upload iphonesound.c so we need to compile with null_sound.
Configuration
Generate configuration script
autoconf aconfigure
.
ac
>
aconfigure
Compilation
iPhone SDK doesn't provide some programs without version number, so we create symbolic link. We should test before create link, but we are very lazy. Copy the lines below in file with name like compile.sh in the root of pjsip.
#!/bin/sh
export DEV = /Developer/ Platforms / iPhoneOS . platform / Developer
export SDK = $ { DEV }/ SDKs / iPhoneOS2 . 1.sdk
pushd $ { DEV }/ usr / bin
ln - s arm - apple - darwin9 - gcc - 4.0 . 1 arm - apple - darwin9 - gcc
ln - s arm - apple - darwin9 - g ++- 4.0 . 1 arm - apple - darwin9 - g ++
ln - s ranlib arm - apple - darwin9 - ranlib
popd
export PATH = $ { DEV }/ usr / bin : $ { PATH }
export CFLAGS = "-O2 -arch armv6 -isysroot ${SDK}"
export LDFLAGS = "-O2 -arch armv6 -isysroot ${SDK}"
export CPP = "${DEV}/usr/bin/cpp"
./ aconfigure -- host = arm - apple - darwin9 -- disable - speex - aec /
-- disable - speex - codec -- disable - l16 - codec -- disable - g722 - codec /
-- disable - ilbc - codec -- disable - ssl -- disable - sound
make dep
make
We must not forget to change access right to allow execution. We can run compile.sh after some minutes pjsip is compiled.
Siphon Compilation
Getting siphon source code
Get Siphon from subversion repository:
svn checkout http
:
//siphon.googlecode.com/svn/trunk/ siphon-read-only
Installation pjsip
Create directory to install pjsip in Siphon:
mkdir - p pjsip / include
mkdir - p pjsip / lib
Put these pjsip include directories in the pjsip/include path:
- pjlib/include
- pjlib-util/include
- pjmedia/include
- pjnath/include
- pjsip/include
Put these pjsip library directories in the pjsip/lib path:
- pjlib/lib
- pjlib-util/lib
- pjmedia/lib
- pjnath/lib
- pjsip/lib
- third_party/lib
Compilation
pushd settings
make
popd
pushd src
make
popd
For installation read the Manual .
ManualInstallation
Manual installation instructions.
Manual Installation
The preferred method of installing Siphon is through the AppTapp Installer . However, if you are unable to or prefer not to use the Installer, you can follow the steps below to install Siphon manually.
NOTE: Siphon requires firmware version 1.1.X.
Manual Installation after compilation
- Compile Siphon.
The three directories are in 'dist' directory.
- Copy Siphon.app into /Applications or /Widgets on your device. You may see some error messages during this process, are there are several symbolic links in here that the Installer source would normally deal with. You can safely ignore these errors as we will copy the files manually.
- Copy SiphonSettings.bundle into /System/Library/PreferenceBundles/SiphonSettings.bundle on your device.
- Copy SpringBoard.app into /System/Library/CoreServices/SpringBoard.app on your device.
Manual Installation after download
- Download the last version on this page .
- Unzip downloaded file in /Applications or /Widgets on your device. You may see some error messages during this process, are there are several symbolic links in here that the Installer source would normally deal with. You can safely ignore these errors as we will copy the files manually.
- Copy SiphonSettings.bundle into /System/Library/PreferenceBundles/SiphonSettings.bundle on your device.
- Copy SpringBoard.app into /System/Library/CoreServices/SpringBoard.app on your device.
Last operations
Next, run the following command to complete the installation:
/Applications/
Siphon
.
app
/
Siphon
--
installPrefBundle
Finally, restart the SpringBoard:
killall
SpringBoard
内容总结
以上是互联网集市为您收集整理的在MAC10.5.5上编译给iPhoneOS2全部内容,希望文章能够帮你解决在MAC10.5.5上编译给iPhoneOS2所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。