Update doc

This commit is contained in:
Romain Thomas 2020-12-23 09:40:16 +01:00
parent 197b699951
commit a9fea192b1
5 changed files with 58 additions and 35 deletions

View File

@ -55,7 +55,7 @@ struct Pe_Binary_t {
typedef struct Pe_Binary_t Pe_Binary_t;
/** @brief Wrapper on LIEF::PE::Parser::parse */
/** Wrapper on LIEF::PE::Parser::parse */
LIEF_API Pe_Binary_t* pe_parse(const char *file);
LIEF_API void pe_binary_destroy(Pe_Binary_t* binary);

View File

@ -1,6 +1,14 @@
PE
--
.. doxygenfunction:: pe_parse
:project: lief
.. doxygenfunction:: pe_binary_destroy
:project: lief
Pe_Binary_t
************

View File

@ -1,17 +1,20 @@
.. role:: strike
:class: strike
Compilation
===========
To be compiled **LIEF** needs at least the following requirements:
To compile **LIEF**, you need at least the following requirements:
- C++11 compiler (GCC, Clang, MSVC..)
- C++14 compiler (GCC, Clang, MSVC..)
- CMake
- Python (for bindings)
- Python >= 3.6 (for bindings)
To build the documentation:
- Doxygen (= ``1.8.10``)
- Doxygen (= ``1.8.10``, the CI uses ``1.8.20``)
- Sphinx (with ``sphinx_rtd_theme`` module)
- breathe (>= ``4.5.0``)
- breathe (>= ``4.25.1``)
Libraries only (SDK)
@ -50,32 +53,13 @@ Library and Python bindings
$ git clone https://github.com/lief-project/LIEF.git
$ cd LIEF
$ mkdir build
$ cd build
$ cmake -DLIEF_PYTHON_API=on -DPYTHON_VERSION=3.6 -DCMAKE_BUILD_TYPE=Release ..
$ cmake --build . --target LIB_LIEF --config Release
$ cmake --build . --target pyLIEF --config Release
$ python ./setup.py [--ninja] build install [--user]
.. warning::
.. note::
Depending on your Python version, CMake could not
find the right Python library to link against.
You can speed-up the compilation by installing `ccache <https://ccache.dev/>`_ or `sccache <https://github.com/mozilla/sccache>`_
We suggest to explicitly define path to the Python library,
Python include directory and Python executable.
.. code-block:: console
$ cmake .. \
-DPYTHON_VERSION=3.5 \
-DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.5m \
-DPYTHON_LIBRARY:FILEPATH=/usr/lib/libpython3.so \
-DPYTHON_BINARY:FILEPATH=/usr/bin/python3.5
If you want to enable tests, add ``-DLIEF_TESTS=on`` during the CMake configuration step.
The Doxygen documentation will be located at ``build/doc/doxygen/html`` and the sphinx documentation at ``build/doc/sphinx-doc``
If you want to enable tests, you can add ``--lief-test`` after ``setup.py``.
CMake Options
-------------
@ -85,7 +69,12 @@ CMake Options
Docker
------
See the `Dockerlief <https://github.com/lief-project/Dockerlief>`_ repo.
See `liefproject <https://hub.docker.com/u/liefproject>`_ on Dockerhub
.. container:: strike
See the `Dockerlief <https://github.com/lief-project/Dockerlief>`_ repo.

View File

@ -1,6 +1,29 @@
Getting started
===============
The entrypoints to load a binary with LIEF are:
:Python:
* :meth:`lief.parse`
* :meth:`lief.ELF.parse`
* :meth:`lief.PE.parse`
* :meth:`lief.MachO.parse`
|
:cpp:
* :cpp:func:`LIEF::Parser::parse`
* :cpp:func:`LIEF::ELF::Parser::parse`
* :cpp:func:`LIEF::PE::Parser::parse`
* :cpp:func:`LIEF::MachO::Parser::parse`
|
:C:
* :cpp:func:`elf_parse`
* :cpp:func:`pe_parse`
* :cpp:func:`macho_parse`
Python
------

View File

@ -4,14 +4,13 @@ Installation and Integration
SDK
---
For each platform there is an SDK that contains:
For each platform supported by LIEF there is an SDK that contains:
* Static library
* Headers
* Examples
Nightly build can be downloaded here: https://lief-project.github.io/packages/sdk while releases are available here: https://github.com/lief-project/LIEF/releases.
Nightly build can be downloaded on: https://lief-project.github.io/packages/sdk while releases are available on Github release page: https://github.com/lief-project/LIEF/releases.
Python
------
@ -27,7 +26,11 @@ To install nightly build (master):
$ pip install [--user] --index-url https://lief-project.github.io/packages lief
Python packages can be found here: https://lief-project.github.io/packages/lief
You can also directly download the Python wheel package on: https://lief-project.github.io/packages/lief
.. note::
If you already installed a nightly version of LIEF you may need the flag: ``--no-cache-dir``
To install **release** package
@ -36,7 +39,7 @@ To install **release** package
$ pip install lief
Release packages can be found here: `Releases <https://github.com/lief-project/LIEF/releases>`_
Release packages can be found on the `PyPI <https://pypi.org/project/lief/>`_ and the Github release page: https://github.com/lief-project/LIEF/releases
Using ``setup.py``, one can build and install lief as follows: