gstreamer/subprojects/gst-docs/markdown/installing/on-mac-osx.md

107 lines
4.2 KiB
Markdown
Raw Normal View History

# Installing on Mac OS X
## Supported platforms
* 10.6 (Snow Leopard)
* 10.7 (Lion)
* 10.8 (Mountain Lion)
2016-09-16 20:45:24 +00:00
* 10.9 (Mavericks)
* 10.10 (Yosemite)
* 10.11 (El Capitan)
2016-05-16 14:30:34 +00:00
## Prerequisites
2016-05-16 14:30:34 +00:00
To develop applications using the GStreamer SDK for OS X you will need
OS X Snow Leopard (10.6) or later and
[XCode 3.2.6](https://developer.apple.com/devcenter/mac/index.action) or
later.
The recommended system is [macOS Sierra](http://www.apple.com/macosx/) with
[XCode 8](https://developer.apple.com/xcode/)
2016-05-16 14:30:34 +00:00
## Download and install the SDK
2016-05-16 14:30:34 +00:00
There are 3 sets of files in the SDK:
- The runtime files are needed to run GStreamer applications. You
probably want to distribute these files with your application (or
the installer below).
- The development files are **additional** files you need to create
2016-05-16 14:30:34 +00:00
GStreamer applications.
- Mac OS X packages that you can use
with [PackageMaker](https://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/PackageMakerUserGuide/Introduction/Introduction.html)
2016-05-16 14:30:34 +00:00
to deploy GStreamer with your application
Get **both the runtime and the development installers** from
the [GStreamer download page](https://gstreamer.freedesktop.org/download/#macos)
and **please install both of them**:
- The runtime installer is e.g. `gstreamer-1.0-{VERSION}-x86_64.pkg`, and
- The development installer is e.g. `gstreamer-1.0-devel-{VERSION}-x86_64.pkg`
> ![Warning](images/icons/emoticons/warning.svg)
> 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).
The downloads are
2016-09-16 20:45:24 +00:00
[Installer Packages
(.pkg)](http://en.wikipedia.org/wiki/Installer_%28Mac_OS_X%29).
2016-09-16 20:45:24 +00:00
Double click the package file and follow the instructions presented by
the install wizard. In case the system complains about the package not
being signed, you can control-click it and open to start the
installation. When you do this, it will warn you, but there is an option
to install anyway. Otherwise you can go to System Preferences → Security
and Privacy → General and select the option to allow installation of
packages from "anywhere".
2016-05-16 14:30:34 +00:00
These are some paths of the GStreamer framework that you might find
useful:
- /Library/Frameworks/GStreamer.framework/: Framework's root path
2016-05-16 14:30:34 +00:00
- /Library/Frameworks/GStreamer.framework/Versions: path with all the
versions of the framework
- /Library/Frameworks/GStreamer.framework/Versions/Current: link to
the current version of the framework
- /Library/Frameworks/GStreamer.framework/Headers: path with the
development headers
- /Library/Frameworks/GStreamer.framework/Commands: link to the
commands provided by the framework, such as gst-inspect-1.0 or
gst-launch-1.0
2016-05-16 14:30:34 +00:00
For more information on OS X Frameworks anatomy, you can consult the
following [link](https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html)
2016-05-16 14:30:34 +00:00
## Configure your development environment
2016-05-16 14:30:34 +00:00
### Building the tutorials
The tutorials code, along with project files and a solution file for
them all, are in the
[gst-docs](https://gitlab.freedesktop.org/gstreamer/gstreamer/-/tree/main/subprojects/gst-docs) in the
`examples/tutorials` subdirectory.
2016-05-16 14:30:34 +00:00
To start building the tutorials, create a new folder in your Documents
directory and copy the
folder `/Library/Frameworks/GStreamer.framework/Current/share/gst-sdk/tutorials`.
2016-05-16 14:30:34 +00:00
You can fire up XCode and load the project file.
2016-05-16 14:30:34 +00:00
2016-09-16 20:45:24 +00:00
Press the **Run** button to build and run the first tutorial. You can
switch the tutorial to build selecting one of the available schemes.
2016-05-16 14:30:34 +00:00
### Creating new projects
2016-06-17 22:21:42 +00:00
The GStreamer binaries provides a
2016-05-16 14:30:34 +00:00
[framework](https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Tasks/IncludingFrameworks.html)
that you can drag and drop to XCode to start using it, or using the
linker option ***-framework GStreamer****.*
2016-05-16 14:30:34 +00:00
There is a small exception to the regular use of frameworks, and you
will need to manually include the headers search
path `/Library/Frameworks/GStreamer.framework/Headers`
2016-05-16 14:30:34 +00:00
2016-09-16 20:45:24 +00:00
- XCode: Add the headers path to **Search Paths → Header Search
2016-05-16 14:30:34 +00:00
Paths**
- GCC: Using the compiler
2016-09-16 20:45:24 +00:00
option **-I/Library/Frameworks/GStreamer.framework/Headers**