Difference between revisions of "MacOSCompile"

From VideoLAN Wiki
Jump to navigation Jump to search
m (Protected "OSXCompile" [edit=sysop:move=sysop])
(updated with some fixes and enhancements)
Line 18: Line 18:
  
 
Compiling on/with earlier or later releases of Mac OS X and/or Xcode will not work for now.
 
Compiling on/with earlier or later releases of Mac OS X and/or Xcode will not work for now.
 +
 +
Additionally, you may need to install Subversion on your Mac. If you are unsure about this, enter "svn" to the Terminal to see if you get "command not found" or not.
  
 
=== Get the source ===
 
=== Get the source ===
Download the {{VLC}} [[GetTheSource|source code]] (using [[subversion]]) as described on the [[GetTheSource| "Get the source"]] page.
+
Download the {{VLC}} [[GetTheSource|source code]] (using [[subversion]]) as described on the [[GetTheSource| "Get the source"]] page or get a recent source tarball. Note that the 3rd party libraries will probably break a few months after the release's publication.
  
 
=== Build external libs ===
 
=== Build external libs ===
Line 32: Line 34:
 
* cd to the extras/contrib subdir of VLC and execute <code>./bootstrap</code>
 
* cd to the extras/contrib subdir of VLC and execute <code>./bootstrap</code>
 
* Now execute <code>make src</code>. This will download and compile all the required external libraries and programs. You will only have to do this once. (You can do it again if required libraries are added or updated by the team.)
 
* Now execute <code>make src</code>. This will download and compile all the required external libraries and programs. You will only have to do this once. (You can do it again if required libraries are added or updated by the team.)
''Note that the Mac OS X 10.3.9 SDK is required for the default compilation of this contributed code. If you encounter problems, make sure that your default GCC version is set to 4.''
+
''Note that some SDKs are required for the default compilation of this contributed code. On PowerPC-based Macs that is 10.3.9 and on Intel-based ones that is 10.4u respectively. If you encounter problems, make sure that your default GCC version is set to 4 and your Xcode installation's version is 2.4.x or later, but previous to Xcode 3.''
  
 
=== Prepare the VLC build ===
 
=== Prepare the VLC build ===
Line 47: Line 49:
 
''Notice this is ALWAYS for the subversion version. It might not work with older versions.''
 
''Notice this is ALWAYS for the subversion version. It might not work with older versions.''
  
You can add --with-mozilla-sdk-path=./extras/contrib/src/gecko-sdk --enable-mozilla to the configure-line to enable the compilation of VLC's Safari/Firefox plugin.
+
You can add <code>--with-mozilla-sdk-path=./extras/contrib/src/gecko-sdk --enable-mozilla</code> to the configure-line to enable the compilation of VLC's Safari/Firefox plugin.
  
 
=== Build VLC ===
 
=== Build VLC ===
After configure is finished, we can finally build {{VLC}}. A simple <code>make</code> will do the trick.
+
After configure is finished, we can finally build {{VLC}}. A simple <code>make</code> will do the trick. If you want to use the resulting application package on a different Mac or a different account on the same Mac, run <code>make VLC-release.app</code> afterwards. Use the resulting ''VLC-release.app'' for these purposes.
  
 
== History ==
 
== History ==
Written by Jean-Alexis Montignies, Felix Paul Kühne and Derk-Jan Hartman, for the VideoLAN Team.
+
Written by Jean-Alexis Montignies, [[User:Fkuehne|Felix Paul Kühne]] and Derk-Jan Hartman, for the VideoLAN Team.
 
Adapted to the Wiki by [[User:j-b|Jean-Baptiste Kempf]].
 
Adapted to the Wiki by [[User:j-b|Jean-Baptiste Kempf]].
  
 
[[Category:Building]]
 
[[Category:Building]]
 
[[Category:Coding]]
 
[[Category:Coding]]

Revision as of 19:47, 1 February 2007

