Development - Contributing
Developing
Clone the repository and install it in a virtualenv
in an editable mode with
the developers dependencies.
$ python -m venv env
$ source ./env/bin/activate
$ cd quokka
(env) $ pip install -e '.[dev]'
(env) $ python -c "import quokka; print(quokka.__version__)"
Format the code
The project use the black
formatter for the
Python code with the defaults settings.
Running Black
(env) $ black bindings/python/
The C++ code is formatted using clang-format
.
Updating the Protobuf definition
To update the Protobuf definition, follow this steps:
- <!> IMPORTANT <!> Open an issue on the official repository
- Update the
proto/quokka.proto
file with the new fields - Increase the version number in
CMakeLists.txt
by : - A major version if the change breaks backward compatibility
- A minor version otherwise
- Write the exporter code
- Update the python bindings accordingly
- Update the
__quokka_version__
inbindings/python/__init__.py
to match the one in step 3. - Update the protobuf generated files for python using:
python setup.py generate_py_protobufs
Add a new IDA Version / SDK
Add an image with the new IDA Version
For example, using Version 7.7
:
- Go to
ci
- Copy installer to
ci/ida77/ida.run
- (Optional) Copy
~/.idapro/ida.reg
toci/ida77/ida.reg
- (Optional) Add the installation password in a file to remember it for next time
- Build the image
$ docker build --file build.dockerfile \ --build-arg IDA_DIRECTORY=ida77 \ --build-arg IDA_PASSWORD=<install password> \ .
- (Optional). If you did not copy a
ida.reg
file, you should run the container first, open IDA (/opt/ida/idat64
), accept the license and save the container (usingdocker commit
).
Add the SDK in the repo
- Download the SDK from HexRays website
- Extract it
- Generate a password for the SDK archive.
- Compress the inner
idasdk77/
directory in an archive protected by the password. - Add the
idasdk77.zip
to the repository.
Other tips and tricks
Read the Dev's Tips & Tricks page!