Home Database Mysql Tutorial 在MAC 10.5.5 上 编译给 iPhoneOS2

在MAC 10.5.5 上 编译给 iPhoneOS2

Jun 07, 2016 pm 03:26 PM
mac compile

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:

<span><span>svn checkout http</span>
<span>:</span>
<span>//svn.pjsip.org/repos/pjproject/trunk pjproject</span>
</span>
Copy after login

Modify some files

aconfigure.ac

In aconfigure.ac file add the lines below displayed with '+'. Of course copy without '+' ;-)

<span><span> </span>
<span>if</span>
<span> test </span>
<span>"$enable_sound"</span>

<span>=</span>

<span>"no"</span>
<span>;</span>

<span>then</span>
</span>
<span><br>
<span>   </span>
</span>
<span><span>true</span>
<span>;</span>
</span>
<span><br>
<span> </span>
</span>
<span><span>else</span>
</span>
<span><br>
<span>  </span>
</span>
<span><span>case</span>
<span> $target </span>
<span>in</span>
</span>
<span><br>
</span>
<span><span>+</span>
<span>   arm</span>
<span>-</span>
<span>apple</span>
<span>-</span>
<span>darwin</span>
<span>*)</span>
</span>
<span><br>
</span>
<span><span>+</span>
<span>        LIBS</span>
<span>=</span>
<span>"$LIBS -framework CoreAudio -framework CoreFoundation -framework AudioToolbox"</span>
</span>
<span><br>
</span>
<span><span>+</span>
<span>        ac_pjmedia_snd</span>
<span>=</span>
</span>
<span><span>iphone<br>
</span>
<span>+</span>
<span>        AC_MSG_RESULT</span>
<span>([</span>
<span>Checking</span>
<span> sound device backend</span>
<span>...</span>

<span>AudioQueue</span>
<span>])</span>
</span>
<span><br>
</span>
<span><span>+</span>
<span>        </span>
<span>;;</span>
</span>
<span><br>
<span>   </span>
</span>
<span><span>*</span>
<span>darwin</span>
<span>*)</span>
</span>
<span><br>
<span>        LIBS</span>
</span>
<span><span>=</span>
<span>"$LIBS -framework CoreAudio -framework CoreServices -framework AudioUnit -framework AudioToolbox"</span>
</span>
<span><br>
<span>        </span>
</span>
<span><span>if</span>
<span> test </span>
<span>"`uname -r`"</span>

<span>=</span>

<span>"6.8"</span>
<span>;</span>

<span>then</span>
</span>

Copy after login

build/rules.mak

In rules.mak modify, remove lines with '-' and add lines with '+':

<span><span> $</span>
<span>(</span>
<span>LIB</span>
<span>):</span>
<span> $</span>
<span>(</span>
<span>OBJDIRS</span>
<span>)</span>
<span> $</span>
<span>(</span>
<span>OBJS</span>
<span>)</span>
<span> $</span>
<span>(</span>
<span>$</span>
<span>(</span>
<span>APP</span>
<span>)</span>
<span>_EXTRA_DEP</span>
<span>)</span>
</span>
<span><br>
<span>        </span>
</span>
<span><span>if</span>
<span> test </span>
<span>!</span>

<span>-</span>
<span>d $</span>
<span>(</span>
<span>LIBDIR</span>
<span>);</span>

<span>then</span>
<span> $</span>
<span>(</span>
<span>subst </span>
<span>@@,</span>
<span>$</span>
<span>(</span>
<span>subst </span>
<span>/,</span>
<span>$</span>
<span>(</span>
<span>HOST_PSEP</span>
<span>),</span>
<span>$</span>
<span>(</span>
<span>LIBDIR</span>
<span>)),</span>
<span>$</span>
<span>(</span>
<span>HOST_MKDIR</span>
<span>));</span>

