Fix setting $PS1 for bash
[platform/upstream/gstreamer.git] / README.md
1 # gst-build
2
3 GStreamer [meson](http://mesonbuild.com/) based repositories aggregrator
4
5 You can build GStreamer and all its modules at once using
6 meson and its [subproject](https://github.com/mesonbuild/meson/wiki/Subprojects) feature.
7
8 ## Getting started
9
10 ### Install meson and ninja
11
12 You should get meson through your package manager or using:
13
14   $ pip3 install --user meson
15
16 You should get `ninja` using your package manager or downloading it from
17 [here](https://github.com/ninja-build/ninja/releases).
18
19 ### Build GStreamer and its modules
20
21 You can get all GStreamer built running:
22
23 ```
24 mkdir build/ && meson build && ninja -C build/
25 ```
26
27 NOTE: on fedora (and maybe other distributions) replace `ninja` with `ninja-build`
28
29 # Development environment
30
31 gst-build also contains a special `uninstalled` target that lets you enter an
32 uninstalled development environment where you will be able to work on GStreamer easily.
33 You can get into that environment running:
34
35 ```
36 ninja -C build/ uninstalled
37 ```
38
39 If your operating system handles symlinks, built modules source code will be available
40 at the root of `gst-build/` for example GStreamer core will be in `gstreamer/`. Otherwise
41 they will be present in `subprojects/`. You can simply hack in there and to rebuild you
42 just need to rerun `ninja -C build/`.
43
44
45 ## Add information about GStreamer development environment in your prompt line
46
47 ### Bash prompt
48
49 We automatically handle `bash` and set `$PS1` accordingly
50
51 ### Zsh prompt
52
53 In your `.zshrc`, you should add something like:
54
55 ```
56 export PROMPT="$GST_ENV-$PROMPT"
57 ```
58
59 ### Using powerline
60
61 In your powerline theme configuration file (by default in
62 `{POWERLINE INSTALLATION DIR}/config_files/themes/shell/default.json`)
63 you should add a new environment segment as follow:
64
65 ```
66 {
67   "function": "powerline.segments.common.env.environment",
68   "args": { "variable": "GST_ENV" },
69   "priority": 50
70 },
71 ```