diff --git a/README.md b/README.md new file mode 100644 index 0000000..7460ad5 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# build-environments +Dockerfile entries used for building yuzu binaries. + +https://hub.docker.com/r/yuzuemu/yuzu-build-environments/ diff --git a/linux-clang-format/Dockerfile b/linux-clang-format/Dockerfile new file mode 100644 index 0000000..608e363 --- /dev/null +++ b/linux-clang-format/Dockerfile @@ -0,0 +1,5 @@ +FROM ubuntu:18.04 +MAINTAINER yuzu +RUN useradd -m -s /bin/bash yuzu +RUN apt-get update && apt-get -y full-upgrade +RUN apt-get install -y git clang-format-6.0 diff --git a/linux-fresh/Dockerfile b/linux-fresh/Dockerfile new file mode 100644 index 0000000..abdc099 --- /dev/null +++ b/linux-fresh/Dockerfile @@ -0,0 +1,5 @@ +FROM ubuntu:18.04 +MAINTAINER yuzu +RUN useradd -m -s /bin/bash yuzu +RUN apt-get update && apt-get -y full-upgrade +RUN apt-get install --no-install-recommends -y build-essential libsdl2-dev libssl-dev python qtbase5-dev qtwebengine5-dev libqt5opengl5-dev wget git ccache cmake ninja-build diff --git a/linux-mingw/Dockerfile b/linux-mingw/Dockerfile new file mode 100644 index 0000000..dac207c --- /dev/null +++ b/linux-mingw/Dockerfile @@ -0,0 +1,12 @@ +FROM ubuntu:18.04 +MAINTAINER yuzu +RUN useradd -m -s /bin/bash yuzu && mkdir -p /tmp/pkgs +RUN apt-get update && apt-get install -y gpg wget git python3-pip python ccache p7zip-full g++-mingw-w64-x86-64 gcc-mingw-w64-x86-64 mingw-w64-tools cmake ninja-build +# workaround broken headers in Ubuntu MinGW package +COPY errno.h /usr/x86_64-w64-mingw32/include/ +# add mingw-w64 auxiliary ppa repository +RUN echo 'deb http://ppa.launchpad.net/tobydox/mingw-w64/ubuntu bionic main ' > /etc/apt/sources.list.d/extras.list +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv '72931B477E22FEFD47F8DECE02FE5F12ADDE29B2' && apt-get update +RUN apt-get install -y sdl2-mingw-w64 qt5base-mingw-w64 qt5tools-mingw-w64 libsamplerate-mingw-w64 qt5multimedia-mingw-w64 +COPY mingw-setup.sh /tmp/pkgs +RUN cd /tmp/pkgs && bash -e mingw-setup.sh diff --git a/linux-mingw/errno.h b/linux-mingw/errno.h new file mode 100644 index 0000000..390f77c --- /dev/null +++ b/linux-mingw/errno.h @@ -0,0 +1,241 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the mingw-w64 runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ +#ifndef _INC_ERRNO +#define _INC_ERRNO + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _CRT_ERRNO_DEFINED +#define _CRT_ERRNO_DEFINED +_CRTIMP extern int *__cdecl _errno(void); +#define errno (*_errno()) + +errno_t __cdecl _set_errno(int _Value); +errno_t __cdecl _get_errno(int *_Value); +#endif /* _CRT_ERRNO_DEFINED */ + +#define EPERM 1 +#define ENOENT 2 +#define ENOFILE ENOENT +#define ESRCH 3 +#define EINTR 4 +#define EIO 5 +#define ENXIO 6 +#define E2BIG 7 +#define ENOEXEC 8 +#define EBADF 9 +#define ECHILD 10 +#define EAGAIN 11 +#define ENOMEM 12 +#define EACCES 13 +#define EFAULT 14 +#define EBUSY 16 +#define EEXIST 17 +#define EXDEV 18 +#define ENODEV 19 +#define ENOTDIR 20 +#define EISDIR 21 +#define ENFILE 23 +#define EMFILE 24 +#define ENOTTY 25 +#define EFBIG 27 +#define ENOSPC 28 +#define ESPIPE 29 +#define EROFS 30 +#define EMLINK 31 +#define EPIPE 32 +#define EDOM 33 +#define EDEADLK 36 +#define ENAMETOOLONG 38 +#define ENOLCK 39 +#define ENOSYS 40 +#define ENOTEMPTY 41 + +#ifndef RC_INVOKED +#if !defined(_SECURECRT_ERRCODE_VALUES_DEFINED) +#define _SECURECRT_ERRCODE_VALUES_DEFINED +#define EINVAL 22 +#define ERANGE 34 +#define EILSEQ 42 +#define STRUNCATE 80 +#endif +#endif + +#define EDEADLOCK EDEADLK + +/* Posix thread extensions. */ + +#ifndef ENOTSUP +#define ENOTSUP 129 +#endif + +/* Extension defined as by report VC 10+ defines error-numbers. */ + +#ifndef EAFNOSUPPORT +#define EAFNOSUPPORT 102 +#endif + +#ifndef EADDRINUSE +#define EADDRINUSE 100 +#endif + +#ifndef EADDRNOTAVAIL +#define EADDRNOTAVAIL 101 +#endif + +#ifndef EISCONN +#define EISCONN 113 +#endif + +#ifndef ENOBUFS +#define ENOBUFS 119 +#endif + +#ifndef ECONNABORTED +#define ECONNABORTED 106 +#endif + +#ifndef EALREADY +#define EALREADY 103 +#endif + +#ifndef ECONNREFUSED +#define ECONNREFUSED 107 +#endif + +#ifndef ECONNRESET +#define ECONNRESET 108 +#endif + +#ifndef EDESTADDRREQ +#define EDESTADDRREQ 109 +#endif + +#ifndef EHOSTUNREACH +#define EHOSTUNREACH 110 +#endif + +#ifndef EMSGSIZE +#define EMSGSIZE 115 +#endif + +#ifndef ENETDOWN +#define ENETDOWN 116 +#endif + +#ifndef ENETRESET +#define ENETRESET 117 +#endif + +#ifndef ENETUNREACH +#define ENETUNREACH 118 +#endif + +#ifndef ENOPROTOOPT +#define ENOPROTOOPT 123 +#endif + +#ifndef ENOTSOCK +#define ENOTSOCK 128 +#endif + +#ifndef ENOTCONN +#define ENOTCONN 126 +#endif + +#ifndef ECANCELED +#define ECANCELED 105 +#endif + +#ifndef EINPROGRESS +#define EINPROGRESS 112 +#endif + +#ifndef EOPNOTSUPP +#define EOPNOTSUPP 130 +#endif + +#ifndef EWOULDBLOCK +#define EWOULDBLOCK 140 +#endif + +#ifndef EOWNERDEAD +#define EOWNERDEAD 133 +#endif + +#ifndef EPROTO +#define EPROTO 134 +#endif + +#ifndef EPROTONOSUPPORT +#define EPROTONOSUPPORT 135 +#endif + +#ifndef EBADMSG +#define EBADMSG 104 +#endif + +#ifndef EIDRM +#define EIDRM 111 +#endif + +#ifndef ENODATA +#define ENODATA 120 +#endif + +#ifndef ENOLINK +#define ENOLINK 121 +#endif + +#ifndef ENOMSG +#define ENOMSG 122 +#endif + +#ifndef ENOSR +#define ENOSR 124 +#endif + +#ifndef ENOSTR +#define ENOSTR 125 +#endif + +#ifndef ENOTRECOVERABLE +#define ENOTRECOVERABLE 127 +#endif + +#ifndef ETIME +#define ETIME 137 +#endif + +#ifndef ETXTBSY +#define ETXTBSY 139 +#endif + +/* Defined as WSAETIMEDOUT. */ +#ifndef ETIMEDOUT +#define ETIMEDOUT 138 +#endif + +#ifndef ELOOP +#define ELOOP 114 +#endif + +#ifndef EPROTOTYPE +#define EPROTOTYPE 136 +#endif + +#ifndef EOVERFLOW +#define EOVERFLOW 132 +#endif + +#ifdef __cplusplus +} +#endif +#endif diff --git a/linux-mingw/mingw-setup.sh b/linux-mingw/mingw-setup.sh new file mode 100644 index 0000000..728eab7 --- /dev/null +++ b/linux-mingw/mingw-setup.sh @@ -0,0 +1,28 @@ +#!/usr/bin/bash -e +# install pefile +pip3 install pefile + +MINGW_URL='https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z/download' +TARGET_DIR='mingw64/x86_64-w64-mingw32/lib/' + +echo 'Downloading MinGW replacement binaries...' +wget -q "${MINGW_URL}" -O 'mingw.7z' +7z x 'mingw.7z' "${TARGET_DIR}"lib{mf,mfplat,mfuuid}.a +cp -rv "${TARGET_DIR}"/* '/usr/x86_64-w64-mingw32/lib/' + +# ffmpeg +FFMPEG_VER='4.1' +for i in 'shared' 'dev'; do + echo "Downloading ffmpeg (${i})..." + wget -q -c "https://ffmpeg.zeranoe.com/builds/win64/${i}/ffmpeg-${FFMPEG_VER}-win64-${i}.zip" + 7z x "ffmpeg-${FFMPEG_VER}-win64-${i}.zip" > /dev/null +done + +echo "Copying ffmpeg ${FFMPEG_VER} files to sysroot..." +cp -v "ffmpeg-${FFMPEG_VER}-win64-shared"/bin/*.dll /usr/x86_64-w64-mingw32/lib/ +cp -vr "ffmpeg-${FFMPEG_VER}-win64-dev"/include /usr/x86_64-w64-mingw32/ +cp -v "ffmpeg-${FFMPEG_VER}-win64-dev"/lib/*.{a,def} /usr/x86_64-w64-mingw32/lib/ + +# remove the directory +ABS_PATH="$(readlink -f $0)" +rm -rf "$(dirname ${ABS_PATH})" diff --git a/linux-transifex/Dockerfile b/linux-transifex/Dockerfile new file mode 100644 index 0000000..9ad669e --- /dev/null +++ b/linux-transifex/Dockerfile @@ -0,0 +1,4 @@ +FROM alpine +RUN adduser -u 1000 -D -s /bin/bash yuzu +RUN apk update && apk add build-base cmake python3-dev qt5-qttools-dev qt5-qtmultimedia-dev +RUN pip3 install transifex-client