Compile VLC on Mac OS X

Compiling VLC media player on Mac OS X is different from normal linux compiling and OS X compiling. We do not use Xcode, but a simple ./configure and then make isn't enough either. The instructions below are always for the currently unstable, non-released code.

If you compile from Subversion then please remember that this code can often be in an unstable state. If you wish to develop or test please join the vlc-devel mailinglist.

Don't put any of the non-released test binaries or svn-compiles on software sites or on user-forums. We have had bad experiences with this before and we do not appreciate it.

Steps

Please follow these steps for compiling:

Set the development environment

Install the Mac OSX developer tools from the Developer Tools CD, or get them online.

You need Mac OS X 10.4.x and Xcode 2.4.x for compilation.

Compiling on/with earlier or later releases of Mac OS X and/or Xcode will not work for now.

Additionally, you may need to install Subversion on your Mac. If you are unsure about this, enter "svn" to the Terminal to see if you get "command not found" or not.

Get the source

Download the VLC media player source code (using subversion) as described on the "Get the source" page or get a recent source tarball. Note that the 3rd party libraries will probably break a few months after the release's publication.

Build external libs

We now need to build the 3rd party libs. For that, you will need to:

  • cd to the source directory with your Terminal application.
  • If you have fink, then you will need to disable it. VLC media player has it's own form of Fink (in the extras/contrib subdir) and it can conflict with Fink. We use this system to generate a reliable, consistent and known amount of packages that VLC media player requires.

To disable Fink comment the line: #source /sw/bin/init.csh in your .cshrc file or . /sw/bin/init.csh in your .bashrc file in your home-directory.

  • cd to the extras/contrib subdir of VLC and execute ./bootstrap
  • Now execute make src. This will download and compile all the required external libraries and programs. You will only have to do this once. (You can do it again if required libraries are added or updated by the team.)

Note that some SDKs are required for the default compilation of this contributed code. On PowerPC-based Macs that is 10.3.9 and on Intel-based ones that is 10.4u respectively. If you encounter problems, make sure that your default GCC version is set to 4 and your Xcode installation's version is 2.4.x or later, but previous to Xcode 3.

Prepare the VLC build

Now we return to VLC itself. Go back to the top level VLC source directory. If you use Subversion (which you really should), then run ./bootstrap.

This will create configure and Makefiles for VLC media player (snapshots and releases already include this).

Configure the VLC build

The next step is to configure, in the top level VLC source directory.

./configure --enable-debug --disable-x11 --disable-xvideo --disable-glx --enable-sdl --enable-mad --enable-libdvbpsi --enable-a52 --disable-dvdplay --enable-dvdnav --enable-dvdread --enable-ffmpeg --enable-faad --enable-flac --enable-vorbis --enable-speex --enable-theora --enable-ogg --enable-shout --enable-cddb --disable-cddax --enable-vcdx --disable-skins --disable-skins2 --disable-wxwidgets --enable-freetype --enable-fribidi --enable-caca --enable-live555 --enable-dts --enable-goom --enable-modplug --enable-gnutls --enable-daap --enable-ncurses --enable-libtwolame --enable-x264 --enable-png --enable-realrtsp --disable-libtool

Notice this is ALWAYS for the subversion version. It might not work with older versions.

You can add --with-mozilla-sdk-path=./extras/contrib/src/gecko-sdk --enable-mozilla to the configure-line to enable the compilation of VLC's Safari/Firefox plugin.

Build VLC

After configure is finished, we can finally build VLC media player. A simple make will do the trick. If you want to use the resulting application package on a different Mac or a different account on the same Mac, run make VLC-release.app afterwards. Use the resulting VLC-release.app for these purposes.

History

Written by Jean-Alexis Montignies, Felix Paul Kühne and Derk-Jan Hartman, for the VideoLAN Team. Adapted to the Wiki by Jean-Baptiste Kempf.