Browse Source

Add docker files for building wine libs more easily

Signed-off-by: falkTX <falktx@falktx.com>
pull/1933/head
falkTX 1 month ago
parent
commit
9fa38c58df
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 77 additions and 0 deletions
  1. +6
    -0
      data/docker/.dockerignore
  2. +46
    -0
      data/docker/Dockerfile
  3. +25
    -0
      data/docker/build.sh

+ 6
- 0
data/docker/.dockerignore View File

@@ -0,0 +1,6 @@
# binary files
*.dll
*.so

# this script
build.sh

+ 46
- 0
data/docker/Dockerfile View File

@@ -0,0 +1,46 @@
FROM ubuntu:20.04
LABEL maintainer="falkTX <falktx@falktx.com>"
ENV DEBIAN_FRONTEND noninteractive

# enable i386
RUN dpkg --add-architecture i386

# update system
RUN apt-get update -qq && apt-get upgrade -qqy && apt-get clean

# install packages needed for build
RUN apt-get install -qqy --no-install-recommends ca-certificates g++-multilib git libgl-dev make openssl pkg-config wget && \
apt-get clean

# install newer wine
RUN mkdir -pm755 /etc/apt/keyrings && \
wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key && \
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/focal/winehq-focal.sources

RUN apt-get update -qq && \
apt-get install -qqy --no-install-recommends winehq-stable wine-stable-dev && \
apt-get clean

# fetch Carla
RUN git clone --recursive https://github.com/falkTX/Carla.git --depth=1 # v4
WORKDIR /Carla

# build plugin-wine 32bit
RUN apt-get install -yqq --no-install-recommends libx11-dev:i386 && apt-get clean
RUN CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32 make plugin plugin-wine
RUN mkdir bin32
RUN mv bin/CarlaVst*ShellBridged.dll* bin32
RUN make distclean

# build plugin-wine 64bit
RUN apt-get install -yqq --no-install-recommends libx11-dev:amd64 && apt-get clean
RUN CFLAGS=-m64 CXXFLAGS=-m64 LDFLAGS=-m64 make plugin plugin-wine
RUN mkdir bin64
RUN mv bin/CarlaVst*ShellBridged.dll* bin64
RUN make distclean

# build Carla wine bridges
RUN make wine32 wine64

# CMD for inspection
CMD ["bash"]

+ 25
- 0
data/docker/build.sh View File

@@ -0,0 +1,25 @@
#!/bin/bash

cd $(dirname $0)

rm -rf bin32 bin64 *.dll

set -e

mkdir bin32 bin64
docker build -t carla-bridge-win .
docker run -v $PWD:/mnt --rm --entrypoint \
cp carla-bridge-win:latest \
/Carla/bin32/CarlaVstShellBridged.dll.so \
/Carla/bin32/CarlaVstFxShellBridged.dll.so \
/mnt/bin32
docker run -v $PWD:/mnt --rm --entrypoint \
cp carla-bridge-win:latest \
/Carla/bin64/CarlaVstShellBridged.dll.so \
/Carla/bin64/CarlaVstFxShellBridged.dll.so \
/mnt/bin64
docker run -v $PWD:/mnt --rm --entrypoint \
cp carla-bridge-win:latest \
/Carla/bin/jackbridge-wine32.dll \
/Carla/bin/jackbridge-wine64.dll \
/mnt

Loading…
Cancel
Save