Update deploying sections

This commit is contained in:
Olivier Crête 2016-06-17 17:20:43 -04:00
parent 3d0883c6ef
commit e3511e3a2a
8 changed files with 286 additions and 817 deletions

View file

@ -9,10 +9,6 @@ Pages to review:
- sdk-installing-on-linux.md - sdk-installing-on-linux.md
- sdk-installing-on-mac-osx.md - sdk-installing-on-mac-osx.md
- sdk-installing-on-windows.md - sdk-installing-on-windows.md
- sdk-deploying-your-application.md
- sdk-windows-deployment.md
- sdk-mac-osx-deployment.md
- sdk-multiplatform-deployment-using-cerbero.md
Screenshots: Screenshots:
@ -71,6 +67,10 @@ Reviewed pages:
- sdk-basic-tutorial-hello-world.md - sdk-basic-tutorial-hello-world.md
- sdk-gst-inspect.md - sdk-gst-inspect.md
- gst-launch.md - gst-launch.md
- sdk-deploying-your-application.md
- sdk-windows-deployment.md
- sdk-mac-osx-deployment.md
- sdk-multiplatform-deployment-using-cerbero.md
For-later pages: For-later pages:
- sdk-qt-tutorials.md [tpm: this should all be rewritten from scratch with qmlglsink; QtGStreamer is outdated and unmaintained, we should not promote it] - sdk-qt-tutorials.md [tpm: this should all be rewritten from scratch with qmlglsink; QtGStreamer is outdated and unmaintained, we should not promote it]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

View file

@ -1,5 +1,5 @@
--- ---
short-description: Deploy the SDK with your application short-description: Deploy GStreamer with your application
... ...
# Deploying your application # Deploying your application
@ -10,7 +10,7 @@ installer. You have several options here, and, even though this subject
is not really in the scope of this documentation, we will give some is not really in the scope of this documentation, we will give some
hints to try to help you. hints to try to help you.
# Multiplatform vs. single-platform packaging system ## Multiplatform vs. single-platform packaging system
The first choice you need to make is whether you want to deploy your The first choice you need to make is whether you want to deploy your
application to more than one platform. If yes, then you have the choice application to more than one platform. If yes, then you have the choice
@ -33,8 +33,8 @@ pros and cons of each option.
</thead> </thead>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td><p><strong><span style="color: rgb(0,0,0);">Multiplatform packaging </span></strong><span style="color: rgb(0,0,0);"><strong>system</strong></span></p> <td><p><strong>Multiplatform packaging system</strong></p>
<p><span style="color: rgb(0,0,0);"> </span>The same system is used to package your application for all platforms</p></td> <p>The same system is used to package your application for all platforms</p></td>
<td><ul> <td><ul>
<li><p>You only need to develop your packaging system once, and it works for all supported platforms.</p></li> <li><p>You only need to develop your packaging system once, and it works for all supported platforms.</p></li>
</ul></td> </ul></td>
@ -46,24 +46,24 @@ pros and cons of each option.
<td><p><strong>Single-platform packaging system</strong></p> <td><p><strong>Single-platform packaging system</strong></p>
<p>Your application is packaged using a different system on each platform.</p></td> <p>Your application is packaged using a different system on each platform.</p></td>
<td><ul> <td><ul>
<li><p>You can make use of all the advantages each <span>packaging </span>system can offer.</p> <li><p>You can make use of all the advantages each packaging system can offer.</p>
<p> </p></li> </li>
</ul></td> </ul></td>
<td><ul> <td><ul>
<li><p>You need to develop a new <span>packaging </span>system for each supported platform.</p></li> <li><p>You need to develop a new packaging system for each supported platform.</p></li>
</ul></td> </ul></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
The GStreamer SDK itself supports three different platforms (Linux, Mac GStreamer itself supports many different platforms (Linux, iOS, Android, Mac
OS X and Windows) and has been built using a multiplatform packaging OS X, Windows, etc) and has been built using a multiplatform packaging
system named **Cerbero**, which is available for you to use, should you system named **Cerbero**, which is available for you to use, should you
choose to go down this route. choose to go down this route.
# Shared vs. private GStreamer deployment ## Shared vs. private GStreamer deployment
You can install the GStreamer SDK in the target machine in the same way You can install GStreamer in the target machine in the same way
you installed it in your development machine, you can deploy it you installed it in your development machine, you can deploy it
privately, or you can even customize it before deploying. Here you have privately, or you can even customize it before deploying. Here you have
a few options: a few options:
@ -76,43 +76,43 @@ a few options:
</colgroup> </colgroup>
<thead> <thead>
<tr class="header"> <tr class="header">
<th> </th> <th></th>
<th>Pros</th> <th>Pros</th>
<th>Cons</th> <th>Cons</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td><p><strong>Shared SDK</strong></p> <td><p><strong>Shared GStreamer</strong></p>
<p>The GStreamer SDK is installed independently of your application, as a prerequisite, in a common place in the target computer (<code>C:\Program Files</code>, for example). You application uses an environment variable to locate it.</p></td> <p>GStreamer is installed independently of your application, as a prerequisite, in a common place in the target computer (<code>C:\Program Files</code>, for example). You application uses an environment variable to locate it.</p></td>
<td><ul> <td><ul>
<li><p>If more than one application in the target computer uses the SDK, it is installed only once and shared, reducing disk usage.</p></li> <li>If more than one application in the target computer uses GStreamer, it is installed only once and shared, reducing disk usage.</li>
</ul></td> </ul></td>
<td><ul> <td><ul>
<li>Tampering or corruption of the shared SDK installation can make your application fail.</li> <li>Tampering or corruption of the shared GStreamer installation can make your application fail.</li>
<li><p>The SDK libraries are unprotected and open to tampering.</p></li>
</ul></td> </ul></td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td><p><strong>Private SDK with dynamic linking</strong></p> <td><p><strong>Private GStreamer with dynamic linking</strong></p>
<p>Your application deploys the GStreamer SDK to a private folder.</p></td> <p>Your application deploys GStreamer to a private folder.</p></td>
<td><ul> <td><ul>
<li><p>Your SDK is independent of other applications, so it does not get corrupted if other applications mess with their installations.</p></li> <li>Your GStreamer is independent of other applications, so it does not get corrupted if other applications mess with their installations.</li>
</ul></td> </ul></td>
<td><ul> <td><ul>
<li><p>If multiple applications in the target computer use the GStreamer SDK, it wont be shared, consuming more disk space.</p></li> <li>If multiple applications in the target computer use GStreamer, it wont be shared, consuming more disk space.</li>
<li><p>The SDK libraries are unprotected and open to tampering.</p></li>
</ul></td> </ul></td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td><p><strong>Private SDK with static linking</strong></p> <td><p><strong>Private GStreamer with static linking</strong></p>
<p>Your application links statically against the GStreamer SDK, so it effectively becomes part of your application binary.</p></td> <p>Your application links statically against GStreamer, so it effectively becomes part of your application binary.</p></td>
<td><ul> <td><ul>
<li>Your SDK is independent of other applications, so it does not get corrupted if other applications mess with their installations.</li> <li>Your GStreamer is independent of other applications, so it does not get corrupted if other applications mess with their installations.</li>
<li>It is much harder to tamper with the SDK, since it is embedded in your application.</li> <li>Deployment for ordinary users is easier as you have fewer files.</li>
<li>This is your only choice on iOS.</li>
</ul></td> </ul></td>
<td><ul> <td><ul>
<li><span>If multiple applications in the target computer use the GStreamer SDK, it wont be shared, consuming more disk space.</span></li> <li>If multiple applications in the target computer use GStreamer, it wont be shared, consuming more disk space.</li>
<li>You need to provide the required files for your users to re-link your application against a modified GStreamer as required by the license.</li>
</ul></td> </ul></td>
</tr> </tr>
</tbody> </tbody>
@ -122,9 +122,7 @@ The following pages give further directions for some of the above
options. options.
- Platform-specific packaging methods: - Platform-specific packaging methods:
- For [Mac OS X](Mac%2BOS%2BX%2Bdeployment.html) - For [Mac OS X](sdk-mac-osx-deployment.md)
- For [Windows](Windows%2Bdeployment.html) - For [Windows](sdk-windows-deployment.md)
- [Multiplatform deployment using - [Multiplatform deployment using
Cerbero](Multiplatform%2Bdeployment%2Busing%2BCerbero.html) Cerbero](sdk-multiplatform-deployment-using-cerbero.md)
 

View file

