== Yubico Authenticator for Desktop

=== Requirements
You will need the Flutter SDK with enabled desktop support, see:
https://flutter.dev/desktop

Development has been done using the "Install from git" method of installing the
SDK, from the "beta" channel.

You will also need to provide a compiled version of the ykman CLI. This can
either be built locally (see the next section), or manually downloaded and
placed in `build/<os>/ykman/`. Builds are available for download from GitHub
Actions in the `yubikey-manager` project.


=== Building the ykman CLI locally
Requirements: Python >= 3.6 and Poetry.

The GUI requires a compiled version of the ykman CLI to run, which is build
using pyinstaller from the yubikey-manager submodule in this repository. The
`build-ykman.sh` (`build-ykman.bat` on Windows) script in this repository will
take care of this, producing a build in `build/<os>/ykman` which will then be
included in the main GUI. See the `yubikey-manager` project documentation for
any build requirements needed in this step.

For faster development when making modifications to the CLI, you can skip the
re-compilation step and instead set the `_YKMAN_PATH` environment variable to
the location of a `ykman` executable to run:

  _YKMAN_PATH="/path/to/ykman.exe" flutter run -d windows


=== Running the app
To start the app, run:

  flutter run -d <os>

where <os> is "windows", "macos", or "linux". You can add the `--release` flag
to run a release build instead of debug. Builds of the app will be create under
`build/<os>/`.


=== Running tests
Tests can be run with the command:

  flutter test


=== Packaging for MacOS
See link:doc/MacOS_Packaging.adoc[MacOS Packaging].
