⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 macos.html

📁 MPlayer-mingw32-1.0rc2.zip 经典播放器源码
💻 HTML
字号:
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>12.5.聽Mac OS</title><link rel="stylesheet" href="default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="MPlayer - The Movie Player"><link rel="up" href="ports.html" title="Chapter聽12.聽Ports"><link rel="prev" href="windows.html" title="12.4.聽Windows"><link rel="next" href="exotic_platforms.html" title="12.6.聽Exotic Platforms"><link rel="preface" href="howtoread.html" title="How to read this documentation"><link rel="chapter" href="intro.html" title="Chapter聽1.聽Introduction"><link rel="chapter" href="install.html" title="Chapter聽2.聽Installation"><link rel="chapter" href="usage.html" title="Chapter聽3.聽Usage"><link rel="chapter" href="cd-dvd.html" title="Chapter聽4.聽CD/DVD usage"><link rel="chapter" href="faq.html" title="Chapter聽5.聽Frequently Asked Questions"><link rel="chapter" href="containers.html" title="Chapter聽6.聽Containers"><link rel="chapter" href="codecs.html" title="Chapter聽7.聽Codecs"><link rel="chapter" href="video.html" title="Chapter聽8.聽Video output devices"><link rel="chapter" href="audio.html" title="Chapter聽9.聽Audio output devices"><link rel="chapter" href="tv.html" title="Chapter聽10.聽TV"><link rel="chapter" href="radio.html" title="Chapter聽11.聽Radio"><link rel="chapter" href="ports.html" title="Chapter聽12.聽Ports"><link rel="chapter" href="mencoder.html" title="Chapter聽13.聽Basic usage of MEncoder"><link rel="chapter" href="encoding-guide.html" title="Chapter聽14.聽Encoding with MEncoder"><link rel="appendix" href="bugreports.html" title="Appendix聽A.聽How to report bugs"><link rel="appendix" href="bugs.html" title="Appendix聽B.聽Known bugs"><link rel="appendix" href="skin.html" title="Appendix聽C.聽MPlayer skin format"><link rel="appendix" href="history.html" title="Appendix聽D.聽History"><link rel="subsection" href="macos.html#osx_gui" title="12.5.1.聽MPlayer OS X GUI"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">12.5.聽Mac OS</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="windows.html">Prev</a>聽</td><th width="60%" align="center">Chapter聽12.聽Ports</th><td width="20%" align="right">聽<a accesskey="n" href="exotic_platforms.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="macos"></a>12.5.聽Mac OS</h2></div></div></div><p>
<span class="application">MPlayer</span> does not work on Mac OS versions before
10, but should compile out-of-the-box on Mac OS X 10.2 and up.
The preferred compiler is the Apple version of
GCC 3.x or later.
You can get the basic compilation environment by installing Apple's
<a class="ulink" href="http://developer.apple.com/tools/download/" target="_top">Xcode</a>.
If you have Mac OS X 10.3.9 or later and QuickTime 7
you can use the <tt class="option">macosx</tt> video output driver.
</p><p>
Unfortunately, this basic environment will not allow you to take advantage
of all the nice features of <span class="application">MPlayer</span>.
For instance, in order to have OSD support compiled in, you will
need to have <code class="systemitem">fontconfig</code>
and <code class="systemitem">freetype</code> libraries
installed on your machine. Contrary to other Unixes such as most
Linux and BSD variants, OS X does not have a package system
that comes with the system.
</p><p>
There are at least two to choose from:
<a class="ulink" href="http://fink.sourceforge.net/" target="_top">Fink</a> and
<a class="ulink" href="http://www.macports.org/" target="_top">MacPorts</a>.
Both of them provide about the same service (i.e. a lot of packages to
choose from, dependency resolution, the ability to simply add/update/remove
packages, etc...).
Fink offers both precompiled binary packages or building everything from
source, whereas MacPorts only offers building from source.
The author of this guide chose MacPorts for the simple fact that its basic
setup was more lightweight.
Later examples will be based on MacPorts.
</p><p>
For instance, to compile <span class="application">MPlayer</span> with OSD support:
</p><pre class="screen">sudo port install pkgconfig</pre><p>
This will install <span class="application">pkg-config</span>, which is a system for
managing library compile/link flags.
<span class="application">MPlayer</span>'s <code class="systemitem">configure</code> script
uses it to properly detect libraries.
Then you can install <span class="application">fontconfig</span> in a
similar way:
</p><pre class="screen">sudo port install fontconfig</pre><p>
Then you can proceed with launching <span class="application">MPlayer</span>'s
<code class="systemitem">configure</code> script (note the
<code class="systemitem">PKG_CONFIG_PATH</code> and <code class="systemitem">PATH</code>
environment variables so that <code class="systemitem">configure</code> finds the
libraries installed with MacPorts):
</p><pre class="screen">
PKG_CONFIG_PATH=/opt/local/lib/pkgconfig/ PATH=$PATH:/opt/local/bin/ ./configure
</pre><p>
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="osx_gui"></a>12.5.1.聽MPlayer OS X GUI</h3></div></div></div><p>
You can get a native GUI for <span class="application">MPlayer</span> together with
precompiled <span class="application">MPlayer</span> binaries for Mac OS X from the
<a class="ulink" href="http://mplayerosx.sf.net/" target="_top">MPlayerOSX</a> project, but be
warned: that project is not active anymore.
</p><p>
Fortunately, <span class="application">MPlayerOSX</span> has been taken over
by a member of the <span class="application">MPlayer</span> team.
Preview releases are available from our
<a class="ulink" href="http://mplayerhq.hu/dload.html" target="_top">download page</a>
and an official release should arrive soon.
</p><p>
In order to build <span class="application">MPlayerOSX</span> from source
yourself, you need the <code class="systemitem">mplayerosx</code>, the
<code class="systemitem">main</code> and a copy of the
<code class="systemitem">main</code> SVN module named
<code class="systemitem">main_noaltivec</code>.
<code class="systemitem">mplayerosx</code> is the GUI frontend,
<code class="systemitem">main</code> is MPlayer and
<code class="systemitem">main_noaltivec</code> is MPlayer built without AltiVec
support.
</p><p>
To check out SVN modules use:
</p><pre class="screen">
svn checkout svn://svn.mplayerhq.hu/mplayerosx/trunk/ mplayerosx
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk/ main
</pre><p>
</p><p>
In order to build <span class="application">MPlayerOSX</span> you will need to
set up something like this:
</p><pre class="screen">
MPlayer_source_directory
   |
   |---&gt;main           (MPlayer Subversion source)
   |
   |---&gt;main_noaltivec (MPlayer Subversion source configured with --disable-altivec)
   |
   \---&gt;mplayerosx     (MPlayer OS X Subversion source)
