yubioath-flutter/doc/development.adoc

54 lines
1.9 KiB
Plaintext
Raw Normal View History

2017-05-17 10:48:22 +03:00
== Project outline
Yubico Authenticator is a Qt5 application written in QML that uses the plugin PyOtherSide to enable
the backend logic to be written in Python 3. The python library yubikey-manager is needed to communicate with the YubiKey,
and is included as a submodule in the repository. It can also be installed through pip and some other package managers.
== Setting up a development environment
2017-05-17 10:48:22 +03:00
=== Setup the repository:
$ git clone --recursive https://github.com/Yubico/yubioath-desktop.git
$ cd yubioath-desktop
=== Install dependencies on Ubuntu 16.04 (Xenial)
2017-05-17 10:48:22 +03:00
$ sudo add-apt-repository -y ppa:yubico/stable
$ sudo apt update
$ sudo apt install yubikey-manager qml-module-qt-labs-settings qml-module-qtquick-dialogs \
qml-module-qtquick-controls qt5-default libqt5svg5-dev qtdeclarative5-dev qtbase5-dev
=== Install dependencies on macOS 10.12 (Sierra)
2017-05-17 10:48:22 +03:00
$ brew install python3 swig ykpers libu2f-host libusb qt5
$ cd vendor/pyotherside && qmake && make && make install && cd ../..
2017-05-17 10:48:22 +03:00
=== Compile the app:
2017-05-17 10:48:22 +03:00
$ qmake && make
2017-05-17 10:48:22 +03:00
=== Run the app:
2017-05-17 10:48:22 +03:00
$ PYTHONPATH="$(pwd)/vendor/yubikey-manager:${PYTHONPATH}" yubioath-desktop
2017-05-17 10:48:22 +03:00
== Code Style & Linting
2017-05-17 10:48:22 +03:00
This project uses http://flake8.pycqa.org/[Flake8] (for the python parts) and qmllint
(for the QML parts) for code style with a http://pre-commit.com/[pre-commit] hook.
To use these:
$ pip install pre-commit flake8
$ pre-commit install
== Using vagrant for development
A Vagrantfile with a development environment based on Ubuntu 16.04 is included in the repository.
It comes with Xfce4 as a desktop environment. To start the vagrant environment:
$ cd vagrant/development
$ vagrant up
The default root login credentials are root:root. The repository can be found as a synced folder under `/vagrant`.
Modify the provision.sh script to set up a USB filter to capture the device with VirtualBox.