-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ubuntu 22.04 as base JDK 19 sdk 10406996_latest cmake 3.22.1 ndk 26.1.10909125
- Loading branch information
1 parent
cb09a91
commit b0b7e4f
Showing
10 changed files
with
341 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Default image that can build OpenRCT2 for Android. | ||
FROM ubuntu:22.04 | ||
RUN apt-get update && \ | ||
apt-get -y upgrade && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ | ||
# System | ||
ca-certificates curl unzip \ | ||
# Build tools | ||
git cmake pkg-config ninja-build ccache g++ \ | ||
# Sprite builder libraries for the host | ||
libpng-dev \ | ||
openjdk-19-jdk | ||
|
||
ENV ANDROID_HOME=/android-dev | ||
ENV ANDROID_NDK_HOME="$ANDROID_HOME/ndk" | ||
ENV JAVA_HOME=/usr/lib/jvm/java-19-openjdk-amd64 | ||
|
||
# Grab the Android SDK | ||
WORKDIR /tmp/setup | ||
RUN curl -Lo sdk.zip https://dl.google.com/android/repository/commandlinetools-linux-10406996_latest.zip \ | ||
&& unzip -qo sdk.zip \ | ||
&& mkdir -p $ANDROID_HOME/cmdline-tools \ | ||
&& mv cmdline-tools $ANDROID_HOME/cmdline-tools/latest \ | ||
&& rm sdk.zip | ||
|
||
# Need nlohmann/json, needs to live outside system libraries, so it doesn't | ||
# confuse toolchain to include other host headers | ||
RUN curl -Lo json.zip https://github.com/nlohmann/json/releases/download/v3.11.2/include.zip \ | ||
&& unzip -qo json.zip -d json \ | ||
&& mv json/include/nlohmann /nlohmann \ | ||
&& rm json.zip | ||
|
||
# Clean up | ||
RUN rm -rf /tmp/setup | ||
WORKDIR / | ||
|
||
# Accept SDK licenses | ||
RUN yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses > /dev/null | ||
|
||
# Install NDK | ||
RUN "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "patcher;v4" | ||
RUN "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "ndk;26.1.10909125" | ||
RUN "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "cmake;3.22.1" | ||
RUN "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "build-tools;34.0.0" | ||
RUN "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "platforms;android-31" | ||
RUN "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "platform-tools" | ||
|
||
# Bash is required for OpenRCT2 CI | ||
SHELL ["/bin/bash", "-c"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Supplementart image that can build OpenRCT2 for Linux (amd64). | ||
# Provides building with cmake+ninja using either gcc or clang. | ||
FROM debian:bullseye | ||
RUN apt-get update && \ | ||
apt-get -y upgrade && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ | ||
# System | ||
ca-certificates curl file libcairo2 patchelf unzip \ | ||
# Build tools | ||
git cmake pkg-config ninja-build ccache g++ clang \ | ||
# Build libraries | ||
libsdl2-dev libspeex-dev libspeexdsp-dev \ | ||
libflac-dev libogg-dev libvorbis-dev libopenal-dev \ | ||
libcrypto++-dev libcurl4-openssl-dev libssl-dev \ | ||
libfontconfig1-dev libfreetype6-dev \ | ||
libicu-dev libpng-dev libzip-dev \ | ||
nlohmann-json3-dev \ | ||
# Testing libraries | ||
libgtest-dev | ||
|
||
# Bash is required for OpenRCT2 CI | ||
SHELL ["/bin/bash", "-c"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Default image that can build OpenRCT2 for Linux (amd64). | ||
# Provides building with cmake+ninja using either gcc or clang. | ||
FROM ubuntu:20.04 | ||
RUN apt-get update && \ | ||
apt-get -y upgrade && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ | ||
# System | ||
ca-certificates curl file libcairo2 patchelf unzip \ | ||
# Build tools | ||
git cmake pkg-config ninja-build ccache g++ clang \ | ||
# Build libraries | ||
libsdl2-dev libspeex-dev libspeexdsp-dev \ | ||
libflac-dev libogg-dev libvorbis-dev libopenal-dev \ | ||
libcrypto++-dev libcurl4-openssl-dev libssl-dev \ | ||
libfontconfig1-dev libfreetype6-dev \ | ||
libicu-dev libpng-dev libzip-dev \ | ||
nlohmann-json3-dev \ | ||
# Testing libraries | ||
libgtest-dev | ||
|
||
# Bash is required for OpenRCT2 CI | ||
SHELL ["/bin/bash", "-c"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Default image that can build OpenRCT2 for Linux (i686). | ||
# Provides building with cmake+ninja using gcc. | ||
FROM ubuntu:20.04 | ||
RUN dpkg --add-architecture i386 \ | ||
&& apt-get update \ | ||
&& apt-get install -y g++-multilib \ | ||
# && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 60 \ | ||
&& apt-get update \ | ||
&& apt-get -y upgrade \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ | ||
# System | ||
ca-certificates curl unzip \ | ||
# Build tools | ||
git cmake ninja-build ccache \ | ||
pkg-config:i386 \ | ||
# Build libraries | ||
libsdl2-dev:i386 libspeex-dev:i386 libspeexdsp-dev:i386 \ | ||
libflac-dev:i386 libogg-dev:i386 libvorbis-dev:i386 libopenal-dev:i386 \ | ||
libcurl4-openssl-dev:i386 libssl-dev:i386 \ | ||
libfontconfig1-dev:i386 libfreetype6-dev:i386 \ | ||
libpng-dev:i386 libzip-dev:i386 libicu-dev:i386 \ | ||
nlohmann-json3-dev \ | ||
# Testing libraries | ||
libgtest-dev | ||
|
||
# Bash is required for OpenRCT2 CI | ||
SHELL ["/bin/bash", "-c"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Image specifically designed to run clang-format on OpenRCT2 source files. | ||
FROM alpine | ||
RUN apk add --no-cache python3 clang-extra-tools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Default image that can build OpenRCT2 for Linux (amd64). | ||
# Provides building with cmake+ninja using either gcc or clang. | ||
FROM ubuntu:22.04 | ||
RUN apt-get update && \ | ||
apt-get -y upgrade && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ | ||
# System | ||
ca-certificates curl file libcairo2 patchelf unzip \ | ||
# Build tools | ||
git cmake pkg-config ninja-build ccache g++ clang llvm \ | ||
# Build libraries | ||
libsdl2-dev libspeex-dev libspeexdsp-dev xz-utils \ | ||
libflac-dev libogg-dev libvorbis-dev libopenal-dev \ | ||
libcrypto++-dev libcurl4-openssl-dev libssl-dev \ | ||
libfontconfig1-dev libfreetype6-dev \ | ||
libicu-dev libpng-dev libzip-dev \ | ||
nlohmann-json3-dev \ | ||
# Testing libraries | ||
libgtest-dev | ||
|
||
# Bash is required for OpenRCT2 CI | ||
SHELL ["/bin/bash", "-c"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Default image that can build OpenRCT2 for Linux (i686). | ||
# Provides building with cmake+ninja using gcc. | ||
FROM ubuntu:22.04 | ||
RUN dpkg --add-architecture i386 \ | ||
&& apt-get update \ | ||
&& apt-get install -y g++-multilib \ | ||
# && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 60 \ | ||
&& apt-get update \ | ||
&& apt-get -y upgrade \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ | ||
# System | ||
ca-certificates curl unzip \ | ||
# Build tools | ||
git cmake ninja-build ccache \ | ||
pkg-config:i386 \ | ||
# Build libraries | ||
libsdl2-dev:i386 libspeex-dev:i386 libspeexdsp-dev:i386 \ | ||
libflac-dev:i386 libogg-dev:i386 libvorbis-dev:i386 libopenal-dev:i386 \ | ||
libcurl4-openssl-dev:i386 libssl-dev:i386 \ | ||
libfontconfig1-dev:i386 libfreetype6-dev:i386 \ | ||
libpng-dev:i386 libzip-dev:i386 libicu-dev:i386 \ | ||
nlohmann-json3-dev \ | ||
# Testing libraries | ||
libgtest-dev | ||
|
||
# Bash is required for OpenRCT2 CI | ||
SHELL ["/bin/bash", "-c"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
FROM archlinux:latest | ||
|
||
# Based on https://github.com/haffmans/docker-mingw-qt5/blob/master/Dockerfile | ||
|
||
# Update base system | ||
#RUN pacman -Sy --noconfirm --noprogressbar archlinux-keyring \ | ||
# && pacman-key --populate \ | ||
RUN pacman -Syu --noconfirm --noprogressbar pacman \ | ||
&& pacman-db-upgrade \ | ||
&& pacman -Su --noconfirm --noprogressbar ca-certificates \ | ||
&& trust extract-compat \ | ||
&& pacman -Su --noconfirm --noprogressbar git pyalpm base-devel libffi \ | ||
&& pacman -Syyu --noconfirm --noprogressbar \ | ||
&& (echo -e "y\ny\n" | pacman -Scc) | ||
|
||
# Install pikaur | ||
RUN useradd --create-home --comment "Arch Build User" build && \ | ||
groupadd sudo && \ | ||
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers; \ | ||
echo 'Defaults:nobody !requiretty' >> /etc/sudoers; \ | ||
gpasswd -a build sudo | ||
|
||
RUN chown -R build /home/build | ||
|
||
USER build | ||
# Overrides from arch-base | ||
ENV HOME /home/build | ||
|
||
WORKDIR /home/build/ | ||
RUN git clone https://aur.archlinux.org/pikaur.git | ||
|
||
WORKDIR /home/build/pikaur | ||
RUN makepkg -sr --noconfirm | ||
|
||
USER root | ||
RUN pacman -U pikaur-*.zst --noconfirm && pacman -Scc --noconfirm && rm -r /home/build/* | ||
|
||
# Add some useful packages to the base system | ||
RUN pacman -S --noconfirm --noprogressbar \ | ||
make \ | ||
git \ | ||
sudo \ | ||
wget \ | ||
awk \ | ||
sudo \ | ||
fakeroot \ | ||
file \ | ||
patch \ | ||
ninja \ | ||
ccache \ | ||
unzip \ | ||
&& (echo -e "y\ny\n" | pacman -Scc) | ||
|
||
# Add ownstuff repo | ||
# See https://wiki.archlinux.org/index.php/unofficial_user_repositories#ownstuff and https://martchus.no-ip.biz/repoindex/#packages | ||
RUN echo "[ownstuff]" >> /etc/pacman.conf \ | ||
&& echo "SigLevel = Optional TrustAll" >> /etc/pacman.conf \ | ||
&& echo "Server = https://ftp.f3l.de/~martchus/\$repo/os/\$arch" >> /etc/pacman.conf \ | ||
&& echo "Server = https://martchus.no-ip.biz/repo/arch/\$repo/os/\$arch" >> /etc/pacman.conf \ | ||
&& pacman -Sy | ||
|
||
USER build | ||
# Install MingW packages | ||
RUN pikaur -S --noconfirm --noprogressbar \ | ||
mingw-w64-binutils \ | ||
mingw-w64-bzip2 \ | ||
mingw-w64-boost \ | ||
mingw-w64-cmake \ | ||
mingw-w64-crt \ | ||
mingw-w64-curl \ | ||
mingw-w64-flac \ | ||
mingw-w64-fontconfig \ | ||
mingw-w64-freetype2 \ | ||
mingw-w64-gcc \ | ||
mingw-w64-gnutls \ | ||
mingw-w64-headers \ | ||
mingw-w64-libiconv \ | ||
mingw-w64-libogg \ | ||
mingw-w64-libpng \ | ||
mingw-w64-libvorbis \ | ||
mingw-w64-nettle \ | ||
mingw-w64-openal \ | ||
mingw-w64-openssl \ | ||
mingw-w64-pkg-config \ | ||
mingw-w64-sdl2 \ | ||
mingw-w64-speexdsp \ | ||
mingw-w64-tools \ | ||
mingw-w64-winpthreads \ | ||
mingw-w64-xz \ | ||
mingw-w64-zlib \ | ||
pkgconf \ | ||
&& (echo -e "y\ny\n" | sudo pacman -Scc) | ||
|
||
WORKDIR /home/build/ | ||
COPY mingw-w64-libzip mingw-w64-libzip | ||
USER root | ||
# GMP and Nettle seem to have their mingw libraries misnamed. pkg-config | ||
# points to .a, not .dll.a files; additionally cmake removes any such | ||
# extensions, so symlink the files to their expected places | ||
RUN ln -s /usr/i686-w64-mingw32/lib/libp11-kit.dll.a /usr/i686-w64-mingw32/lib/libp11-kit.a \ | ||
&& ln -s /usr/i686-w64-mingw32/lib/libgmp.dll.a /usr/i686-w64-mingw32/lib/libgmp.a | ||
# Brotli has different names for static and non-static libraries, but | ||
# pkg-config only knows the non-static ones. Brotli is required by freetype2 | ||
RUN ln -s /usr/i686-w64-mingw32/lib/libbrotlicommon-static.a /usr/i686-w64-mingw32/lib/libbrotlicommon.a \ | ||
&& ln -s /usr/i686-w64-mingw32/lib/libbrotlidec-static.a /usr/i686-w64-mingw32/lib/libbrotlidec.a | ||
RUN chown -R build /home/build | ||
USER build | ||
WORKDIR /home/build/mingw-w64-libzip | ||
RUN makepkg -sr --noconfirm | ||
USER root | ||
RUN pacman -U mingw-w64-libzip-*.zst --noconfirm && pacman -Scc --noconfirm && rm -r /home/build/* | ||
|
||
RUN wget https://github.com/nlohmann/json/releases/download/v3.11.2/include.zip -O /usr/i686-w64-mingw32/json.zip && unzip /usr/i686-w64-mingw32/json.zip -d /usr/i686-w64-mingw32/ && unzip /usr/i686-w64-mingw32/json.zip -d /usr/x86_64-w64-mingw32/ | ||
|
||
# Bash is required for OpenRCT2 CI | ||
SHELL ["/bin/bash", "-c"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Maintainer: Vaporeon <[email protected]> | ||
# Contributor: xantares | ||
|
||
pkgname=mingw-w64-libzip | ||
pkgver=1.9.2 | ||
pkgrel=1 | ||
pkgdesc="A C library for reading, creating, and modifying zip archives (mingw-w64)" | ||
url="http://www.nih.at/libzip/index.html" | ||
license=('BSD') | ||
arch=(any) | ||
depends=('mingw-w64-xz' 'mingw-w64-zlib' 'mingw-w64-bzip2' 'mingw-w64-openssl' 'mingw-w64-gnutls') | ||
makedepends=('mingw-w64-cmake' 'ninja') | ||
options=('staticlibs' '!buildflags' '!strip') | ||
source=("http://www.nih.at/libzip/libzip-${pkgver}.tar.xz") | ||
sha256sums=('c93e9852b7b2dc931197831438fee5295976ee0ba24f8524a8907be5c2ba5937') | ||
|
||
_architectures="i686-w64-mingw32 x86_64-w64-mingw32" | ||
_pkgname="libzip" | ||
|
||
build() { | ||
for _arch in ${_architectures}; do | ||
${_arch}-cmake -S ${_pkgname}-${pkgver} -B build/${_arch}-static -G Ninja \ | ||
-DBUILD_DOC=OFF \ | ||
-DBUILD_EXAMPLES=OFF \ | ||
-DBUILD_REGRESS=OFF \ | ||
-DBUILD_TOOLS=OFF \ | ||
-DBUILD_SHARED_LIBS=OFF | ||
|
||
${_arch}-cmake -S ${_pkgname}-${pkgver} -B build/${_arch} -G Ninja \ | ||
-DBUILD_DOC=OFF \ | ||
-DBUILD_EXAMPLES=OFF \ | ||
-DBUILD_REGRESS=OFF \ | ||
-DBUILD_TOOLS=OFF | ||
|
||
cmake --build build/${_arch}-static | ||
cmake --build build/${_arch} | ||
done | ||
} | ||
|
||
package() { | ||
for _arch in ${_architectures}; do | ||
DESTDIR="${pkgdir}" cmake --install build/${_arch}-static | ||
DESTDIR="${pkgdir}" cmake --install build/${_arch} | ||
${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll | ||
${_arch}-strip -g "${pkgdir}"/usr/${_arch}/lib/*.a | ||
done | ||
} | ||
|