</pre><p>
You first need to build main and main_noaltivec.
</p><p>
To begin with, in order to ensure maximum backwards compatibility, set an
environment variable:
</p><pre class="screen">export MACOSX_DEPLOYMENT_TARGET=10.3</pre><p>
</p><p>
Then, configure:
</p><p>
If you configure for a G4 or later CPU with AltiVec support, do as follows:
</p><pre class="screen">
./configure --disable-gl --disable-x11
</pre><p>
If you configure for a G3-powered machine without AltiVec, use:
</p><pre class="screen">
./configure --disable-gl --disable-x11 --disable-altivec
</pre><p>
You may need to edit <tt class="filename">config.mak</tt> and change
<code class="systemitem">-mcpu</code> and <code class="systemitem">-mtune</code>
from <code class="systemitem">74XX</code> to <code class="systemitem">G3</code>.
</p><p>
Continue with
</p><pre class="screen">make</pre><p>
then go to the mplayerosx directory and type
</p><pre class="screen">make dist</pre><p>
This will create a compressed <code class="systemitem">.dmg</code> archive
with the ready to use binary.
</p><p>
You can also use the <span class="application">Xcode</span> 2.1 project;
the old project for <span class="application">Xcode</span> 1.x does
not work anymore.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="windows.html">Prev</a>聽</td><td width="20%" align="center"><a accesskey="u" href="ports.html">Up</a></td><td width="40%" align="right">聽<a accesskey="n" href="exotic_platforms.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">12.4.聽Windows聽</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">聽12.6.聽Exotic Platforms</td></tr></table></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -