Skip to content
This repository has been archived by the owner on Mar 12, 2019. It is now read-only.

Latest commit

 

History

History
95 lines (69 loc) · 3.01 KB

development.adoc

File metadata and controls

95 lines (69 loc) · 3.01 KB

Development

Dependencies

YubiKey PIV Manager requires Python 2, PySide, pycrypto and yubico-piv-tool.

Vagrant VM for development

A Vagrant VM definition for development is included. To use it:

  1. Set up the VM:

    $ cd vagrant/development
    $ vagrant up

    After first startup, restart the VM as instructed on first login:

    alice@work $ vagrant ssh
    ubuntu@ubuntu-xenial $ sudo poweroff
  2. Restart the VM:

    alice@work $ vagrant up
  3. Log into the GUI as the user ubuntu (no password)

  4. Start X:

    ubuntu@ubuntu-xenial $ startx
  5. Open a terminal and install and run YubiKey PIV Manager:

    ubuntu@ubuntu-xenial $ cd /vagrant
    ubuntu@ubuntu-xenial $ sudo python setup.py qt_resources
    ubuntu@ubuntu-xenial $ sudo python setup.py install
    ubuntu@ubuntu-xenial $ pivman

Repeat from (2) as necessary on subsequent uses of the VM.

Building binaries

Binaries for Windows and OSX are built using PyInstaller.

Get the source release file, yubikey-piv-manager-<version>.tar.gz, and extract it. It should contain a single directory, henceforth refered to as the release directory.

When building binaries for Windows or OS X, you will need to include .dll/.dylib files from the yubico-piv-tool project, as well as the yubico-piv-tool executable. Create a subdirectory called "lib" in the release directory. Download the correct binary release for your architecture from https://developers.yubico.com/yubico-piv-tool/Releases/ and extract the .dll/.dylib files and executable to the "lib" directory you created previously.

Windows

For Windows you will need python, PySide, PyCrypto, PyInstaller and Pywin32 installed (32 or 64-bit versions depending on the architecture of the binary your are building).

To sign the executable you will need signtool.exe (from the Windows SDK) either copied into the root as well or in a location in your PATH, as well as a certificate in the Windows certificate store that you wish to sign with.

Run "python setup.py executable" from the main release directory.

With NSIS installed, a Windows installer will be built as well.

OSX

For OSX you need python, pyside, pycrypto, and pyinstaller installed. One way to install these dependencies is by using Homebrew:

brew install python
brew install pyside
pip install PyInstaller
pip install pycrypto
Note
Homebrew will build backwards-incompatible binaries, so the resulting build will not run on an older version of OSX.

Run "python setup.py executable" from the main release directory. This will create an .app in the dist directory.

Sign the code using codesign:

codesign -s 'Developer ID Application' dist/YubiKey\ PIV\ Manager.app --deep

There is also a project file for use with Packages located at resources/pivman.pkgproj. This can be used to create an installer for distribution, which you should sign prior to distribution:

packagesbuild resources/osx-installer.pkgproj
productsign --sign 'Developer ID Installer' dist/YubiKey\ PIV\ Manager.pkg dist/yubikey-piv-manager-mac.pkg