<span>fi</span>
</span>
<span><br>
</span>
<span><span>-</span>
<span>       $</span>
<span>(</span>
<span>AR</span>
<span>)</span>
<span> $</span>
<span>(</span>
<span>LIB</span>
<span>)</span>
<span> $</span>
<span>(</span>
<span>OBJS</span>
<span>)</span>
</span>
<span><br>
</span>
<span><span>-</span>
<span>       $</span>
<span>(</span>
<span>RANLIB</span>
<span>)</span>
<span> $</span>
<span>(</span>
<span>LIB</span>
<span>)</span>
</span>
<span><br>
</span>
<span><span>+</span>
<span>       $</span>
<span>(</span>
<span>RANLIB</span>
<span>)</span>

<span>-</span>
<span>static</span>

<span>-</span>
<span>o $</span>
<span>(</span>
<span>LIB</span>
<span>)</span>
<span> $</span>
<span>(</span>
<span>OBJS</span>
<span>)</span>
</span>

Copy after login

pjlib/include/pj/compat/os_darwinos.h

In os_darwinos.h find and comment the following lines :

<span><span>/*<br>
 * Socket related<br>
 */</span>
</span>
<span><br>
</span>
<span><span>//typedef int socklen_t;</span>
</span>

Copy after login

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 :

<span><span>#undef PJ_HAS_FLOATING_POINT</span>
</span>
<span><br>
</span>
<span><span>#define PJ_HAS_FLOATING_POINT   1</span>
</span>
<span><br>
<br>
</span>
<span><span>/* SRTP has not been ported to iPhone yet */</span>
</span>
<span><br>
</span>
<span><span>#   undef PJMEDIA_HAS_SRTP</span>
</span>
<span><br>
</span>
<span><span>#   define PJMEDIA_HAS_SRTP             0</span>
</span>
<span><br>
<br>
</span>
<span><span>/* Disable some codecs for now */</span>
</span>
<span><br>
</span>
<span><span>#   define PJMEDIA_HAS_GSM_CODEC        1</span>
</span>
<span><br>
</span>
<span><span>#   define PJMEDIA_HAS_L16_CODEC        0</span>
</span>
<span><br>
</span>
<span><span>#   define PJMEDIA_HAS_ILBC_CODEC       0</span>
</span>
<span><br>
</span>
<span><span>#   define PJMEDIA_HAS_SPEEX_CODEC      0</span>
</span>
<span><br>
</span>
<span><span>#   define PJMEDIA_HAS_G722_CODEC       0</span>
</span>

Copy after login

pjmedia/build/os-auto.mak.in

In os-auto.mak.in , add the line with '+'

<span><span> </span>
<span>#   - ds:              Win32 DirectSound (dsound.c)</span>
</span>
<span><br>
</span>
<span><span>+</span>
<span>#   - iphone:       iPhone AudioQueue (iphonesound.c)</span>
</span>
<span><br>
<span> </span>
</span>
<span><span>#   - null:            Null sound device (nullsound.c)</span>
</span>

Copy after login

Add the line below, for example between "Win 32 Direct Sound" and " Null Sound Device"

<span><span>#</span>
</span>
<span><br>
</span>
<span><span># iPod/iPhone</span>
</span>
<span><br>
</span>
<span><span>#</span>
</span>
<span><br>
<span>ifeq </span>
</span>
<span><span>(</span>
<span>$</span>
<span>(</span>
<span>AC_PJMEDIA_SND</span>
<span>),</span>
<span>iphone</span>
<span>)</span>
</span>
<span><br>
</span>
<span><span>export</span>
<span> SOUND_OBJS </span>
<span>=</span>
<span> iphonesound</span>
<span>.</span>
</span>
<span><span>o<br>
</span>
<span>export</span>
<span> CFLAGS </span>
<span>+=</span>

<span>-</span>
<span>DPJMEDIA_SOUND_IMPLEMENTATION</span>
<span>=</span>
</span>
<span><span>PJMEDIA_SOUND_IPHONE_SOUND<br>
endif<br>
</span>
</span>

Copy after login

We have defined a new target for sound device.

pjmedia/include/pjmedia/config.h

in config.h add the lines below with '+':

