1== Project outline
2
3YubiKey Manager is a Qt5 application written in QML that uses the plugin PyOtherSide to enable
4the backend logic to be written in Python 3. The python library yubikey-manager is needed to
5communicate with the YubiKey, and may be installed from pip or other package managers.
6If a specific version (or branch or commit) is needed for development, point to that version
7in requirements.txt
8
9== Working with the code
10
11=== Install dependencies
12
13It's assumed a Python environment with pip is installed.
14
15==== Windows
16Install https://www.qt.io/download[Qt5]. Build and install the Qt5 plugin http://pyotherside.readthedocs.io/en/latest/#building-pyotherside[PyOtherSide].
17Make sure the http://www.swig.org/[swig] executable is in your PATH. Add http://libusb.info/[libusb] and https://developers.yubico.com/yubikey-personalization/[ykpers] DLLs to
18the root of the repository of ykman (after setting up the project).
19
20==== macOS
21
22    $ brew install python3 swig ykpers libusb qt
23    # Allow access to qmake - see https://superuser.com/a/1153338/104372
24    $ brew link qt --force
25
26Build and install the Qt5 plugin http://pyotherside.readthedocs.io/en/latest/#building-pyotherside[PyOtherSide].
27
28==== Linux (Debian-based distributions)
29
30    $ sudo add-apt-repository -y ppa:yubico/stable
31    $ sudo apt update
32    $ sudo apt install \
33      libqt5svg5-dev \
34      python3-yubikey-manager \
35      qml-module-io-thp-pyotherside \
36      qml-module-qt-labs-calendar \
37      qml-module-qt-labs-folderlistmodel \
38      qml-module-qt-labs-platform \
39      qml-module-qt-labs-settings \
40      qml-module-qtgraphicaleffects \
41      qml-module-qtquick-controls2 \
42      qml-module-qtquick-dialogs \
43      qml-module-qtquick-layouts \
44      qml-module-qtquick-window2 \
45      qml-module-qtquick2 \
46      qt5-default \
47      qtbase5-dev \
48      qtdeclarative5-dev \
49      qtquickcontrols2-5-dev
50
51==== Linux (Fedora 29)
52
53    $ sudo dnf install make python \
54      libyubikey ykpers python3-yubikey-manager \
55      qt5-devel qt5-qtbase-devel qt5-qtdeclarative-devel qt5-qtquickcontrols2-devel \
56      qt5-qtquickcontrols qt5-qtgraphicaleffects pyotherside
57
58=== Setup the repository
59
60    $ git clone https://github.com/Yubico/yubikey-manager-qt.git
61    $ cd yubikey-manager-qt
62
63=== Compile the app
64
65On Windows, macOS & Debian-based Linux distributions:
66
67    $ qmake && make
68
69On Fedora 29:
70
71    $ qmake-qt5 && make
72
73=== Run the app
74
75    $ ./ykman-gui/ykman-gui
76
77=== Code Style & Linting
78
79This project uses http://flake8.pycqa.org/[Flake8] (for the python parts) and qmllint
80(for the QML parts) for code style with a http://pre-commit.com/[pre-commit] hook.
81
82To use these:
83
84    $ pip install pre-commit flake8
85    $ pre-commit install
86
87=== Packaging
88
89For third-party packaging, use the source releases and signatures available https://developers.yubico.com/yubikey-manager-qt/Releases/[here].
90