Skip to content

Commit cc03a9d

Browse files
committed
Add Version 20 with zstd
1 parent 3fde41c commit cc03a9d

10 files changed

Lines changed: 380 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
matrix:
1313
# Remember if you commit this, newly built images will replace those tags.
1414
# Prefer incrementing the version to unused one
15-
tag: [19-android, 19-noble, 19-bookworm, 19-format, 19-mingw, 19-emscripten]
15+
tag: [20-android, 20-noble, 20-bookworm, 20-format, 20-mingw, 20-emscripten]
1616
env:
1717
dockertag: ${{ matrix.tag }}
1818
steps:
@@ -39,10 +39,10 @@ jobs:
3939
run: |
4040
if [ "$dockerid" != "" ]; then
4141
docker login -u "$dockerid" -p "$dockerpass"
42-
docker pull openrct2/openrct2-build:19-noble
43-
docker tag openrct2/openrct2-build:19-noble openrct2/openrct2-build:19
44-
docker tag openrct2/openrct2-build:19-noble openrct2/openrct2-build:latest
45-
docker push openrct2/openrct2-build:19
42+
docker pull openrct2/openrct2-build:20-noble
43+
docker tag openrct2/openrct2-build:20-noble openrct2/openrct2-build:20
44+
docker tag openrct2/openrct2-build:20-noble openrct2/openrct2-build:latest
45+
docker push openrct2/openrct2-build:20
4646
docker push openrct2/openrct2-build:latest
4747
else
4848
echo 'Images not tagged'

20/android/Dockerfile

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Default image that can build OpenRCT2 for Android.
2+
FROM ubuntu:24.04
3+
RUN apt-get update && \
4+
apt-get -y upgrade && \
5+
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
6+
# System
7+
ca-certificates curl unzip \
8+
# Build tools
9+
git cmake pkg-config ninja-build ccache g++ \
10+
# Sprite builder libraries for the host
11+
libpng-dev \
12+
openjdk-21-jdk
13+
14+
ENV ANDROID_HOME=/android-dev
15+
ENV ANDROID_NDK_HOME="$ANDROID_HOME/ndk"
16+
ENV JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64
17+
18+
# Grab the Android SDK
19+
WORKDIR /tmp/setup
20+
RUN curl -Lo sdk.zip https://dl.google.com/android/repository/commandlinetools-linux-13114758_latest.zip \
21+
&& unzip -qo sdk.zip \
22+
&& mkdir -p $ANDROID_HOME/cmdline-tools \
23+
&& mv cmdline-tools $ANDROID_HOME/cmdline-tools/latest \
24+
&& rm sdk.zip
25+
26+
# Need nlohmann/json, needs to live outside system libraries, so it doesn't
27+
# confuse toolchain to include other host headers.
28+
# 3.12.0 contains a major issue related to utf8 strings. Should be fixed when 3.12.1 releases
29+
RUN curl -Lo json.zip https://github.com/nlohmann/json/releases/download/v3.11.3/include.zip \
30+
&& unzip -qo json.zip -d json \
31+
&& mkdir -p /opt/openrct2/include/ \
32+
&& mv json/include/nlohmann /opt/openrct2/include/nlohmann \
33+
&& rm json.zip
34+
35+
# Clean up
36+
RUN rm -rf /tmp/setup
37+
WORKDIR /
38+
39+
# Accept SDK licenses
40+
RUN yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses > /dev/null
41+
42+
# Install NDK
43+
RUN "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "ndk;27.3.13750724"
44+
RUN "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "cmake;4.0.3"
45+
RUN "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "build-tools;36.0.0"
46+
RUN "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "platforms;android-36"
47+
RUN "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "platform-tools"
48+
49+
# Bash is required for OpenRCT2 CI
50+
SHELL ["/bin/bash", "-c"]

20/bookworm/Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Supplementart image that can build OpenRCT2 for Linux (amd64).
2+
# Provides building with cmake+ninja using either gcc or clang.
3+
FROM debian:bookworm
4+
RUN apt-get update && \
5+
apt-get -y upgrade && \
6+
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
7+
# System
8+
ca-certificates curl file libcairo2 patchelf unzip \
9+
# Build tools
10+
git cmake pkg-config ninja-build ccache g++ clang \
11+
# Build libraries
12+
libsdl2-dev libspeex-dev libspeexdsp-dev \
13+
libflac-dev libogg-dev libvorbis-dev libopenal-dev \
14+
libcrypto++-dev libcurl4-openssl-dev libssl-dev \
15+
libfontconfig1-dev libfreetype6-dev \
16+
libicu-dev libpng-dev libzip-dev \
17+
nlohmann-json3-dev libzstd-dev \
18+
# Testing libraries
19+
libgtest-dev
20+
21+
# Bash is required for OpenRCT2 CI
22+
SHELL ["/bin/bash", "-c"]