<span><span> </span>
<span>/** Constant for Win32 MME sound backend. */</span>
</span>
<span><br>
<span> </span>
</span>
<span><span>#define PJMEDIA_SOUND_WIN32_MME_SOUND      3</span>
</span>
<span><br>
<br>
</span>
<span><span>+</span>
<span>/** Constant for AudioQueue sound backend. */</span>
</span>
<span><br>
</span>
<span><span>+</span>
<span>#define PJMEDIA_SOUND_IPHONE_SOUND            4</span>
</span>

Copy after login

pjmedia/src/pjmedia

For the moment I didn't upload iphonesound.c so we need to compile with null_sound.

Configuration

Generate configuration script

<span><span>autoconf aconfigure</span>
<span>.</span>
<span>ac </span>
<span>></span>
<span> aconfigure</span>
</span>

Copy after login

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.

<span><span>#!/bin/sh</span>
</span>
<span><br>
<br>
</span>
<span><span>export</span>
<span> DEV</span>
<span>=</span>
<span>/Developer/</span>
<span>Platforms</span>
<span>/</span>
<span>iPhoneOS</span>
<span>.</span>
<span>platform</span>
<span>/</span>
<span>Developer</span>
</span>
<span><br>
</span>
<span><span>export</span>
<span> SDK</span>
<span>=</span>
<span>$</span>
<span>{</span>
<span>DEV</span>
<span>}/</span>
<span>SDKs</span>
<span>/</span>
<span>iPhoneOS2</span>
<span>.</span>
<span>1.sdk</span>
</span>
<span><br>
<br>
<span>pushd $</span>
</span>
<span><span>{</span>
<span>DEV</span>
<span>}/</span>
<span>usr</span>
<span>/</span>
</span>
<span><span>bin<br>
ln </span>
<span>-</span>
<span>s arm</span>
<span>-</span>
<span>apple</span>
<span>-</span>
<span>darwin9</span>
<span>-</span>
<span>gcc</span>
<span>-</span>
<span>4.0</span>
<span>.</span>
<span>1</span>
<span> arm</span>
<span>-</span>
<span>apple</span>
<span>-</span>
<span>darwin9</span>
<span>-</span>
</span>
<span><span>gcc<br>
ln </span>
<span>-</span>
<span>s arm</span>
<span>-</span>
<span>apple</span>
<span>-</span>
<span>darwin9</span>
<span>-</span>
<span>g</span>
<span>++-</span>
<span>4.0</span>
<span>.</span>
<span>1</span>
<span> arm</span>
<span>-</span>
<span>apple</span>
<span>-</span>
<span>darwin9</span>
<span>-</span>
<span>g</span>
<span>++</span>
</span>
<span><br>
<span>ln </span>
</span>
<span><span>-</span>
<span>s ranlib arm</span>
<span>-</span>
<span>apple</span>
<span>-</span>
<span>darwin9</span>
<span>-</span>
</span>
<span><span>ranlib<br>
popd<br>
<br>
</span>
<span>export</span>
<span> PATH</span>
<span>=</span>
<span>$</span>
<span>{</span>
<span>DEV</span>
<span>}/</span>
<span>usr</span>
<span>/</span>
<span>bin</span>
<span>:</span>
<span>$</span>
<span>{</span>
<span>PATH</span>
<span>}</span>
</span>
<span><br>
<br>
</span>
<span><span>export</span>
<span> CFLAGS</span>
<span>=</span>
<span>"-O2 -arch armv6 -isysroot ${SDK}"</span>
</span>
<span><br>
<br>
</span>
<span><span>export</span>
<span> LDFLAGS</span>
<span>=</span>
<span>"-O2 -arch armv6 -isysroot ${SDK}"</span>
</span>
<span><br>
<br>
</span>
<span><span>export</span>
<span> CPP</span>
<span>=</span>
<span>"${DEV}/usr/bin/cpp"</span>
</span>
<span><br>
<br>
</span>
<span><span>./</span>
<span>aconfigure </span>
<span>--</span>
<span>host</span>
<span>=</span>
<span>arm</span>
<span>-</span>
<span>apple</span>
<span>-</span>
<span>darwin9 </span>
<span>--</span>
<span>disable</span>
<span>-</span>
<span>speex</span>
<span>-</span>
<span>aec </span>
<span>/</span>
</span>
<span><br>
<span>   </span>
</span>
<span><span>--</span>
<span>disable</span>
<span>-</span>
<span>speex</span>
<span>-</span>
<span>codec </span>
<span>--</span>
<span>disable</span>
<span>-</span>
<span>l16</span>
<span>-</span>
<span>codec </span>
<span>--</span>
<span>disable</span>
<span>-</span>
<span>g722</span>
<span>-</span>
<span>codec </span>
<span>/</span>
</span>
<span><br>
<span>   </span>
</span>
<span><span>--</span>
<span>disable</span>
<span>-</span>
<span>ilbc</span>
<span>-</span>
<span>codec </span>
<span>--</span>
<span>disable</span>
<span>-</span>
<span>ssl </span>
<span>--</span>
<span>disable</span>
<span>-</span>
</span>
<span><span>sound<br>
<br>
make dep<br>
make</span>
</span>

