Split out documentation into subfolders.
[platform/upstream/gstreamer.git] / markdown / installing / on-mac-osx.md
1 #  Installing on Mac OS X
2
3 ## Supported platforms
4
5  *  10.6 (Snow Leopard)
6  *  10.7 (Lion)
7  *  10.8 (Mountain Lion)
8  *  10.9 (Mavericks)
9  *  10.10 (Yosemite)
10  *  10.11 (El Capitan)
11
12 ## Prerequisites
13
14 To develop applications using the GStreamer SDK for OS X you will need
15 OS X Snow Leopard (10.6) or later and
16 [XCode 3.2.6](https://developer.apple.com/devcenter/mac/index.action) or
17 later.
18
19 The recommended system is [macOS Sierra](http://www.apple.com/macosx/) with
20 [XCode 8](https://developer.apple.com/xcode/)
21
22 ## Download and install the SDK
23
24 There are 3 sets of files in the SDK:
25
26   - The runtime files are needed to run GStreamer applications. You
27     probably want to distribute these files with your application (or
28     the installer below).
29   - The development files are **additional** files you need to create
30     GStreamer applications.
31   - Mac OS X packages that you can use
32     with [PackageMaker](https://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/PackageMakerUserGuide/Introduction/Introduction.html)
33     to deploy GStreamer with your application
34
35 Get **both the runtime and the development installers** from [here](https://gstreamer.freedesktop.org/data/pkg/osx/).
36
37
38 > ![Warning](images/icons/emoticons/warning.png)
39 > On Mac OS X 10.6 (Snow Leopard) you have to install Python 2.7 manually. It is included in later versions of OS X already. You can get it from [here](http://www.python.org/getit).
40
41 The downloads are
42 [Installer Packages
43 (.pkg)](http://en.wikipedia.org/wiki/Installer_%28Mac_OS_X%29).
44
45 Double click the package file and follow the instructions presented by
46 the install wizard. In case the system complains about the package not
47 being signed, you can control-click it and open to start the
48 installation. When you do this, it will warn you, but there is an option
49 to install anyway. Otherwise you can go to System Preferences → Security
50 and Privacy → General and select the option to allow installation of
51 packages from "anywhere".
52
53
54 These are some paths of the GStreamer framework that you might find
55 useful:
56
57   - /Library/Frameworks/GStreamer.framework/: Framework's root path
58   - /Library/Frameworks/GStreamer.framework/Versions: path with all the
59     versions of the framework
60   - /Library/Frameworks/GStreamer.framework/Versions/Current: link to
61     the current version of the framework
62   - /Library/Frameworks/GStreamer.framework/Headers: path with the
63     development headers
64   - /Library/Frameworks/GStreamer.framework/Commands: link to the
65     commands provided by the framework, such as gst-inspect-1.0 or
66     gst-launch-1.0
67
68 For more information on OS X Frameworks anatomy, you can consult the
69 following [link](https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html)
70
71 ## Configure your development environment
72
73 ### Building the tutorials
74
75 The tutorials code, along with project files and a solution file for
76 them all, are in the
77 [gst-docs](https://cgit.freedesktop.org/gstreamer/gst-docs/) in the
78 `examples/tutorials` subdirectory.
79
80 To start building the tutorials, create a new folder in your Documents
81 directory and copy the
82 folder `/Library/Frameworks/GStreamer.framework/Current/share/gst-sdk/tutorials`.
83
84 You can fire up XCode and load the project file.
85
86 Press the **Run** button to build and run the first tutorial. You can
87 switch the tutorial to build selecting one of the available schemes.
88
89 ### Creating new projects
90
91 The GStreamer binaries provides a
92 [framework](https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Tasks/IncludingFrameworks.html)
93 that you can drag and drop to XCode to start using it, or using the
94 linker option ***-framework GStreamer****.*
95
96 There is a small exception to the regular use of frameworks, and you
97 will need to manually include the headers search
98 path  `/Library/Frameworks/GStreamer.framework/Headers`
99
100   - XCode: Add the headers path to **Search Paths → Header Search
101     Paths**
102   - GCC: Using the compiler
103     option **-I/Library/Frameworks/GStreamer.framework/Headers**