20/emscripten/Dockerfile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
FROM docker.io/library/fedora:42
2+
3+
RUN dnf update -y && dnf install -y git cmake make gcc g++ nlohmann-json-devel autoreconf libtool openssl-devel libcurl-devel fontconfig-devel libzip-devel SDL2-devel zip speexdsp-devel ninja-build hostname ccache libatomic
4+
5+
WORKDIR /
6+
7+
RUN git clone https://github.com/emscripten-core/emsdk.git
8+
9+
WORKDIR /emsdk/
10+
11+
# Pin version - to prevent sudden breakage of the CI
12+
RUN ./emsdk install 4.0.11
13+
RUN ./emsdk activate 4.0.11
14+
15+
# "Install" json headers to emscripten include directory
16+
RUN cp -r /usr/include/nlohmann /emsdk/upstream/emscripten/cache/sysroot/include/nlohmann
17+
18+
# Add emscripten to path
19+
ENV PATH="/emsdk:/emsdk/upstream/emscripten:/emsdk/node/22.16.0_64bit/bin:$PATH"
20+
21+
WORKDIR /ext/
22+
23+
COPY build-depends.sh /ext/
24+
COPY cors_serve.py /usr/bin/
25+
26+
# Build emscripten dependencies
27+
RUN bash build-depends.sh
28+
29+
# Set ENV variables for speexdsp, icu, and libzip
30+
ENV SPEEXDSP_ROOT="/ext/speexdsp"
31+
ENV ICU_ROOT="/ext/icu/icu4c/source"
32+
ENV LIBZIP_ROOT="/ext/libzip/build"
33+
34+
35+
SHELL ["/bin/bash", "-c"]

20/emscripten/build-depends.sh

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#!/bin/bash
2+
3+
START_DIR=/ext
4+
5+
cd $START_DIR
6+
7+
# Pin versions - to prevent sudden breakage
8+
if [ ! -d "speexdsp" ]; then
9+
git clone https://gitlab.xiph.org/xiph/speexdsp.git --depth 1 --branch SpeexDSP-1.2.1
10+
fi
11+
if [ ! -d "icu" ]; then
12+
git clone https://github.com/unicode-org/icu.git --depth 1 --branch release-77-1
13+
fi
14+
if [ ! -d "libzip" ]; then
15+
git clone https://github.com/nih-at/libzip.git --depth 1 --branch v1.11.4
16+
fi
17+
if [ ! -d "zlib" ]; then
18+
git clone https://github.com/madler/zlib.git --depth 1 --branch v1.3.1
19+
fi
20+
if [ ! -d "zstd" ]; then
21+
git clone https://github.com/facebook/zstd.git --depth 1 --branch v1.5.7
22+
fi
23+
24+
cd speexdsp
25+
emmake ./autogen.sh
26+
emmake ./configure --enable-shared --disable-neon
27+
emmake make -j$(nproc)
28+
cd $START_DIR
29+
30+
cd icu/icu4c/source
31+
ac_cv_namespace_ok=yes icu_cv_host_frag=mh-linux emmake ./configure \
32+
--enable-release \
33+
--enable-shared \
34+
--disable-icu-config \
35+
--disable-extras \
36+
--disable-icuio \
37+
--disable-layoutex \
38+
--disable-tools \
39+
--disable-tests \
40+
--disable-samples
41+
emmake make -j$(nproc)
42+
cd $START_DIR
43+
44+
cd zlib
45+
mkdir -p build/
46+
cd build/
47+
emcmake cmake ../
48+
emmake make zlib -j$(nproc)
49+
emmake make install
50+
ZLIB_ROOT=$(pwd)
51+
cd $START_DIR
52+
53+
cd libzip
54+
mkdir -p build/
55+
cd build/
56+
emcmake cmake ../ -DZLIB_INCLUDE_DIR="$ZLIB_ROOT" -DZLIB_LIBRARY="$ZLIB_ROOT/libz.a"
57+
emmake make zip -j$(nproc)
58+
emmake make install
59+
cd $START_DIR
60+
61+
cd zstd
62+
mkdir -p build/build/
63+
cd build/build/
64+
emcmake cmake ../cmake/ -DZSTD_BUILD_STATIC=ON -DZSTD_BUILD_SHARED=OFF -DZSTD_BUILD_PROGRAMS=OFF
65+
emmake make -j$(nproc)
66+
emmake make install
67+
cd $START_DIR

