]> git.sesse.net Git - vlc/blob - HACKING
Use var_Inherit* instead of var_CreateGet*.
[vlc] / HACKING
1 Hacking vlc
2 ===========
3
4 First
5 -----
6
7  - Read this file
8
9  - Read the information present on http://www.videolan.org/developers/
10
11
12 Requirements
13 ____________
14
15 You will need the following tools if you plan to use the GIT version of vlc:
16
17  - Autoconf version 2.60 or later
18  - Automake version 1.9 or later
19  - gettext version 0.16.1 or later
20  - pkg-config
21
22 After retrieving the GIT tree, you need to run the bootstrap script to
23 generate all the files needed to build vlc. You can then run configure.
24 Run ./configure --help for a description of the available options.
25
26 If you do not have the correct version of these tools, or if they are
27 simply not available for the operating system you plan to develop on,
28 you can check out a GIT tree on an OS that provides these tools (such
29 as a recent Linux distribution), run bootstrap, and then copy the whole
30 tree to your retarded OS.
31
32 There is a possibility that, at some point, automake might segfault. The
33 reason is unsufficient stack size, and can be easily fixed with the
34 `ulimit` command (or an equivalent) available in most shells. For instance
35 on bash 2.0, the following command solves the automake crash on Mac OS X :
36 ulimit -s 20000
37
38
39 The bootstrap sequence
40 ----------------------
41
42 The bootstrap script does the following actions:
43
44  - parse configure.ac for all Makefiles in the modules/ directory that need
45    to be generated, and look for available modules in the corresponding
46    Modules.am file. A module "foo" exists if there is a Modules.am file in
47    the modules/ directory which defines SOURCES_foo.
48
49  - create an m4/private.m4 from configure.ac, generating m4 macros that will
50    be needed by configure.ac.
51
52  - create a Makefile.am file for each Modules.am file found in modules/ .
53
54  - run autopoint (previously gettextize) to provide build system support
55    for internationalization.
56
57  - run the usual aclocal, autoheader, automake and autoconf, which create
58    the various Makefile.in files from the corresponding Makefile.am and the
59    configure script from configure.ac.
60
61  - fix a few files in the vlc repository that may have been altered.
62
63
64 How to add a module
65 -------------------
66
67 To add a module to the repository, just add its sources to a Modules.am
68 file. If you add a new directory you will need to create a new Modules.am,
69 inside that directory. Do not forget to add a corresponding
70 Makefile line at the end of configure.ac for this new Modules.am file.
71
72 To have the module built, you need to add a call to VLC_ADD_PLUGIN or
73 VLC_ADD_BUILTINS to configure.ac with your new module name as argument.
74 Look at other modules for guidelines on how to add build and linkage options.
75
76 After changing configure.ac you will always need to rerun bootstrap and 
77 configure.
78
79 VLC keeps a cache of its modules (in ~/.cache/vlc/ on Linux), so you'll have to
80 delete it (or use vlc --reset-plugins-cache). Then use vlc -vvv --color --list
81 to check that your plugin is seen by VLC.
82