doc: Add getting started for developers
This commit is contained in:
parent
e1856cf8ec
commit
61c4976bb5
34
doc/dev/getting-started.rst
Normal file
34
doc/dev/getting-started.rst
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
Getting Started
|
||||||
|
===============
|
||||||
|
|
||||||
|
Setting up polybar for development is basically the same process as `compiling
|
||||||
|
it from source <https://github.com/polybar/polybar/wiki/Compiling>`_.
|
||||||
|
However, we recommend using the ``Debug`` or ``Sanitize`` cmake build type when
|
||||||
|
configuring the project:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Debug ..
|
||||||
|
# Or
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Sanitize ..
|
||||||
|
|
||||||
|
This will give you debug symbols in the executable and the ``Sanitize`` build
|
||||||
|
type will also enable the ``AddressSanitizer`` and
|
||||||
|
``UndefinedBehaviorSanitizer``, which can give you very useful information
|
||||||
|
about crashes and undefined behavior at runtime.
|
||||||
|
|
||||||
|
Editors
|
||||||
|
-------
|
||||||
|
|
||||||
|
Since this is a cmake project, most IDEs will have built-in support or a plugin
|
||||||
|
to automatically setup this project.
|
||||||
|
|
||||||
|
In addition, the ``cmake`` command creates a ``compile_commands.json`` file in
|
||||||
|
the build folder, which can be used by many `language servers
|
||||||
|
<https://microsoft.github.io/language-server-protocol/>`_.
|
||||||
|
If you are using a C++ language server in your editor, it should be as easy as
|
||||||
|
symlinking the ``compile_commands.json`` into the repo root directory:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
ln -s build/compile_commands.json .
|
@ -33,6 +33,7 @@ Welcome to the official polybar documentation.
|
|||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
:caption: Developer Documentation:
|
:caption: Developer Documentation:
|
||||||
|
|
||||||
|
dev/getting-started
|
||||||
dev/style-guide
|
dev/style-guide
|
||||||
dev/testing
|
dev/testing
|
||||||
dev/release-workflow
|
dev/release-workflow
|
||||||
|
Loading…
Reference in New Issue
Block a user