LBRY-Vault/contrib/build-wine/docker/README.md
Filip Gospodinov 73fee2fefa build-wine: allow local testing
Before, it was only possible to test commits that are
on Github (pull request or merged). Now, changes can be
tested locally too.

This introduces the risk that a release could be built
containing uncommitted changes which by definition breaks
deterministic builds. Fortunately, this will always be
detected because the version string is created using
`git describe --tags --dirty`.

Also, retire $TARGET variable because it decouples the
build scripts from the commit revision to be built. This
is a problem for deterministic  builds.
2018-07-10 13:33:46 +02:00

1.2 KiB

Deterministic Windows binaries with Docker

This assumes an Ubuntu host, but it should not be too hard to adapt to another similar system. The docker commands should be executed in the project's root folder.

  1. Install Docker

    $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    $ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
    $ sudo apt-get update
    $ sudo apt-get install -y docker-ce
    
  2. Build image

    $ sudo docker build --no-cache -t electrum-wine-builder-img contrib/build-wine/docker
    

    Note: see this if having dns problems

  3. Build Windows binaries

    $ git checkout $REV
    $ sudo docker run \
        --name electrum-wine-builder-cont \
        -v $PWD:/opt/wine64/drive_c/electrum \
        --rm \
        --workdir /opt/wine64/drive_c/electrum/contrib/build-wine \
        electrum-wine-builder-img \
        ./build.sh
    
  4. The generated binaries are in ./contrib/build-wine/dist.

Note: the setup binary (NSIS installer) is not deterministic yet.