@ -6,10 +6,10 @@ short-description: Download and install GStreamer
## Choose your platform by clicking on the corresponding logo ## Choose your platform by clicking on the corresponding logo
[![](attachments/1540163.png)](sdk-installing-on-mac-osx.md) [![](attachments/mac.png)](sdk-installing-on-mac-osx.md)
[![](attachments/1540164.png)](sdk-installing-on-windows.md) [![](attachments/windows.png)](sdk-installing-on-windows.md)
[![](attachments/2654239.png)](sdk-installing-for-android-development.md) [![](attachments/android.png)](sdk-installing-for-android-development.md)
[![](attachments/3539150.jpeg)](sdk-installing-for-ios-development.md) [![](attachments/ios.jpeg)](sdk-installing-for-ios-development.md)
## Linux ## Linux

View file

@ -1,45 +1,40 @@
# Mac OS X deployment # Mac OS X deployment
This page explains how to deploy GStreamer along your application. There This page explains how to deploy GStreamer along your application. There
are different mechanisms, which have been reviewed in [Deploying your are different mechanisms, which have been reviewed in [](sdk-deploying-your-application.md). The details for some
application](Deploying%2Byour%2Bapplication.html). The details for some
of the mechanisms are given here, and more options might be added to of the mechanisms are given here, and more options might be added to
this documentation in the future. this documentation in the future.
The recommended tool to create installer packages for Mac OS X **FIXME: PackageMaker is dead we need a new solution **
is [PackageMaker](http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/PackageMakerUserGuide/Introduction/Introduction.html),
provided with the [XCode developer
tools](https://developer.apple.com/technologies/tools/).
# Shared GStreamer ## Shared GStreamer
This is the easiest way to deploy GStreamer, although most of the time This is the easiest way to deploy GStreamer, although most of the time
it installs unnecessary files which grow the size of the installer and it installs unnecessary files which grow the size of the installer and
the target drive free space requirements. Since the SDK might be shared the target drive free space requirements. Since GStreamer might be shared
among all applications that use it, though, the extra space requirements among all applications that use it, though, the extra space requirements
are somewhat blurred.![](attachments/2097292/2424841.png) are somewhat blurred.
![](attachments/thumbnails/2097292/2424842)
With PackageMaker, simply add the GStreamer SDK  **runtime ** disk image With PackageMaker, simply add GStreamer **runtime ** disk image
 ([the same one you used to install the runtime in your development ([the same one you used to install the runtime in your development
machine](Installing%2Bon%2BMac%2BOS%2BX.html)) inside your installer machine](sdk-installing-on-mac-osx.md)) inside your installer
package and create a post-install script that mounts the disk image and package and create a post-install script that mounts the disk image and
installs the SDK package. You can use the following example, where you installs GStreamer package. You can use the following example, where you
should replace `$INSTALL_PATH` with the path where your installer copied should replace `$INSTALL_PATH` with the path where your installer copied
the SDK's disk image files (the `/tmp` directory is good place to GStreamer's disk image files (the `/tmp` directory is good place to
install it as it will be removed at the end of the installation): install it as it will be removed at the end of the installation):
``` bash ``` bash
hdiutil attach $INSTALL_PATH/gstreamer-sdk-2012.7-x86.dmg hdiutil attach $INSTALL_PATH/gstreamer-1.0-1.8.1-x86_64-packages.dmg
cd /Volumes/gstreamer-sdk-2012.7-x86/ cd /Volumes/gstreamer-1.0-1.8.1-x86_64/
installer -pkg gstreamer-sdk-2012.7-x86.pkg -target "/" installer -pkg gstreamer-1.0-1.8.1-x86_64.pkg -target "/"
hdiutil detach /Volumes/gstreamer-sdk-2012.7-x86/ hdiutil detach /Volumes/gstreamer-1.0-1.8.1-x86_64/
rm $INSTALL_PATH/gstreamer-sdk-2012.7-x86.dmg rm $INSTALL_PATH/gstreamer-1.0-1.8.1-x86_64-packages.dmg
``` ```
# Private deployment of GStreamer ## Private deployment of GStreamer
You can decide to distribute a private copy of the SDK with your You can decide to distribute a private copy of GStreamer with your
application, although it's not the recommended method. In this case, application, although it's not the recommended method. In this case,
simply copy the framework to the application's Frameworks folder as simply copy the framework to the application's Frameworks folder as
defined in the [bundle programming defined in the [bundle programming
@ -49,7 +44,7 @@ guide](https://developer.apple.com/library/mac/documentation/CoreFoundation/Conc
cp -r /Library/Frameworks/GStreamer.framework ~/MyApp.app/Contents/Frameworks cp -r /Library/Frameworks/GStreamer.framework ~/MyApp.app/Contents/Frameworks
``` ```
Note that you can have several versions of the SDK, and targeting Note that you can have several versions of GStreamer, and targeting
different architectures, installed in the system. Make sure you only different architectures, installed in the system. Make sure you only
copy the version you need and that you update accordingly the link copy the version you need and that you update accordingly the link
`GStreamer.framework/Version/Current`: `GStreamer.framework/Version/Current`:
@ -59,18 +54,18 @@ $ ls -l Frameworks/GStreamer.framework/Version/Current
lrwxr-xr-x 1 fluendo staff 21 Jun 5 18:46 Frameworks/GStreamer.framework/Versions/Current -> ../Versions/0.10/x86 lrwxr-xr-x 1 fluendo staff 21 Jun 5 18:46 Frameworks/GStreamer.framework/Versions/Current -> ../Versions/0.10/x86
``` ```
Since the SDK will be relocated, you will need to follow the Since GStreamer will be relocated, you will need to follow the
instructions on how to relocate the SDK at the end of this page. instructions on how to relocate GStreamer at the end of this page.
# Deploy only necessary files, by manually picking them ## Deploy only necessary files, by manually picking them
On the other side of the spectrum, if you want to reduce the space On the other side of the spectrum, if you want to reduce the space
requirements (and installer size) to the maximum, you can manually requirements (and installer size) to the maximum, you can manually
choose which GStreamer libraries to deploy. Unfortunately, you are on choose which GStreamer libraries to deploy. Unfortunately, you are on
your own on this road, besides using the object file displaying tool: your own on this road, besides using the object file displaying tool:
[otool](https://developer.apple.com/library/mac/#documentation/darwin/reference/manpages/man1/otool.1.html). [otool](https://developer.apple.com/library/mac/#documentation/darwin/reference/manpages/man1/otool.1.html).
Being a similar technique to deploying a private copy of the SDK, keep Being a similar technique to deploying a private copy of GStreamer, keep
in mind that you should relocate the SDK too, as explained at the end of in mind that you should relocate GStreamer too, as explained at the end of
this page. this page.
Bear also in mind that GStreamer is modular in nature. Plug-ins are Bear also in mind that GStreamer is modular in nature. Plug-ins are
@ -78,186 +73,46 @@ loaded depending on the media that is being played, so, if you do not
know in advance what files you are going to play, you do not know which know in advance what files you are going to play, you do not know which
plugins and shared libraries you need to deploy. plugins and shared libraries you need to deploy.
# Deploy only necessary packages, using the provided ones ## Deploy only necessary packages, using the provided ones
This will produce a smaller installer than deploying the complete This will produce a smaller installer than deploying complete
GStreamer SDK, without the added burden of having to manually pick each GStreamer, without the added burden of having to manually pick each
library. You just need to know which packages your application requires. library. You just need to know which packages your application requires.
![](images/icons/grey_arrow_down.gif)Available packages (Click to | Package name | Dependencies | Licenses | Description |
expand) |--------------|--------------|----------|-------------|
| base-system-1.0 | |JPEG, FreeType, BSD-like, LGPL, LGPL-2+, LGPL-2.1, LibPNG and MIT | Base system dependencies |
| gstreamer-1.0-capture | gstreamer-1.0-core, gstreamer-1.0-encoding | LGPL and LGPL-2+ | GStreamer plugins for capture |
| gstreamer-1.0-codecs | base-crypto, gstreamer-1.0-core | BSD, Jasper-2.0, BSD-like, LGPL, LGPL-2, LGPL-2+, LGPL-2.1 and LGPL-2.1+ | GStreamer codecs |
| gstreamer-1.0-codecs-gpl | gstreamer-1.0-core | BSD-like, LGPL, LGPL-2+ and LGPL-2.1+ | GStreamer codecs under the GPL license and/or with patents issues |
| gstreamer-1.0-core | base-system-1.0 | LGPL and LGPL-2+ | GStreamer core |
| gstreamer-1.0-dvd | gstreamer-1.0-core | GPL-2+, LGPL and LGPL-2+ | GStreamer DVD support |
| gstreamer-1.0-effects | gstreamer-1.0-core | LGPL and LGPL-2+ | GStreamer effects and instrumentation plugins |
| gstreamer-1.0-net | base-crypto, gstreamer-1.0-core | GPL-3, LGPL, LGPL-2+, LGPL-2.1+ and LGPL-3+ | GStreamer plugins for network protocols |
| gstreamer-1.0-playback | gstreamer-1.0-core | LGPL and LGPL-2+ | GStreamer plugins for playback |
| gstreamer-1.0-system | gstreamer-1.0-core | LGPL, LGPL-2+ and LGPL-2.1+ | GStreamer system plugins |
| gstreamer-1.0-visualizers | gstreamer-1.0-core | LGPL and LGPL-2+ | GStreamer visualization plugins |
| gstreamer-1.0-encoding | gstreamer-1.0-core, gstreamer-1.0-playback | LGPL and LGPL2+ | GStreamer plugins for encoding |
| gstreamer-1.0-editing | gstreamer-1.0-core, gstreamer-1.0-devtools | LGPL and LGPL2+ | GStreamer libraries and plugins for non linear editing |
| gstreamer-1.0-devtools | gstreamer-1.0-core | LGPL and LGPL2+ | GStreamer developers tools |
| gstreamer-1.0-libav | gstreamer-1.0-core | LGPL and LGPL2+ | GStreamer plugins wrapping ffmpeg |
| gstreamer-1.0-net-restricted | base-crypto, gstreamer-1.0-core | LGPL and LGPL2+ | GStreamer plugins for network protocols with potential patent issues in some countries |
| gstreamer-1.0-codecs-restricted | gstreamer-1.0-core | LGPL and LGPL2+ | GStreamer restricted codecs with potential patent issues in some countries |
| base-crypto | base-system-1.0 | LGPL and LGPL2+ | Cryptographic libraries |
<table>
<colgroup>
<col width="25%" />
<col width="25%" />
<col width="25%" />
<col width="25%" />
</colgroup>
<thead>
<tr class="header">
<th>Package name</th>
<th>Dependencies</th>
<th>Licenses</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>base-system</td>
<td> </td>
<td>JPEG, FreeType, BSD-like, LGPL,<br />
LGPL-2+, LGPL-2.1, LibPNG and MIT</td>
<td>Base system dependencies</td>
</tr>
<tr class="even">
<td>gobject-python</td>
<td>base-system</td>
<td>LGPL</td>
<td>GLib/GObject python bindings</td>
</tr>
<tr class="odd">
<td>gstreamer-capture</td>
<td>base-system, gstreamer-core</td>
<td>LGPL and LGPL-2+</td>
<td>GStreamer plugins for capture</td>
</tr>
<tr class="even">
<td>gstreamer-clutter</td>
<td>base-system, gtk+-2.0, gstreamer-core</td>
<td>LGPL</td>
<td>GStreamer Clutter support</td>
</tr>
<tr class="odd">
<td>gstreamer-codecs</td>
<td>base-system, gstreamer-core</td>
<td>BSD, Jasper-2.0, BSD-like, LGPL,<br />
LGPL-2, LGPL-2+, LGPL-2.1 and LGPL-2.1+</td>
<td>GStreamer codecs</td>
</tr>
<tr class="even">
<td>gstreamer-codecs-gpl</td>
<td>base-system, gstreamer-core</td>
<td>BSD-like, LGPL, LGPL-2+ and LGPL-2.1+</td>
<td>GStreamer codecs under the GPL license and/or with patents issues</td>
</tr>
<tr class="odd">
<td>gstreamer-core</td>
<td>base-system</td>
<td>LGPL and LGPL-2+</td>
<td>GStreamer core</td>
</tr>
<tr class="even">
<td>gstreamer-dvd</td>
<td>base-system, gstreamer-core</td>
<td>GPL-2+, LGPL and LGPL-2+</td>
<td>GStreamer DVD support</td>
</tr>
<tr class="odd">
<td>gstreamer-effects</td>
<td>base-system, gstreamer-core</td>
<td>LGPL and LGPL-2+</td>
<td>GStreamer effects and instrumentation plugins</td>
</tr>
<tr class="even">
<td>gstreamer-networking</td>
<td>base-system, gstreamer-core</td>
<td>GPL-3, LGPL, LGPL-2+, LGPL-2.1+<br />
and LGPL-3+</td>
<td>GStreamer plugins for network protocols</td>
</tr>
<tr class="odd">
<td>gstreamer-playback</td>
<td>base-system, gstreamer-core</td>
<td>LGPL and LGPL-2+</td>
<td>GStreamer plugins for playback</td>
</tr>
<tr class="even">
<td>gstreamer-python</td>
<td>base-system, gobject-python,<br />
gstreamer-core</td>
<td>LGPL and LGPL-2.1+</td>
<td>GStreamer python bindings</td>
</tr>
<tr class="odd">
<td>gstreamer-system</td>
<td>base-system, gstreamer-core</td>
<td>LGPL, LGPL-2+ and LGPL-2.1+</td>
<td>GStreamer system plugins</td>
</tr>
<tr class="even">
<td>gstreamer-tutorials</td>
<td> </td>
<td>LGPL</td>
<td>Tutorials for GStreamer</td>
</tr>
<tr class="odd">
<td>gstreamer-visualizers</td>
<td>base-system, gstreamer-core</td>
<td>LGPL and LGPL-2+</td>
<td>GStreamer visualization plugins</td>
</tr>
<tr class="even">
<td>gtk+-2.0</td>
<td>base-system</td>
<td>LGPL</td>
<td>Gtk toolkit</td>
</tr>
<tr class="odd">
<td>gtk+-2.0-python</td>
<td>base-system, gtk+-2.0</td>
<td>LGPL and LGPL-2.1+</td>
<td>Gtk python bindings</td>
</tr>
<tr class="even">
<td>snappy</td>
<td><p>base-system, gstreamer-clutter,<br />
gtk+-2.0, gstreamer-playback,<br />
gstreamer-core, gstreamer-codecs</p></td>
<td>LGPL</td>
<td>Snappy media player</td>
</tr>
</tbody>
</table>
Get the disk image file with all the packages:
<table> ## Relocation of GStreamer in OS X
<colgroup>
<col width="100%" />
</colgroup>
<thead>
<tr class="header">
<th>Universal</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p><a href="http://cdn.gstreamer.com/osx/universal/gstreamer-sdk-2013.6-universal-packages.dmg" class="external-link">GStreamer SDK 2013.6 (Congo) for Mac OS X (Deployment Packages)</a> - <a href="http://www.freedesktop.org/software/gstreamer-sdk/data/packages/osx/universal/gstreamer-sdk-2013.6-universal-packages.dmg" class="external-link">mirror</a> - <a href="http://cdn.gstreamer.com/osx/universal/gstreamer-sdk-2013.6-universal-packages.dmg.md5" class="external-link">md5</a> - <a href="http://cdn.gstreamer.com/osx/universal/gstreamer-sdk-2013.6-universal-packages.dmg.sha1" class="external-link">sha1</a></p></td>
</tr>
</tbody>
</table>
<table> In some situations we might need to relocate GStreamer, moving it to a
<tbody>
<tr class="odd">
<td><img src="images/icons/emoticons/warning.png" width="16" height="16" /></td>
<td><p>Due to the size of these files, usage of a <a href="http://en.wikipedia.org/wiki/Download_manager" class="external-link">Download Manager</a> is <strong>highly recommended</strong>. Take a look at <a href="http://en.wikipedia.org/wiki/Comparison_of_download_managers" class="external-link">this list</a> if you do not have one installed. If, after downloading, the installer reports itself as corrupt, chances are that the connection ended before the file was complete. A Download Manager will typically re-start the process and fetch the missing parts.</p></td>
</tr>
</tbody>
</table>
# Relocation of the SDK in OS X
In some situations we might need to relocate the SDK, moving it to a
different place in the file system, like for instance when we are different place in the file system, like for instance when we are
shipping a private copy of the SDK with our application. shipping a private copy of GStreamer with our application.
### Location of dependent dynamic libraries. ### Location of dependent dynamic libraries.
On Darwin operating systems, the dynamic linker doesn't locate dependent On Darwin operating systems, the dynamic linker doesn't locate dependent
dynamic libraries using their leaf name, but instead it uses full paths, dynamic libraries using their leaf name, but instead it uses full paths,
which makes it harder to relocate them as explained in the DYNAMIC which makes it harder to relocate them as explained in the DYNAMIC
LIBRARY LOADING section of LIBRARY LOADING section of
[dyld](https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/dyld.1.html)'s [dyld](https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/dyld.1.html)'s
man page: man page:
@ -270,7 +125,7 @@ man page:
We can get the list of paths used by an object file to locate its We can get the list of paths used by an object file to locate its
dependent dynamic libraries dependent dynamic libraries
using [otool](https://developer.apple.com/library/mac/#documentation/darwin/reference/manpages/man1/otool.1.html): using [otool](https://developer.apple.com/library/mac/#documentation/darwin/reference/manpages/man1/otool.1.html):
``` bash ``` bash
$ otool -L /Library/Frameworks/GStreamer.framework/Commands/gst-launch-1.0 $ otool -L /Library/Frameworks/GStreamer.framework/Commands/gst-launch-1.0
@ -281,15 +136,15 @@ $ otool -L /Library/Frameworks/GStreamer.framework/Commands/gst-launch-1.0
... ...
``` ```
As you might have already noticed, if we move the SDK to a different As you might have already noticed, if we move GStreamer to a different
folder, it will stop working because the runtime linker won't be able to folder, it will stop working because the runtime linker won't be able to
find `gstreamer-1.0` in the previous location find `gstreamer-1.0` in the previous location
`/Library/Frameworks/GStreamer.framework/Versions/0.10/x86/lib/libgstreamer-1.0.0.dylib`. `/Library/Frameworks/GStreamer.framework/Versions/0.10/x86/lib/libgstreamer-1.0.0.dylib`.
This full path is extracted from the dynamic library  ***install name*** This full path is extracted from the dynamic library ***install name***
, a path that is used by the linker to determine its location. The , a path that is used by the linker to determine its location. The
install name of a library can be retrieved with install name of a library can be retrieved with
[otool](https://developer.apple.com/library/mac/#documentation/darwin/reference/manpages/man1/otool.1.html) too: [otool](https://developer.apple.com/library/mac/#documentation/darwin/reference/manpages/man1/otool.1.html) too:
``` bash ``` bash
$ otool -D /Library/Frameworks/GStreamer.framework/Libraries/libgstreamer-1.0.dylib $ otool -D /Library/Frameworks/GStreamer.framework/Libraries/libgstreamer-1.0.dylib
@ -297,41 +152,41 @@ $ otool -D /Library/Frameworks/GStreamer.framework/Libraries/libgstreamer-1.0.dy
/Library/Frameworks/GStreamer.framework/Versions/0.10/x86/lib/libgstreamer-1.0.0.dylib /Library/Frameworks/GStreamer.framework/Versions/0.10/x86/lib/libgstreamer-1.0.0.dylib
``` ```
Any object file that links to the dynamic library `gstreamer-1.0` will Any object file that links to the dynamic library `gstreamer-1.0` will
use the use the
path `/Library/Frameworks/GStreamer.framework/Versions/0.10/x86/lib/libgstreamer-1.0.0.dylib` to path `/Library/Frameworks/GStreamer.framework/Versions/0.10/x86/lib/libgstreamer-1.0.0.dylib` to
locate it, as we saw previously with `gst-launch-1.0`. locate it, as we saw previously with `gst-launch-1.0`.
Since working exclusively with full paths wouldn't let us install our Since working exclusively with full paths wouldn't let us install our
binaries anywhere in the path, the linker provides a mechanism of string binaries anywhere in the path, the linker provides a mechanism of string
substitution, adding three variables that can be used as a path prefix. substitution, adding three variables that can be used as a path prefix.
At runtime the linker will replace them with the generated path for the At runtime the linker will replace them with the generated path for the
prefix. These variables are `@executable_path`, prefix. These variables are `@executable_path`,
`@loader_path` and `@rpath`, described in depth in the DYNAMIC LIBRARY `@loader_path` and `@rpath`, described in depth in the DYNAMIC LIBRARY
LOADING section LOADING section
of [dyld](https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/dyld.1.html)'s of [dyld](https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/dyld.1.html)'s
man page. man page.
For our purpose we will use the `@executable_path` variable, which is For our purpose we will use the `@executable_path` variable, which is
replaced with a fixed path, the path to the directory containing the replaced with a fixed path, the path to the directory containing the
main executable: `/Applications/MyApp.app/Contents/MacOS`. main executable: `/Applications/MyApp.app/Contents/MacOS`.
The `@loader_path` variable can't be used in our scope, because it will The `@loader_path` variable can't be used in our scope, because it will
be replaced with the path to the directory containing the mach-o binary be replaced with the path to the directory containing the mach-o binary
that loaded the dynamic library, which can vary. that loaded the dynamic library, which can vary.
Therefore, in order to relocate the SDK we will need to replace all Therefore, in order to relocate GStreamer we will need to replace all
paths paths
containing `/Library/Frameworks/GStreamer.framework/` with `@executable_path/../Frameworks/GStreamer.framework/`, which containing `/Library/Frameworks/GStreamer.framework/` with `@executable_path/../Frameworks/GStreamer.framework/`, which
can be done using can be done using
the [install\_name\_tool](http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/install_name_tool.1.html) the [install\_name\_tool](http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/install_name_tool.1.html)
utility utility
### Relocation of the binaries ### Relocation of the binaries
As mentioned in the previous section, we can use As mentioned in the previous section, we can use
the `install_name_tool` in combination with `otool` to list all paths the `install_name_tool` in combination with `otool` to list all paths
for dependant dynamic libraries and modify them to use the new location. for dependant dynamic libraries and modify them to use the new location.
However the SDK has a huge list of binaries and doing it manually would However GStreamer has a huge list of binaries and doing it manually would
be a painful task. That's why a simple relocation script is provided be a painful task. That's why a simple relocation script is provided
which you can find in cerbero's repository which you can find in cerbero's repository
(`cerbero/tools/osxrelocator.py`). This scripts takes 3 parameters: (`cerbero/tools/osxrelocator.py`). This scripts takes 3 parameters:
@ -340,7 +195,7 @@ which you can find in cerbero's repository
2. `old_prefix`: the old prefix we want to change (eg: 2. `old_prefix`: the old prefix we want to change (eg:
`/Library/Frameworks/GStreamer.framework`) `/Library/Frameworks/GStreamer.framework`)
3. `new_prefix`: the new prefix we want to use 3. `new_prefix`: the new prefix we want to use
(eg: `@executable_path/../Frameworks/GStreamer.framework/`) (eg: `@executable_path/../Frameworks/GStreamer.framework/`)
When looking for binaries to fix, we will run the script in the When looking for binaries to fix, we will run the script in the
following following
@ -366,14 +221,7 @@ help other libraries finding resources in the new
You can use the following functions: You can use the following functions:
- C: [putenv("VAR=/foo/bar")](http://linux.die.net/man/3/putenv) - C: [putenv("VAR=/foo/bar")](http://linux.die.net/man/3/putenv)
- Python: [os.environ\['VAR'\] = - Python: [os.environ\['VAR'\] =
'/foo/var'](http://docs.python.org/library/os.html) '/foo/var'](http://docs.python.org/library/os.html)
## Attachments:
![](images/icons/bullet_blue.gif)
[PackageMaker1.png](attachments/2097292/2424841.png) (image/png)
![](images/icons/bullet_blue.gif)
[PackageMaker2.png](attachments/2097292/2424842.png) (image/png)

View file

@ -1,36 +1,34 @@
# Multiplatform deployment using Cerbero # Multiplatform deployment using Cerbero
Cerbero is the build and packaging system used to construct the Cerbero is the build and packaging system used to construct
GStreamer SDK. It uses “recipe” files that indicate how to build GStreamer. It uses “recipe” files that indicate how to build
particular projects, and on what other projects they depend. particular projects, and on what other projects they depend.
Moreover, the built projects can be combined into packages for Moreover, the built projects can be combined into packages for
distribution. These packages are, depending on the target platform, distribution. These packages are, depending on the target platform,
Windows or OS X installers or Linux packages. Windows or OS X installers or Linux packages.
To use Cerbero to build and package your application, you just need to To use Cerbero to build and package your application, you just need to
add a recipe explaining how to build you application and make it depend add a recipe explaining how to build you application and make it depend
on the `gstreamer-sdk` project. Then Cerbero can take care of building on the `gstreamer-sdk` project. Then Cerbero can take care of building
your application and its dependencies and package them all together. your application and its dependencies and package them all together.
Read [Building from source using Read [](sdk-building-from-source-using-cerbero.md) to learn how
Cerbero](Building%2Bfrom%2Bsource%2Busing%2BCerbero.html) to learn how
to install and use Cerbero. to install and use Cerbero.
At this point, after reading the Build from source section in [Building At this point, after reading the Build from source section in
from source using [](sdk-building-from-source-using-cerbero.md), you should be able to
Cerbero](Building%2Bfrom%2Bsource%2Busing%2BCerbero.html), you should be build GStreamer from source and are ready to create recipe and package
able to build the GStreamer SDK from source and are ready to create files for your application.
recipe and package files for your application.
In the Cerbero installation directory you will find the In the Cerbero installation directory you will find the
`cerbero-uninstalled` script. Execute it without parameters to see the `cerbero-uninstalled` script. Execute it without parameters to see the
list of commands it accepts: list of commands it accepts:
``` bash ``` bash
./cerbero-uninstalled ./cerbero-uninstalled
``` ```
# Adding a recipe for your application ## Adding a recipe for your application
The first step is to create an empty recipe that you can then tailor to The first step is to create an empty recipe that you can then tailor to
your needs: your needs:
@ -43,197 +41,82 @@ This will create an initial recipe file in `recipes/my-app.recipe`,
which contains the smallest necessary recipe. This file is a Python which contains the smallest necessary recipe. This file is a Python
script; set the following attributes to describe your application: script; set the following attributes to describe your application:
Attribute Name | Attribute Name | Description | Required | Example |
|----------------|-------------|----------|---------|
Description | `name` | The recipe name. | Yes | *name = 'my-app'* |
| `version` | The software version. | Yes | *version = '1.0'* |
Required | `licenses` | A list of licenses of the software (see `cerbero/enums.py:License` for allowed licenses). | Yes | *licenses = \[License.LGPLv2Plus\]* |
| `deps` | A list of build dependencies of the software as recipe names. | No | *deps = \['other', 'recipe', 'names'\]* |
Example | `platform_deps` | Platform specific build dependencies (see `cerbero/enums.py:Platform` for allowed platforms). | No | *platform\_deps = {Platform.LINUX: \['some-recipe'\], Platform.WINDOWS: \['another-recipe'\]}* |
| `remotes` | A dictionary specifying the git remote urls where sources are pulled from. | No | *remotes = {'origin': '<git://somewhere>'}* |
`name` | `commit` | The git commit, tag or branch to use, defaulting to "sdk-*`version`*"*.* | No | *commit = 'my-app-branch'* |
| `config_sh` | Used to select the configuration script. | No | *config\_sh = 'autoreconf -fiv && sh ./configure'* |
The recipe name. | `configure_options` | Additional options that should be passed to the `configure` script. | No | *configure\_options = '--enable-something'* |
| `use_system_libs` | Whether to use system provided libs. | No | *use\_system\_libs = True* |
Yes | `btype` | The build type (see `cerbero/build/build.py:BuildType` for allowed build types). | No | *btype = BuildType.CUSTOM* |
| `stype` | The source type (see `cerbero/build/source.py:SourceType` for allowed source types). | No | *stype = SourceType.CUSTOM* |
*name = 'my-app'* | `files_category` | A list of files that should be shipped with packages including this recipe *category*. See below for more details. Cerbero comes with some predefined categories that should be used if the files being installed match a category criteria. The predefined categories are: `libs` (for libraries), `bins` (for binaries), `devel` (for development files - header, pkgconfig files, etc), `python` (for python files) and `lang` (for language files). *Note that for the `bins` and `libs` categories there is no need to specify the files extensions as Cerbero will do it for you.* | Yes\* | *files\_bins = \['some-binary'\]* *files\_libs = \['libsomelib'\]* *files\_devel = \['include/something'\] files\_python = \['site-packages/some/pythonfile%(pext)s'\]* *files\_lang = \['foo'\]* |
| `platform_files_category` | Same as *`files_category`* but for platform specific files. | No | *platform\_files\_some\_category = {Platform.LINUX: \['/some/file'\]}* |
`version`
> ![warning] At least one “files” category should be set.
The software version.
Yes
*version = '1.0'*
`licenses`
A list of licenses of the software (see `cerbero/enums.py:License` for
allowed licenses).
Yes
*licenses = \[License.LGPLv2Plus\]*
`deps`
A list of build dependencies of the software as recipe names.
No
*deps = \['other', 'recipe', 'names'\]*
`platform_deps`
Platform specific build dependencies (see `cerbero/enums.py:Platform`
for allowed platforms).
No
*platform\_deps = {Platform.LINUX: \['some-recipe'\], Platform.WINDOWS:
\['another-recipe'\]}*
`remotes`
A dictionary specifying the git remote urls where sources are pulled
from.
No
*remotes = {'origin': '<git://somewhere>'}*
`commit`
The git commit, tag or branch to use, defaulting to "sdk-*`version`*"*.*
No
*commit = 'my-app-branch'*
`config_sh`
Used to select the configuration script.
No
*config\_sh = 'autoreconf -fiv && sh ./configure'*
`configure_options`
Additional options that should be passed to the `configure` script.
No
*configure\_options = '--enable-something'*
`use_system_libs`
Whether to use system provided libs.
No
*use\_system\_libs = True*
`btype`
The build type (see `cerbero/build/build.py:BuildType` for allowed build
types).
No
*btype = BuildType.CUSTOM*
`stype`
The source type (see `cerbero/build/source.py:SourceType` for allowed
source types).
No
*stype = SourceType.CUSTOM*
`files_category`
A list of files that should be shipped with packages including this
recipe *category*. See below for more details.
Cerbero comes with some predefined categories that should be used if the
files being installed match a category criteria.
The predefined categories are:
`libs` (for libraries), `bins` (for binaries), `devel` (for development
files - header, pkgconfig files, etc), `python` (for python files) and
`lang` (for language files).
Note that for the `bins` and `libs` categories there is no need to
specify the files extensions as Cerbero will do it for you.
Yes\*
*files\_bins = \['some-binary'\]*
*files\_libs = \['libsomelib'\]*
*files\_devel = \['include/something'\] files\_python =
\['site-packages/some/pythonfile%(pext)s'\]*
*files\_lang = \['foo'\]*
`platform_files_category`
Same as *`files_category`* but for platform specific files.
No
*platform\_files\_some\_category = {Platform.LINUX: \['/some/file'\]}*
\* At least one “files” category should be set.
Apart from the attributes listed above, it is also possible to override Apart from the attributes listed above, it is also possible to override
some Recipe methods. For example the `prepare` method can be overridden some Recipe methods. For example the `prepare` method can be overridden
to do anything before the software is built, or the `install` and to do anything before the software is built, or the `install` and
`post_install` methods for overriding what should be done during or `post_install` methods for overriding what should be done during or
after installation. Take a look at the existing recipes in after installation. Take a look at the existing recipes in
`cerbero/recipes` for example. `cerbero/recipes` for example.
Alternatively, you can pass some options to cerbero-uninstalled so some Alternatively, you can pass some options to cerbero-uninstalled so some
of these attributes are already set for you. For of these attributes are already set for you. For
example: example:
``` ```
./cerbero-uninstalled add-recipe --licenses "LGPL" --deps "glib,gtk+" --origin "git://git.my-app.com" --commit "git-commit-to-use" my-app 1.0 ./cerbero-uninstalled add-recipe --licenses "LGPL" --deps "glib" --origin "git://git.my-app.com" --commit "git-commit-to-use" my-app 1.0
``` ```
See `./cerbero-uninstalled add-recipe -h` for help. See `./cerbero-uninstalled add-recipe -h` for help.
As an example, this is the recipe used to build the Snappy media player: As an example, this is the recipe used to build the Pitivi video editor:
``` ```
class Recipe(recipe.Recipe): class Recipe(recipe.Recipe):
name = 'snappy' name = 'pitivi'
version = '0.2+git' version = '0.95'
licenses = [License.GPLv2Plus] licenses = [License.GPLv2Plus]
config_sh = 'autoreconf -fiv && sh ./configure' remotes = {'origin': 'git://git.gnome.org/pitivi'}
deps = ['glib', 'gstreamer', 'gst-plugins-base', 'clutter', 'clutter-gst'] config_sh = 'sh ./autogen.sh --noconfigure && ./configure'
platform_deps = { Platform.LINUX: ['libXtst'] } configure_options = "--disable-help"
commit = 'origin/master'
deps = ['gst-editing-services-1.0',
'gst-python-1.0',
'gst-libav-1.0',
'gst-plugins-bad-1.0',
'gst-plugins-ugly-1.0',
'gst-transcoder',
'numpy',
'matplotlib',
'gnome-icon-theme',
'gnome-icon-theme-symbolic',
'shared-mime-info'] # brings in gtk+
files_libs = ['libpitivi-1.0']
files_typelibs = [
'Pitivi-1.0',
]
use_system_libs = True use_system_libs = True
remotes = {'upstream': 'git://git.gnome.org/snappy'} files_bins = ['pitivi']
files_lang = ['pitivi']
files_bins = ['snappy'] files_pitivi = ['lib/pitivi/python/pitivi',
files_data = ['share/snappy'] 'share/pitivi/',
'share/applications/pitivi.desktop']
def prepare(self):
if self.config.target_platform == Platform.LINUX:
self.configure_options += ' --enable-dbus' 
``` ```
Cerbero gets the software sources to build from a GIT repository, which Cerbero gets the software sources to build from a GIT repository, which
is specified via the `git_root` configuration variable from the Cerbero is specified via the `git_root` configuration variable from the Cerbero
configuration file (see the "Build from software" section in [Installing configuration file (see the "Build from software" section in [Installing
on Linux](Installing%2Bon%2BLinux.html)) and can be overridden by the on Linux](sdk-installing-on-linux.md)) and can be overridden by the
`remotes` attribute inside the recipes (if setting the `origin` remote). `remotes` attribute inside the recipes (if setting the `origin` remote).
In this case where no “commit” attribute is specified, Cerbero will use In this case where no “commit” attribute is specified, Cerbero will use
the commit named “sdk-0.2+git” from the GIT repository when building the commit named “sdk-0.2+git” from the GIT repository when building
Snappy. Snappy.
@ -244,7 +127,7 @@ Once the recipe is ready, instruct Cerbero to build it:
./cerbero-uninstalled build my-app ./cerbero-uninstalled build my-app
``` ```
# Adding a package for you software ## Adding a package for you software
To distribute your software with the SDK it is necessary to put it into To distribute your software with the SDK it is necessary to put it into
a package or installer, depending on the target platform. This is done a package or installer, depending on the target platform. This is done
@ -263,146 +146,25 @@ This will create an initial package file in `packages/my-app.package`.
The following Package attributes are used to describe your package: The following Package attributes are used to describe your package:
**Attribute Name** | Attribute Name | Description | Required | Example |
|----------------|-------------|----------|---------|
**Description** | `name` | The package name. | Yes | *name = 'my-app'* |
| `shortdesc` | A short description of the package. | No | *shortdesc = 'some-short-desc'* |
**Required** | `longdesc` | A long description of the package. | No | *longdesc = 'Some Longer Description'* |
| `codename` | The release codename. | No | *codename = 'MyAppReleaseName'* |
**Example** | `vendor` | Vendor for this package.| No | *vendor = 'MyCompany'* |
| `url` | The package url | No | *url = 'http://www.my-app.com'* |
`name` | `version` | The package version. | Yes | *version = '1.0'* |
| `license` | The package license (see `cerbero/enums.py:License` for allowed licenses). | Yes | *license = License.LGPLv2Plus* |
The package name. | `uuid` | The package unique id | Yes | *uuid = '6cd161c2-4535-411f-8287-e8f6a892f853'* |
| `deps` | A list of package dependencies as package names. | No | *deps = \['other', 'package', 'names'\]* |
Yes | `sys_deps` | The system dependencies for this package. | No | *sys\_deps= {Distro.DEBIAN: \['python'\]}* |
| `files` | A list of files included in the **runtime** package in the form *“recipe\_name:category1:category2:...”* *If the recipe category is omitted, all categories are included.* | Yes\* | *files = \['my-app'\]* *files = \['my-app:category1'\]* |
*name = 'my-app'* | `files_devel` | A list of files included in the **devel** package in the form *“recipe\_name:category1:category2:...”* | Yes\* | *files\_devel = \['my-app:category\_devel'\]* |
| `platform_files` | Same as *files* but allowing to specify different files for different platforms. | Yes\* | *platform\_files = {Platform.WINDOWS: \['my-app:windows\_only\_category'\]}* |
`shortdesc` | `platform_files_devel` | Same as *files\_devel* but allowing to specify different files for different platforms. | Yes\* | *platform\_files\_devel = {Platform.WINDOWS: \['my-app:windows\_only\_category\_devel'\]}* |
A short description of the package. > ![warning] At least one of the “files” attributes should be set.
No
*shortdesc = 'some-short-desc'*
`longdesc`
A long description of the package.
No
*longdesc = 'Some Longer Description'*
`codename`
The release codename.
No
*codename = 'MyAppReleaseName'*
`vendor`
Vendor for this package.
No
*vendor = 'MyCompany'*
`url`
The package url
No
*url = 'http://www.my-app.com'*
`version`
The package version.
Yes
*version = '1.0'*
`license`
The package license (see `cerbero/enums.py:License` for allowed
licenses).
Yes
*license = License.LGPLv2Plus*
`uuid`
The package unique id
Yes
*uuid = '6cd161c2-4535-411f-8287-e8f6a892f853'*
`deps`
A list of package dependencies as package names.
No
*deps = \['other', 'package', 'names'\]*
`sys_deps`
The system dependencies for this package.
No
*sys\_deps= {Distro.DEBIAN: \['python'\]}*
`files`
A list of files included in the **runtime** package in the form
*“recipe\_name:category1:category2:...”*
If the recipe category is omitted, all categories are included.
Yes\*
*files = \['my-app'\]*
*files = \['my-app:category1'\]*
`files_devel`
A list of files included in the **devel** package in the form
*“recipe\_name:category1:category2:...”*
Yes\*
*files\_devel = \['my-app:category\_devel'\]*
`platform_files`
Same as *files* but allowing to specify different files for different
platforms.
Yes\*
*platform\_files = {Platform.WINDOWS:
\['my-app:windows\_only\_category'\]}*
`platform_files_devel`
Same as *files\_devel* but allowing to specify different files for
different platforms.
Yes\*
*platform\_files\_devel = {Platform.WINDOWS:
\['my-app:windows\_only\_category\_devel'\]}*
\* At least one of the “files” attributes should be set.
Alternatively you can also pass some options to `cerbero-uninstalled`, Alternatively you can also pass some options to `cerbero-uninstalled`,
for for
@ -412,38 +174,43 @@ example:
./cerbero-uninstalled add-package my-app 1.0 --license "LGPL" --codename MyApp --vendor MyAppVendor --url "http://www.my-app.com" --files=my-app:bins:libs --files-devel=my-app:devel --platform-files=linux:my-app:linux_specific --platform-files-devel=linux:my-app:linux_specific_devel,windows:my-app:windows_specific_devel --deps base-system --includes gstreamer-core ./cerbero-uninstalled add-package my-app 1.0 --license "LGPL" --codename MyApp --vendor MyAppVendor --url "http://www.my-app.com" --files=my-app:bins:libs --files-devel=my-app:devel --platform-files=linux:my-app:linux_specific --platform-files-devel=linux:my-app:linux_specific_devel,windows:my-app:windows_specific_devel --deps base-system --includes gstreamer-core
``` ```
See `./cerbero-uninstalled add-package -h` for help. See `./cerbero-uninstalled add-package -h` for help.
As an example, this is the package file that is used for packaging the As an example, this is the package file that is used for packaging the
`gstreamer-core` package: `gstreamer-core` package:
``` ```
class Package(package.Package): class Package(package.Package):
name = 'gstreamer-codecs'
shortdesc = 'GStreamer codecs' name = 'gstreamer-1.0-codecs'
version = '2012.5' shortdesc = 'GStreamer 1.0 codecs'
codename = 'Amazon' longdesc = 'GStreamer 1.0 codecs'
url = "http://www.gstreamer.com" version = '1.9.0.1'
codename = 'Congo'
url = "http://gstreamer.freedesktop.org"
license = License.LGPL license = License.LGPL
vendor = 'GStreamer Project' vendor = 'GStreamer Project'
uuid = '6cd161c2-4535-411f-8287-e8f6a892f853' org = 'org.freedesktop.gstreamer'
deps = ['gstreamer-core'] uuid = 'a2e545d5-7819-4636-9e86-3660542f08e5'
deps = ['gstreamer-1.0-core', 'base-crypto']
files = ['flac:libs', files = ['flac:libs', 'libkate:libs', 'libdv:libs',
'jasper:libs', 'libkate:libs',
'libogg:libs', 'schroedinger:libs', 'speex:libs', 'libogg:libs', 'schroedinger:libs', 'speex:libs',
'libtheora:libs', 'libvorbis:libs', 'wavpack:libs', 'libvpx:libs', 'libtheora:libs', 'wavpack:libs', 'libvpx:libs',
'taglib:libs', 'taglib:libs', 'opus:libs', 'libvorbis:libs',
'gst-plugins-base:codecs', 'gst-plugins-good:codecs', 'openjpeg:libs', 'openh264:libs', 'spandsp:libs',
'gst-plugins-bad:codecs', 'gst-plugins-ugly:codecs'] 'gst-plugins-base-1.0:plugins_codecs', 'gst-plugins-good-1.0:plugins_codecs',
files_devel = ['gst-plugins-base-static:codecs_devel', 'gst-plugins-bad-1.0:plugins_codecs', 'gst-plugins-ugly-1.0:plugins_codecs',
'gst-plugins-good-static:codecs_devel', ]
'gst-plugins-bad-static:codecs_devel', files_devel = ['gst-plugins-base-1.0-static:plugins_codecs_devel',
'gst-plugins-ugly-static:codecs_devel'] 'gst-plugins-good-1.0-static:plugins_codecs_devel',
'gst-plugins-bad-1.0-static:plugins_codecs_devel',
'gst-plugins-ugly-1.0-static:plugins_codecs_devel',
'gst-plugins-bad-1.0-static:codecs_devel']
platform_files = { platform_files = {
Platform.LINUX: ['libdv:libs'], Platform.ANDROID: ['tremor:libs'],
Platform.DARWIN: ['libdv:libs'] Platform.IOS: ['tremor:libs']
}  }
``` ```
At this point you have two main options: you could either have a single At this point you have two main options: you could either have a single
@ -453,29 +220,32 @@ shared version of the SDK.
### Having a private version of the SDK ### Having a private version of the SDK
To have a private version of the SDK included in a single package you To have a private version of the SDK included in a single package you
don't have to add the `deps` variable to the package file but instead don't have to add the `deps` variable to the package file but instead
list all files you need in the `files` variables. If you decide to go list all files you need in the `files` variables. If you decide to go
this road you must make sure that you use a different prefix than the this road you must make sure that you use a different prefix than the
GStreamer SDK in the Cerbero configuration file, otherwise your package GStreamer SDK in the Cerbero configuration file, otherwise your package
will have file conflicts with the GStreamer SDK. will have file conflicts with GStreamer.
### Having a shared version of the SDK ### Having a shared version of the SDK
If you decide to use a shared version of the SDK you can create a If you decide to use a shared version of the SDK you can create a
package file like the other package files in the GStreamer SDK. Just package file like the other package files in GStreamer. Just
list all packages you need in the `deps` variable and put the files your list all packages you need in the `deps` variable and put the files your
software needs inside the `files` variables. When building a package software needs inside the `files` variables. When building a package
this way you must make sure that you use the same prefix and this way you must make sure that you use the same prefix and
packages\_prefix as the ones in your Cerbero configuration file. packages\_prefix as the ones in your Cerbero configuration file.
Finally, build your package by using: Finally, build your package by using:
``` bash ``` bash
./cerbero-uninstalled package your-package  ./cerbero-uninstalled package your-package
``` ```
Where `your-package` is the name of the `.package` file that you created Where `your-package` is the name of the `.package` file that you created
in the `packages` directory. This command will build your software and in the `packages` directory. This command will build your software and
all its dependencies, and then make individual packages for them (both all its dependencies, and then make individual packages for them (both
the dependencies and your software). The resulting files will be in the the dependencies and your software). The resulting files will be in the
current working directory. current working directory.
[warning]: images/icons/emoticons/warning.png

View file

@ -1,57 +1,57 @@
# Windows deployment # Windows deployment
This page explains how to deploy GStreamer along your application. There This page explains how to deploy GStreamer along your
are different mechanisms, which have been reviewed in [Deploying your application. There are different mechanisms, which have been reviewed
application](Deploying%2Byour%2Bapplication.html). The details for some in [](sdk-deploying-your-application.md). The details for some of the
of the mechanisms are given here, and more options might be added to mechanisms are given here, and more options might be added to this
this documentation in the future. documentation in the future.
# Shared GStreamer ## Shared GStreamer
This is the easiest way to deploy GStreamer, although most of the time This is the easiest way to deploy GStreamer, although most of the time
it installs unnecessary files which grow the size of the installer and it installs unnecessary files which grow the size of the installer and
the target drive free space requirements. Since the SDK might be shared the target drive free space requirements. Since GStreamer might be shared
among all applications that use it, though, the extra space requirements among all applications that use it, though, the extra space requirements
are somewhat blurred. are somewhat blurred.
Simply pack the GStreamer SDK **runtime** installer ([the same one you Simply pack GStreamer **runtime** installer ([the same one you
installed in your development machine](Installing%2Bon%2BWindows.html)) installed in your development machine](sdk-installing-on-windows.md))
inside your installer (or download it from your installer) and execute inside your installer (or download it from your installer) and execute
it silently using `msiexec`. `msiexec` is the tool that wraps most of it silently using `msiexec`. `msiexec` is the tool that wraps most of
the Windows Installer functionality and offers a number of options to the Windows Installer functionality and offers a number of options to
suit your needs. You can review these options by suit your needs. You can review these options by
executing `msiexec` without parameters. For example: executing `msiexec` without parameters. For example using 1.8.1:
``` ```
msiexec /i gstreamer-sdk-2012.9-x86.msi msiexec /i gstreamer-1.0-x86-1.8.1.msi
``` ```
This will bring up the installation dialog as if the user had This will bring up the installation dialog as if the user had
double-clicked on the `msi` file. Usually, you will want to let the user double-clicked on the `msi` file. Usually, you will want to let the user
choose where they want to install the SDK. An environment variable will choose where they want to install GStreamer. An environment variable will
let your application locate it later on. let your application locate it later on.
# Private deployment of GStreamer ## Private deployment of GStreamer
You can use the same method as the shared SDK, but instruct its You can use the same method as the shared GStreamer, but instruct its
installer to deploy to your applications folder (or a installer to deploy to your applications folder (or a
subfolder). Again, use the `msiexec` parameters that suit you best. For subfolder). Again, use the `msiexec` parameters that suit you best. For
example: example:
``` ```
msiexec /passive INSTALLDIR=C:\Desired\Folder /i gstreamer-sdk-2012.9-x86.msi msiexec /passive INSTALLDIR=C:\Desired\Folder /i gstreamer-1.0-x86-1.8.1.msi
``` ```
This will install the SDK to `C:\Desired\Folder`  showing a progress This will install GStreamer to `C:\Desired\Folder` showing a progress
dialog, but not requiring user intervention. dialog, but not requiring user intervention.
# Deploy only necessary files, by manually picking them ## Deploy only necessary files, by manually picking them
On the other side of the spectrum, if you want to reduce the space On the other side of the spectrum, if you want to reduce the space
requirements (and installer size) to the maximum, you can manually requirements (and installer size) to the maximum, you can manually
choose which GStreamer libraries to deploy. Unfortunately, you are on choose which GStreamer libraries to deploy. Unfortunately, you are on
your own on this road, besides using the [Dependency your own on this road, besides using the [Dependency
Walker](http://www.dependencywalker.com/) tool to discover inter-DLL Walker](http://www.dependencywalker.com/) tool to discover inter-DLL
dependencies. dependencies.
Bear in mind that GStreamer is modular in nature. Plug-ins are loaded Bear in mind that GStreamer is modular in nature. Plug-ins are loaded
@ -59,15 +59,15 @@ depending on the media that is being played, so, if you do not know in
advance what files you are going to play, you do not know which DLLs you advance what files you are going to play, you do not know which DLLs you
need to deploy. need to deploy.
# Deploy only necessary packages, using provided Merge Modules ## Deploy only necessary packages, using provided Merge Modules
If you are building your installer using one of the Professional If you are building your installer using one of the Professional
editions of [Visual editions of [Visual
Studio](http://www.microsoft.com/visualstudio/en-us/products/2010-editions/professional/overview) Studio](http://www.microsoft.com/visualstudio/en-us/products/2010-editions/professional/overview)
or [WiX](http://wix.sf.net) you can take advantage of pre-packaged or [WiX](http://wix.sf.net) you can take advantage of pre-packaged
[Merge [Merge
Modules](http://msdn.microsoft.com/en-us/library/windows/desktop/aa369820\(v=vs.85\).aspx). Modules](http://msdn.microsoft.com/en-us/library/windows/desktop/aa369820\(v=vs.85\).aspx).
The GStreamer SDK is divided in packages, which roughly take care of GStreamer is divided in packages, which roughly take care of
different tasks. There is the core package, the playback package, the different tasks. There is the core package, the playback package, the
networking package, etc. Each package contains the necessary libraries networking package, etc. Each package contains the necessary libraries
and files to accomplish its task. and files to accomplish its task.
@ -78,179 +78,32 @@ project for your application with Visual Studio and then add the Merge
Modules for the GStreamer packages your application needs. Modules for the GStreamer packages your application needs.
This will produce a smaller installer than deploying the complete This will produce a smaller installer than deploying the complete
GStreamer SDK, without the added burden of having to manually pick each GStreamer, without the added burden of having to manually pick each
library. You just need to know which packages your application requires. library. You just need to know which packages your application requires.
![](images/icons/grey_arrow_down.gif)Available packages (Click to | Package name | Dependencies | Licenses | Description |
expand) |--------------|--------------|----------|-------------|
| base-system-1.0 | |JPEG, FreeType, BSD-like, LGPL, LGPL-2+, LGPL-2.1, LibPNG and MIT | Base system dependencies |
| gstreamer-1.0-capture | gstreamer-1.0-core, gstreamer-1.0-encoding | LGPL and LGPL-2+ | GStreamer plugins for capture |
| gstreamer-1.0-codecs | base-crypto, gstreamer-1.0-core | BSD, Jasper-2.0, BSD-like, LGPL, LGPL-2, LGPL-2+, LGPL-2.1 and LGPL-2.1+ | GStreamer codecs |
| gstreamer-1.0-codecs-gpl | gstreamer-1.0-core | BSD-like, LGPL, LGPL-2+ and LGPL-2.1+ | GStreamer codecs under the GPL license and/or with patents issues |
| gstreamer-1.0-core | base-system-1.0 | LGPL and LGPL-2+ | GStreamer core |
| gstreamer-1.0-dvd | gstreamer-1.0-core | GPL-2+, LGPL and LGPL-2+ | GStreamer DVD support |
| gstreamer-1.0-effects | gstreamer-1.0-core | LGPL and LGPL-2+ | GStreamer effects and instrumentation plugins |
| gstreamer-1.0-net | base-crypto, gstreamer-1.0-core | GPL-3, LGPL, LGPL-2+, LGPL-2.1+ and LGPL-3+ | GStreamer plugins for network protocols |
| gstreamer-1.0-playback | gstreamer-1.0-core | LGPL and LGPL-2+ | GStreamer plugins for playback |
| gstreamer-1.0-system | gstreamer-1.0-core | LGPL, LGPL-2+ and LGPL-2.1+ | GStreamer system plugins |
| gstreamer-1.0-visualizers | gstreamer-1.0-core | LGPL and LGPL-2+ | GStreamer visualization plugins |
| gstreamer-1.0-encoding | gstreamer-1.0-core, gstreamer-1.0-playback | LGPL and LGPL2+ | GStreamer plugins for encoding |
| gstreamer-1.0-editing | gstreamer-1.0-core, gstreamer-1.0-devtools | LGPL and LGPL2+ | GStreamer libraries and plugins for non linear editing |
| gstreamer-1.0-devtools | gstreamer-1.0-core | LGPL and LGPL2+ | GStreamer developers tools |
| gstreamer-1.0-libav | gstreamer-1.0-core | LGPL and LGPL2+ | GStreamer plugins wrapping ffmpeg |
| gstreamer-1.0-net-restricted | base-crypto, gstreamer-1.0-core | LGPL and LGPL2+ | GStreamer plugins for network protocols with potential patent issues in some countries |
| gstreamer-1.0-codecs-restricted | gstreamer-1.0-core | LGPL and LGPL2+ | GStreamer restricted codecs with potential patent issues in some countries |
| base-crypto | base-system-1.0 | LGPL and LGPL2+ | Cryptographic libraries |
<table>
<colgroup>
<col width="25%" />
<col width="25%" />
<col width="25%" />
<col width="25%" />
</colgroup>
<thead>
<tr class="header">
<th>Package name</th>
<th>Dependencies</th>
<th>Licenses</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>base-system</td>
<td> </td>
<td>JPEG, FreeType, BSD-like, LGPL,<br />
LGPL-2+, LGPL-2.1, LibPNG and MIT</td>
<td>Base system dependencies</td>
</tr>
<tr class="even">
<td>gobject-python</td>
<td>base-system</td>
<td>LGPL</td>
<td>GLib/GObject python bindings</td>
</tr>
<tr class="odd">
<td>gstreamer-capture</td>
<td>base-system, gstreamer-core</td>
<td>LGPL and LGPL-2+</td>
<td>GStreamer plugins for capture</td>
</tr>
<tr class="even">
<td>gstreamer-clutter</td>
<td>base-system, gtk+-2.0, gstreamer-core</td>
<td>LGPL</td>
<td>GStreamer Clutter support</td>
</tr>
<tr class="odd">
<td>gstreamer-codecs</td>
<td>base-system, gstreamer-core</td>
<td>BSD, Jasper-2.0, BSD-like, LGPL,<br />
LGPL-2, LGPL-2+, LGPL-2.1 and LGPL-2.1+</td>
<td>GStreamer codecs</td>
</tr>
<tr class="even">
<td>gstreamer-codecs-gpl</td>
<td>base-system, gstreamer-core</td>
<td>BSD-like, LGPL, LGPL-2+ and LGPL-2.1+</td>
<td>GStreamer codecs under the GPL license and/or with patents issues</td>
</tr>
<tr class="odd">
<td>gstreamer-core</td>
<td>base-system</td>
<td>LGPL and LGPL-2+</td>
<td>GStreamer core</td>
</tr>
<tr class="even">
<td>gstreamer-dvd</td>
<td>base-system, gstreamer-core</td>
<td>GPL-2+, LGPL and LGPL-2+</td>
<td>GStreamer DVD support</td>
</tr>
<tr class="odd">
<td>gstreamer-effects</td>
<td>base-system, gstreamer-core</td>
<td>LGPL and LGPL-2+</td>
<td>GStreamer effects and instrumentation plugins</td>
</tr>
<tr class="even">
<td>gstreamer-networking</td>
<td>base-system, gstreamer-core</td>
<td>GPL-3, LGPL, LGPL-2+, LGPL-2.1+<br />
and LGPL-3+</td>
<td>GStreamer plugins for network protocols</td>
</tr>
<tr class="odd">
<td>gstreamer-playback</td>
<td>base-system, gstreamer-core</td>
<td>LGPL and LGPL-2+</td>
<td>GStreamer plugins for playback</td>
</tr>
<tr class="even">
<td>gstreamer-python</td>
<td>base-system, gobject-python,<br />
gstreamer-core</td>
<td>LGPL and LGPL-2.1+</td>
<td>GStreamer python bindings</td>
</tr>
<tr class="odd">
<td>gstreamer-system</td>
<td>base-system, gstreamer-core</td>
<td>LGPL, LGPL-2+ and LGPL-2.1+</td>
<td>GStreamer system plugins</td>
</tr>
<tr class="even">
<td>gstreamer-tutorials</td>
<td> </td>
<td>LGPL</td>
<td>Tutorials for GStreamer</td>
</tr>
<tr class="odd">
<td>gstreamer-visualizers</td>
<td>base-system, gstreamer-core</td>
<td>LGPL and LGPL-2+</td>
<td>GStreamer visualization plugins</td>
</tr>
<tr class="even">
<td>gtk+-2.0</td>
<td>base-system</td>
<td>LGPL</td>
<td>Gtk toolkit</td>
</tr>
<tr class="odd">
<td>gtk+-2.0-python</td>
<td>base-system, gtk+-2.0</td>
<td>LGPL and LGPL-2.1+</td>
<td>Gtk python bindings</td>
</tr>
<tr class="even">
<td>snappy</td>
<td><p>base-system, gstreamer-clutter,<br />
gtk+-2.0, gstreamer-playback,<br />
gstreamer-core, gstreamer-codecs</p></td>
<td>LGPL</td>
<td>Snappy media player</td>
</tr>
</tbody>
</table>
If you include a merge module in your deployment project, remember to If you include a merge module in your deployment project, remember to
include also its dependencies. Otherwise, the project will build include also its dependencies. Otherwise, the project will build
correctly and install flawlessly, but, when executing your application, correctly and install flawlessly, but, when executing your application,
it will miss files. it will miss files.
Get the ZIP file with all Merge Modules for your architecture:
<table>
<colgroup>
<col width="100%" />
</colgroup>
<thead>
<tr class="header">
<th>32 bits</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><p><a href="http://cdn.gstreamer.com/windows/x86/gstreamer-sdk-x86-2013.6-merge-modules.zip" class="external-link">GStreamer SDK 2013.6 (Congo) for Windows 32 bits (Merge Modules)</a> - <a href="http://www.freedesktop.org/software/gstreamer-sdk/data/packages/windows/x86/gstreamer-sdk-x86-2013.6-merge-modules.zip" class="external-link">mirror</a> - <a href="http://cdn.gstreamer.com/windows/x86/gstreamer-sdk-x86-2013.6-merge-modules.zip.md5" class="external-link">md5</a> - <a href="http://cdn.gstreamer.com/windows/x86/gstreamer-sdk-x86-2013.6-merge-modules.zip.sha1" class="external-link">sha1</a></p></td>
</tr>
<tr class="even">
<td><span style="color: rgb(0,0,0);">64 bits</span></td>
</tr>
<tr class="odd">
<td><a href="http://cdn.gstreamer.com/windows/x86-64/gstreamer-sdk-x86_64-2013.6-merge-modules.zip" class="external-link">GStreamer SDK 2013.6 (Congo) for Windows 64 bits (Merge Modules)</a> - <a href="http://www.freedesktop.org/software/gstreamer-sdk/data/packages/windows/x86-64/gstreamer-sdk-x86_64-2013.6-merge-modules.zip" class="external-link">mirror</a> - <a href="http://cdn.gstreamer.com/windows/x86-64/gstreamer-sdk-x86_64-2013.6-merge-modules.zip.md5" class="external-link">md5</a> - <a href="http://cdn.gstreamer.com/windows/x86-64/gstreamer-sdk-x86_64-2013.6-merge-modules.zip.sha1" class="external-link">sha1</a></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr class="odd">
<td><img src="images/icons/emoticons/warning.png" width="16" height="16" /></td>
<td><p>Due to the size of these files, usage of a <a href="http://en.wikipedia.org/wiki/Download_manager" class="external-link">Download Manager</a> is <strong>highly recommended</strong>. Take a look at <a href="http://en.wikipedia.org/wiki/Comparison_of_download_managers" class="external-link">this list</a> if you do not have one installed. If, after downloading, the installer reports itself as corrupt, chances are that the connection ended before the file was complete. A Download Manager will typically re-start the process and fetch the missing parts.</p></td>
</tr>
</tbody>
</table>