Browse Source

wine build: use docker to (try to) have reproducible builds

3.2.x
SomberNight 6 years ago
parent
commit
068b6acf79
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 29
      contrib/build-wine/docker/Dockerfile
  2. 42
      contrib/build-wine/docker/README.md

29
contrib/build-wine/docker/Dockerfile

@ -0,0 +1,29 @@
FROM ubuntu:18.04@sha256:5f4bdc3467537cbbe563e80db2c3ec95d548a9145d64453b06939c4592d67b6d
ENV LC_ALL=C.UTF-8 LANG=C.UTF-8
RUN dpkg --add-architecture i386 && \
apt-get update -qq && \
apt-get install -qq \
wget=1.19.4-1ubuntu2.1 \
gnupg2=2.2.4-1ubuntu1.1 \
dirmngr=2.2.4-1ubuntu1.1 \
software-properties-common=0.96.24.32.3 \
&& \
wget -nc https://dl.winehq.org/wine-builds/Release.key && \
apt-key add Release.key && \
apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/ && \
apt-get update -qq && \
apt-get install -qq \
winehq-stable=3.0.1~bionic \
git=1:2.17.1-1ubuntu0.1 \
p7zip-full=16.02+dfsg-6 \
make=4.1-9.1ubuntu1 \
mingw-w64=5.0.3-1 \
autotools-dev=20180224.1 \
autoconf=2.69-11 \
libtool=2.4.6-2 \
&& \
rm -rf /var/lib/apt/lists/* && \
apt-get autoremove -y && \
apt-get clean

42
contrib/build-wine/docker/README.md

@ -0,0 +1,42 @@
Deterministic Windows binaries with Docker
==========================================
This assumes an Ubuntu host, but it should not be too hard to adopt to another
similar system.
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
```
$ cd contrib/build-wine/docker
$ PROJECT_ROOT=$(pwd)/../../../
$ sudo docker build --no-cache -t electrum-wine-builder-img .
```
Note: see [this](https://stackoverflow.com/a/40516974/7499128) if having dns problems
3. Build Windows binaries
```
$ TARGET=master
$ sudo docker run \
--name electrum-wine-builder-cont \
-v ${PROJECT_ROOT}:/opt/electrum \
--rm \
--workdir /opt/electrum/contrib/build-wine \
electrum-wine-builder-img \
./build.sh $TARGET
```
4. The generated binaries are in `$PROJECT_ROOT/contrib/build-wine/dist`.
Note: the `setup` binary (NSIS installer) is not deterministic yet.
Loading…
Cancel
Save