Copy after login

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:

<span><span>svn checkout http</span>
<span>:</span>
<span>//siphon.googlecode.com/svn/trunk/ siphon-read-only</span>
</span>

Copy after login

Installation pjsip

Create directory to install pjsip in Siphon:

<span><span>mkdir </span>
<span>-</span>
<span>p pjsip</span>
<span>/</span>
</span>
<span><span>include<br>
mkdir </span>
<span>-</span>
<span>p pjsip</span>
<span>/</span>
<span>lib</span>
</span>

Copy after login

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

<span><span>pushd settings<br>
make<br>
popd<br>
pushd src<br>
make<br>
popd</span>
</span>

Copy after login

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:

<span><span>/Applications/</span>
<span>Siphon</span>
<span>.</span>
<span>app</span>
<span>/</span>
<span>Siphon</span>

<span>--</span>
<span>installPrefBundle</span>
</span>

Copy after login

Finally, restart the SpringBoard:

<span><span>killall </span>
<span>SpringBoard</span>
</span>

Copy after login
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

No response when entering password on mac keyboard? No response when entering password on mac keyboard? Feb 20, 2024 pm 01:33 PM

Introduction: In this article, this website will introduce to you the relevant content about the Mac keyboard not responding when entering passwords. I hope it will be helpful to you, let’s take a look. How to solve the problem that the password cannot be entered on the Apple Mac system? You can also try to connect this keyboard to other computers to see if it works normally. If the same problem occurs on another computer, it's most likely a fault with the keyboard itself. You may consider replacing the keyboard or repairing it. The first time you log in to Alipay with your Mac computer, you will find the login interface and cannot enter your password. The password input field displays: "Please click here to install the control", so Alipay login requires the installation of security controls. Security controls can encrypt and protect the information you enter (amount, password, etc.) to improve account security. Tie

3 tips to easily customize your Mac computer name, host name and Bonjour name 3 tips to easily customize your Mac computer name, host name and Bonjour name Mar 06, 2024 pm 12:20 PM

Many Mac users tend to keep the default name of their device and may never consider changing it. Many people choose to stick with the name from the initial setup, such as "Johnny's MacBook Air" or simply "iMac." Learning how to change the name of your Mac is a very useful skill, especially when you have multiple devices, as it can help you quickly distinguish and manage them. Next, we will teach you step by step how to change the computer name, host name and Bonjour name (local host name) in macOS system. Why should you change your Mac name? Changing the name of your Mac can not only show your personality, but also help improve the user experience: Personalize your Mac: The default name may not be to your taste, change it to a name you like.

vmmac virtual machine full screen (how to full screen virtual machine macos) vmmac virtual machine full screen (how to full screen virtual machine macos) Feb 20, 2024 pm 01:15 PM