20/emscripten/cors_serve.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env python3
2+
from http.server import HTTPServer, SimpleHTTPRequestHandler, test
3+
import sys
4+
5+
class CORSRequestHandler (SimpleHTTPRequestHandler):
6+
def end_headers (self):
7+
self.send_header('Cross-Origin-Embedder-Policy', 'require-corp')
8+
self.send_header('Cross-Origin-Opener-Policy', 'same-origin')
9+
SimpleHTTPRequestHandler.end_headers(self)
10+
11+
def main():
12+
test(CORSRequestHandler, HTTPServer, port=int(sys.argv[1]) if len(sys.argv) > 1 else 8000)
13+
14+
if __name__ == '__main__':
15+
main()

20/format/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Image specifically designed to run clang-format on OpenRCT2 source files.
2+
FROM alpine
3+
RUN apk add --no-cache python3 clang20-extra-tools

20/mingw/Dockerfile

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
FROM archlinux:latest
2+
3+
# Based on https://github.com/haffmans/docker-mingw-qt5/blob/master/Dockerfile
4+
5+
# Update base system
6+
#RUN pacman -Sy --noconfirm --noprogressbar archlinux-keyring \
7+
# && pacman-key --populate \
8+
RUN pacman -Syu --noconfirm --noprogressbar pacman \
9+
&& pacman-db-upgrade \
10+
&& pacman -Su --noconfirm --noprogressbar ca-certificates \
11+
&& trust extract-compat \
12+
&& pacman -Su --noconfirm --noprogressbar git pyalpm base-devel libffi \
13+
&& pacman -Syyu --noconfirm --noprogressbar \
14+
&& (echo -e "y\ny\n" | pacman -Scc)
15+
16+
# Install pikaur
17+
RUN useradd --create-home --comment "Arch Build User" build && \
18+
groupadd sudo && \
19+
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers; \
20+
echo 'Defaults:nobody !requiretty' >> /etc/sudoers; \
21+
gpasswd -a build sudo
22+
23+
RUN chown -R build /home/build
24+
25+
USER build
26+
# Overrides from arch-base
27+
ENV HOME /home/build
28+
29+
WORKDIR /home/build/
30+
RUN git clone https://aur.archlinux.org/pikaur.git
31+
32+
WORKDIR /home/build/pikaur
33+
RUN makepkg -sr --noconfirm
34+
35+
USER root
36+
RUN pacman -U pikaur-*.zst --noconfirm && pacman -Scc --noconfirm && rm -r /home/build/*
37+
38+
# Add some useful packages to the base system
39+
RUN pacman -S --noconfirm --noprogressbar \
40+
make \
41+
git \
42+
sudo \
43+
wget \
44+
awk \
45+
sudo \
46+
fakeroot \
47+
file \
48+
patch \
49+
ninja \
50+
ccache \
51+
unzip \
52+
&& (echo -e "y\ny\n" | pacman -Scc)
53+
54+
# Add ownstuff repo
55+
# See https://wiki.archlinux.org/index.php/unofficial_user_repositories#ownstuff and https://martchus.no-ip.biz/repoindex/#packages
56+
RUN echo "[ownstuff]" >> /etc/pacman.conf \
57+
&& echo "SigLevel = Optional TrustAll" >> /etc/pacman.conf \
58+
&& echo "Server = https://ftp.f3l.de/~martchus/\$repo/os/\$arch" >> /etc/pacman.conf \
59+
&& echo "Server = https://martchus.no-ip.biz/repo/arch/\$repo/os/\$arch" >> /etc/pacman.conf \
60+
&& pacman -Sy
61+
62+
USER build
63+
# Install MingW packages
64+
RUN pikaur -S --noconfirm --noprogressbar \
65+
mingw-w64-binutils \
66+
mingw-w64-bzip2 \
67+
mingw-w64-boost \
68+
mingw-w64-cmake \
69+
mingw-w64-crt \
70+
mingw-w64-curl \
71+
mingw-w64-flac \
72+
mingw-w64-fontconfig \
73+
mingw-w64-freetype2 \
74+
mingw-w64-gcc \
75+
mingw-w64-gnutls \
76+
mingw-w64-headers \
77+
mingw-w64-libiconv \
78+
mingw-w64-libogg \
79+
mingw-w64-libpng \
80+
mingw-w64-libvorbis \
81+
mingw-w64-nettle \
82+
mingw-w64-openal \
83+
mingw-w64-openssl \
84+
mingw-w64-pkg-config \
85+
mingw-w64-sdl2 \
86+
mingw-w64-speexdsp \
87+
mingw-w64-tools \
88+
mingw-w64-winpthreads \
89+
mingw-w64-xz \
90+
mingw-w64-zlib \
91+
mingw-w64-zstd \
92+
pkgconf \
93+
&& (echo -e "y\ny\n" | sudo pacman -Scc)
94+
95+
WORKDIR /home/build/
96+
COPY mingw-w64-libzip mingw-w64-libzip
97+
USER root
98+
# GMP and Nettle seem to have their mingw libraries misnamed. pkg-config
99+
# points to .a, not .dll.a files; additionally cmake removes any such
100+
# extensions, so symlink the files to their expected places
101+
RUN ln -s /usr/i686-w64-mingw32/lib/libp11-kit.dll.a /usr/i686-w64-mingw32/lib/libp11-kit.a \
102+
&& ln -s /usr/i686-w64-mingw32/lib/libgmp.dll.a /usr/i686-w64-mingw32/lib/libgmp.a
103+
RUN chown -R build /home/build
104+
USER build
105+
WORKDIR /home/build/mingw-w64-libzip
106+
RUN makepkg -sr --noconfirm
107+
USER root
108+
RUN pacman -U mingw-w64-libzip-*.zst --noconfirm && pacman -Scc --noconfirm && rm -r /home/build/*
109+
110+
RUN wget https://github.com/nlohmann/json/releases/download/v3.11.3/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/
111+
112+
# Bash is required for OpenRCT2 CI
113+
SHELL ["/bin/bash", "-c"]

20/mingw/mingw-w64-libzip/PKGBUILD

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Maintainer: Vaporeon <vaporeon@vaporeon.io>
2+
# Contributor: xantares
3+
4+
pkgname=mingw-w64-libzip
5+
pkgver=1.11.4
6+
pkgrel=1
7+
pkgdesc="A C library for reading, creating, and modifying zip archives (mingw-w64)"
8+
url="http://www.nih.at/libzip/index.html"
9+
license=('BSD')
10+
arch=(any)
11+
depends=('mingw-w64-xz' 'mingw-w64-zlib' 'mingw-w64-bzip2' 'mingw-w64-openssl' 'mingw-w64-gnutls')
12+
makedepends=('mingw-w64-cmake' 'ninja')
13+
options=('staticlibs' '!buildflags' '!strip')
14+
source=("http://www.nih.at/libzip/libzip-${pkgver}.tar.xz")
15+
sha256sums=('8a247f57d1e3e6f6d11413b12a6f28a9d388de110adc0ec608d893180ed7097b')
16+
17+
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
18+
_pkgname="libzip"
19+
20+
build() {
21+
for _arch in ${_architectures}; do
22+
${_arch}-cmake -S ${_pkgname}-${pkgver} -B build/${_arch}-static -G Ninja \
23+
-DBUILD_DOC=OFF \
24+
-DBUILD_EXAMPLES=OFF \
25+
-DBUILD_REGRESS=OFF \
26+
-DBUILD_TOOLS=OFF \
27+
-DBUILD_SHARED_LIBS=OFF
28+
29+
${_arch}-cmake -S ${_pkgname}-${pkgver} -B build/${_arch} -G Ninja \
30+
-DBUILD_DOC=OFF \
31+
-DBUILD_EXAMPLES=OFF \
32+
-DBUILD_REGRESS=OFF \
33+
-DBUILD_TOOLS=OFF
34+
35+
cmake --build build/${_arch}-static
36+
cmake --build build/${_arch}
37+
done
38+
}
39+
40+
package() {
41+
for _arch in ${_architectures}; do
42+
DESTDIR="${pkgdir}" cmake --install build/${_arch}-static
43+
DESTDIR="${pkgdir}" cmake --install build/${_arch}
44+
${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll
45+
${_arch}-strip -g "${pkgdir}"/usr/${_arch}/lib/*.a
46+
done
47+
}
48+

0 commit comments

Comments
 (0)