55 lines
No EOL
2.5 KiB
Docker
55 lines
No EOL
2.5 KiB
Docker
# Based on https://github.com/abarichello/godot-ci/blob/master/Dockerfile
|
|
FROM node:20.16-bullseye AS base
|
|
|
|
USER root
|
|
SHELL ["/bin/bash", "-c"]
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
git \
|
|
git-lfs \
|
|
unzip \
|
|
wget \
|
|
zip \
|
|
adb \
|
|
openjdk-17-jdk-headless \
|
|
rsync \
|
|
wine64 \
|
|
osslsigncode \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
FROM base
|
|
# When in doubt, see the downloads page: https://godotengine.org/download/archive/
|
|
ARG GODOT_VERSION="4.3"
|
|
|
|
# Example values: stable, beta3, rc1, dev2, etc.
|
|
# Also change the `SUBDIR` argument below when NOT using stable.
|
|
ARG RELEASE_NAME="stable"
|
|
|
|
ARG GODOT_TEST_ARGS=""
|
|
ARG GODOT_PLATFORM="linux.x86_64"
|
|
|
|
RUN wget https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-${RELEASE_NAME}/Godot_v${GODOT_VERSION}-${RELEASE_NAME}_${GODOT_PLATFORM}.zip \
|
|
&& wget https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-${RELEASE_NAME}/Godot_v${GODOT_VERSION}-${RELEASE_NAME}_export_templates.tpz \
|
|
&& mkdir ~/.cache \
|
|
&& mkdir -p ~/.config/godot \
|
|
&& mkdir -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.${RELEASE_NAME} \
|
|
&& unzip Godot_v${GODOT_VERSION}-${RELEASE_NAME}_${GODOT_PLATFORM}.zip \
|
|
&& mv Godot_v${GODOT_VERSION}-${RELEASE_NAME}_${GODOT_PLATFORM} /usr/local/bin/godot \
|
|
&& unzip Godot_v${GODOT_VERSION}-${RELEASE_NAME}_export_templates.tpz \
|
|
&& mv templates/* ~/.local/share/godot/export_templates/${GODOT_VERSION}.${RELEASE_NAME} \
|
|
&& rm -f Godot_v${GODOT_VERSION}-${RELEASE_NAME}_export_templates.tpz Godot_v${GODOT_VERSION}-${RELEASE_NAME}_${GODOT_PLATFORM}.zip
|
|
|
|
|
|
RUN godot -v -e --quit --headless ${GODOT_TEST_ARGS}
|
|
# Godot editor settings are stored per minor version since 4.3.
|
|
# `${GODOT_VERSION:0:3}` transforms a string of the form `x.y.z` into `x.y`, even if it's already `x.y` (until Godot 4.9).
|
|
RUN echo '[gd_resource type="EditorSettings" format=3]' > ~/.config/godot/editor_settings-${GODOT_VERSION:0:3}.tres
|
|
RUN echo '[resource]' >> ~/.config/godot/editor_settings-${GODOT_VERSION:0:3}.tres
|
|
|
|
|
|
# Download and set up rcedit to change Windows executable icons on export.
|
|
RUN wget https://github.com/electron/rcedit/releases/download/v2.0.0/rcedit-x64.exe -O /opt/rcedit.exe
|
|
RUN echo 'export/windows/rcedit = "/opt/rcedit.exe"' >> ~/.config/godot/editor_settings-${GODOT_VERSION:0:3}.tres
|
|
RUN echo 'export/windows/wine = "/usr/bin/wine64-stable"' >> ~/.config/godot/editor_settings-${GODOT_VERSION:0:3}.tres |