Preface: Many friends have asked questions about the full screen of the vmmac virtual machine. This article will give you a detailed answer for your reference. I hope it will be helpful to you! Let’s take a look! Mac virtual machine Overwatch has no screen reason: graphics card compatibility issue. If you used to run Overwatch normally but now have a black screen, it may be due to a faulty graphics driver. Solution: Check whether the graphics card supports the game requirements. Update graphics card driver. Try using a different power supply to rule out the second possibility. Check whether there are any abnormalities on the motherboard, such as whether the capacitor is bulged (may have been broken down), whether there is obvious damage to the surface of the motherboard, causing circuit interruption, etc. It is recommended to send the motherboard to a repair station for inspection. If conditions permit, you can consider replacing it with another one.

pkg file to install on mac? pkg file to install on mac? Feb 20, 2024 pm 03:21 PM

Preface: Today, this site will share with you the relevant content about installing pkg files on Mac. If it can solve the problem you are facing now, don’t forget to follow this site and start now! The previous version of macos pkg cannot be installed to upgrade the operating system: If your laptop is using an older operating system version, it is recommended to upgrade to the latest operating system version. Because older versions may not support installation of the latest macOS system. Select "Erase" in Disk Utility, then select the Macos extension in the format, do not check the encryption option, and do not select the apfs format, and finally click the "Erase" button to solve the problem of being unable to complete the macOS installation. Drag the application's icon to the file starting with App

How to set up WeChat Mac to automatically convert voice messages into text - How to set up voice to text conversion How to set up WeChat Mac to automatically convert voice messages into text - How to set up voice to text conversion Mar 19, 2024 am 08:28 AM

Recently, some friends have consulted the editor about how to set up WeChat Mac to automatically convert voice messages into text. The following is a method for setting up WeChat Mac to automatically convert voice messages into text. Friends in need can come and learn more. Step 1: First, open the Mac version of WeChat. As shown in the picture: Step 2: Next, click &quot;Settings&quot;. As shown in the picture: Step 3: Then, click &quot;General&quot;. As shown in the picture: Step 4: Then check the option &quot;Automatically convert voice messages in chat to text&quot;. As shown in the picture: Step 5: Finally, close the window. As shown in the picture:

3 Ways to Convert HEIC Photos to JPG on Mac 3 Ways to Convert HEIC Photos to JPG on Mac Mar 15, 2024 pm 08:43 PM

By default, iPhone takes photos from the camera in HEIC format. HEIC stands for High Efficiency Image Container and can hold more pixel data than PNG or JPG files, taking up significantly less space on iPhone storage compared to other formats. These files work best on iPhones but are not widely accepted on the internet because they often result in blurry/grainy pictures when you share them with non-Apple devices. To ensure that HEIC images are compatible on other devices, you may need to convert them to JPG format. This article will introduce how to convert HEIC images to JPG on Mac. How to Convert HEIC Photos to JPG on Mac [3 Methods] Method

How to change the file name on Apple Mac? How to change the file name on Apple Mac? Feb 20, 2024 pm 01:30 PM

Introduction: In this article, this site will introduce to you the relevant content on how to change the file name on Apple Mac. I hope it will be helpful to you, let’s take a look. How to rename Mac files first select the folder to be renamed, and then press the Return key, which is the Enter key. At this time, the file name editing status will appear and can be modified. After completing the modification, confirm to complete the renaming of the folder. First, after selecting the folder that needs to be renamed, press the Return key on the keyboard. At this time, you will find that the folder name becomes editable and you can modify it. After completing the modification, press the Return key to confirm, thus completing the folder renaming operation. 3. We first open the file on the computer

Can't open compressed files on mac? Can't open compressed files on mac? Feb 20, 2024 pm 02:18 PM

Introduction: This article is here to introduce you to the related content about Mac compressed files that cannot be opened. I hope it will be helpful to you, let’s take a look. Why can't I open the decompressed rar file on Mac? Since you don't have Mac decompression software, I would like to recommend a Mac version of decompression software to everyone. It is similar to commonly used compression software on Windows such as 360 Compression. Simply open the file and unzip it easily. The operation steps for Apple Mac computers that cannot open RAR files are as follows: First, install the RAR file decompression application, and you need to enter your Apple ID account and password to complete the installation. In the second step, after the installation is complete, return to the Mac desktop and double-click the RAR file to open and decompress the file contents. 3. Turn on the power

See all articles